summaryrefslogtreecommitdiff
path: root/src/base
diff options
context:
space:
mode:
Diffstat (limited to 'src/base')
-rw-r--r--src/base/loader/elf_object.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/base/loader/elf_object.cc b/src/base/loader/elf_object.cc
index 73c1c5dcd..410cc1fde 100644
--- a/src/base/loader/elf_object.cc
+++ b/src/base/loader/elf_object.cc
@@ -383,7 +383,9 @@ ElfObject::ElfObject(const std::string &_filename, size_t _len,
}
// should have found at least one loadable segment
- assert(text.size != 0);
+ warn_if(text.size != 0,
+ "Empty .text segment in '%s'. ELF file corrupted?\n",
+ filename);
DPRINTFR(Loader, "text: 0x%x %d\ndata: 0x%x %d\nbss: 0x%x %d\n",
text.baseAddr, text.size, data.baseAddr, data.size,