diff options
author | Stephen Hines <hines@cs.fsu.edu> | 2008-02-05 23:44:13 -0500 |
---|---|---|
committer | Stephen Hines <hines@cs.fsu.edu> | 2008-02-05 23:44:13 -0500 |
commit | 0ccf9a2c3751f160d7d51153ef468a60b4daf8d0 (patch) | |
tree | 3f5d77b729818492d27996adbc69b472f6fd4da7 /src/base/loader | |
parent | ca313e23033cd3f2ef827edf9a442ed1ae3d087f (diff) | |
download | gem5-0ccf9a2c3751f160d7d51153ef468a60b4daf8d0.tar.xz |
Add base ARM code to M5
--HG--
extra : convert_revision : d811bf87d1a0bfc712942ecd3db1b48fc75257af
Diffstat (limited to 'src/base/loader')
-rw-r--r-- | src/base/loader/elf_object.cc | 3 | ||||
-rw-r--r-- | src/base/loader/object_file.hh | 3 |
2 files changed, 5 insertions, 1 deletions
diff --git a/src/base/loader/elf_object.cc b/src/base/loader/elf_object.cc index 23df1c5ba..8e41ffd16 100644 --- a/src/base/loader/elf_object.cc +++ b/src/base/loader/elf_object.cc @@ -88,6 +88,8 @@ ElfObject::tryFile(const string &fname, int fd, size_t len, uint8_t *data) arch = ObjectFile::X86; } else if (ehdr.e_ident[EI_CLASS] == ELFCLASS64) { arch = ObjectFile::Alpha; + } else if (ehdr.e_machine == EM_ARM) { + arch = ObjectFile::Arm; } else { warn("Unknown architecture: %d\n", ehdr.e_machine); arch = ObjectFile::UnknownArch; @@ -98,6 +100,7 @@ ElfObject::tryFile(const string &fname, int fd, size_t len, uint8_t *data) { case ELFOSABI_LINUX: + case ELFOSABI_ARM: opSys = ObjectFile::Linux; break; case ELFOSABI_SOLARIS: diff --git a/src/base/loader/object_file.hh b/src/base/loader/object_file.hh index 4f0c17cc8..7f2bef0bf 100644 --- a/src/base/loader/object_file.hh +++ b/src/base/loader/object_file.hh @@ -50,7 +50,8 @@ class ObjectFile SPARC64, SPARC32, Mips, - X86 + X86, + Arm }; enum OpSys { |