summaryrefslogtreecommitdiff
path: root/src/base
diff options
context:
space:
mode:
Diffstat (limited to 'src/base')
-rw-r--r--src/base/loader/elf_object.cc3
-rw-r--r--src/base/loader/object_file.hh3
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 {