diff options
Diffstat (limited to 'src/base')
-rw-r--r-- | src/base/loader/elf_object.cc | 2 | ||||
-rw-r--r-- | src/base/loader/object_file.hh | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/src/base/loader/elf_object.cc b/src/base/loader/elf_object.cc index 43c00b19e..df9134e9e 100644 --- a/src/base/loader/elf_object.cc +++ b/src/base/loader/elf_object.cc @@ -111,6 +111,8 @@ ElfObject::tryFile(const std::string &fname, size_t len, uint8_t *data, } else if (ehdr.e_machine == EM_AARCH64 && ehdr.e_ident[EI_CLASS] == ELFCLASS64) { arch = Arm64; + } else if (ehdr.e_machine == EM_RISCV) { + arch = Riscv; } else if (ehdr.e_machine == EM_PPC && ehdr.e_ident[EI_CLASS] == ELFCLASS32) { arch = Power; diff --git a/src/base/loader/object_file.hh b/src/base/loader/object_file.hh index b2628a0d0..98e1fc538 100644 --- a/src/base/loader/object_file.hh +++ b/src/base/loader/object_file.hh @@ -56,7 +56,8 @@ class ObjectFile Arm64, Arm, Thumb, - Power + Power, + Riscv }; enum OpSys { |