1/* 2 * Copyright (c) 2003-2005 The Regents of The University of Michigan 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions are 7 * met: redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer; --- 65 unchanged lines hidden (view full) --- 74 ehdr.e_machine == EM_SPARCV9) { 75 arch = ObjectFile::SPARC64; 76 } else if (ehdr.e_machine == EM_SPARC32PLUS || 77 (ehdr.e_machine == EM_SPARC && 78 ehdr.e_ident[EI_CLASS] == ELFCLASS32)) { 79 arch = ObjectFile::SPARC32; 80 } else if (ehdr.e_machine == EM_MIPS 81 && ehdr.e_ident[EI_CLASS] == ELFCLASS32) { |
82 if (ehdr.e_ident[EI_DATA] == ELFDATA2LSB) { 83 arch = ObjectFile::Mips; 84 } else { 85 fatal("The binary you're trying to load is compiled for big " 86 "endian MIPS. M5\nonly supports little endian MIPS. " 87 "Please recompile your binary.\n"); 88 } |
89 } else if (ehdr.e_machine == EM_X86_64 && 90 ehdr.e_ident[EI_CLASS] == ELFCLASS64) { 91 //In the future, we might want to differentiate between 32 bit 92 //and 64 bit x86 processes in case there are differences in their 93 //initial stack frame. 94 arch = ObjectFile::X86; 95 } else if (ehdr.e_ident[EI_CLASS] == ELFCLASS64) { 96 arch = ObjectFile::Alpha; --- 345 unchanged lines hidden --- |