From: Nathan Binkert Date: Sat, 4 Jun 2005 01:47:30 +0000 (-0400) Subject: Make m5.fast work X-Git-Tag: m5_1.0_tutorial~37 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=372b5e706ce8258cdcf68825901f2d5f2f2ee87e;p=gem5.git Make m5.fast work base/loader/elf_object.cc: elf_version is an odd function. Don't use assert since it has a necessary side effect. --HG-- extra : convert_revision : 8c48f91afe6c7ff5030ac1a534dcda7e2e0c5c57 --- diff --git a/base/loader/elf_object.cc b/base/loader/elf_object.cc index 6dfbce28c..d434d199d 100644 --- a/base/loader/elf_object.cc +++ b/base/loader/elf_object.cc @@ -58,7 +58,8 @@ ElfObject::tryFile(const string &fname, int fd, size_t len, uint8_t *data) GElf_Ehdr ehdr; // check that header matches library version - assert(elf_version(EV_CURRENT) != EV_NONE); + if (elf_version(EV_CURRENT) == EV_NONE) + panic("wrong elf version number!"); // get a pointer to elf structure elf = elf_memory((char*)data,len); @@ -97,7 +98,8 @@ ElfObject::ElfObject(const string &_filename, int _fd, GElf_Ehdr ehdr; // check that header matches library version - assert(elf_version(EV_CURRENT) != EV_NONE); + if (elf_version(EV_CURRENT) == EV_NONE) + panic("wrong elf version number!"); // get a pointer to elf structure elf = elf_memory((char*)fileData,len); @@ -205,7 +207,8 @@ ElfObject::loadSomeSymbols(SymbolTable *symtab, int binding) return false; // check that header matches library version - assert(elf_version(EV_CURRENT) != EV_NONE); + if (elf_version(EV_CURRENT) == EV_NONE) + panic("wrong elf version number!"); // get a pointer to elf structure elf = elf_memory((char*)fileData,len);