diff options
author | Marcus Comstedt <marcus@mc.pp.se> | 2019-08-19 19:06:10 +0200 |
---|---|---|
committer | Marcus Comstedt <marcus@mc.pp.se> | 2019-10-28 09:23:32 +0100 |
commit | b3c656629efc042c30ada9aaabb7c034f855f621 (patch) | |
tree | cf77589a8ce193b3e388edfc2a12f0dd116eda35 /fesvr | |
parent | f437e6a4e9983be0583ee1bf34512f80f3cc0162 (diff) | |
download | riscv-isa-sim-b3c656629efc042c30ada9aaabb7c034f855f621.zip riscv-isa-sim-b3c656629efc042c30ada9aaabb7c034f855f621.tar.gz riscv-isa-sim-b3c656629efc042c30ada9aaabb7c034f855f621.tar.bz2 |
Whithhold BE ELF loading until BE target support is available
Diffstat (limited to 'fesvr')
-rw-r--r-- | fesvr/elfloader.cc | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/fesvr/elfloader.cc b/fesvr/elfloader.cc index 6e764ef..610e520 100644 --- a/fesvr/elfloader.cc +++ b/fesvr/elfloader.cc @@ -31,7 +31,7 @@ std::map<std::string, uint64_t> load_elf(const char* fn, memif_t* memif, reg_t* assert(size >= sizeof(Elf64_Ehdr)); const Elf64_Ehdr* eh64 = (const Elf64_Ehdr*)buf; assert(IS_ELF32(*eh64) || IS_ELF64(*eh64)); - assert(IS_ELFLE(*eh64) || IS_ELFBE(*eh64)); + assert(IS_ELFLE(*eh64)); std::vector<uint8_t> zeros; std::map<std::string, uint64_t> symbols; @@ -81,15 +81,9 @@ std::map<std::string, uint64_t> load_elf(const char* fn, memif_t* memif, reg_t* } while(0) if (IS_ELF32(*eh64)) - if (IS_ELFLE(*eh64)) - LOAD_ELF(Elf32_Ehdr, Elf32_Phdr, Elf32_Shdr, Elf32_Sym, from_le); - else - LOAD_ELF(Elf32_Ehdr, Elf32_Phdr, Elf32_Shdr, Elf32_Sym, from_be); + LOAD_ELF(Elf32_Ehdr, Elf32_Phdr, Elf32_Shdr, Elf32_Sym, from_le); else - if (IS_ELFLE(*eh64)) - LOAD_ELF(Elf64_Ehdr, Elf64_Phdr, Elf64_Shdr, Elf64_Sym, from_le); - else - LOAD_ELF(Elf64_Ehdr, Elf64_Phdr, Elf64_Shdr, Elf64_Sym, from_be); + LOAD_ELF(Elf64_Ehdr, Elf64_Phdr, Elf64_Shdr, Elf64_Sym, from_le); munmap(buf, size); |