diff options
author | Korey Sewell <ksewell@umich.edu> | 2006-03-16 18:40:54 -0500 |
---|---|---|
committer | Korey Sewell <ksewell@umich.edu> | 2006-03-16 18:40:54 -0500 |
commit | 1db74514c23a09997d3f3eabca31a4dc94cec2f7 (patch) | |
tree | c28b33bbed1535a72503cdd5f52c39889dd0a449 /base/loader | |
parent | 805b9cf1d5ace9c02b7bd120ee1bc082f544699d (diff) | |
parent | 1d741c48af9f08718d359d9e3b7d3c0bf562a467 (diff) | |
download | gem5-1db74514c23a09997d3f3eabca31a4dc94cec2f7.tar.xz |
Merge zizzer:/bk/newmem
into zazzer.eecs.umich.edu:/.automount/zooks/y/ksewell/research/m5-sim/newmem-mips
--HG--
extra : convert_revision : 02fe0b0170348dc6f6a985c15123806088a8c23e
Diffstat (limited to 'base/loader')
-rw-r--r-- | base/loader/elf_object.cc | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/base/loader/elf_object.cc b/base/loader/elf_object.cc index 06c0ae663..58029bc3e 100644 --- a/base/loader/elf_object.cc +++ b/base/loader/elf_object.cc @@ -75,8 +75,7 @@ ElfObject::tryFile(const string &fname, int fd, size_t len, uint8_t *data) DPRINTFR(Loader, "Not ELF\n"); elf_end(elf); return NULL; - } - else { + } else { //Detect the architecture //Versioning issues in libelf need to be resolved to get the correct //SPARC constants. @@ -215,8 +214,7 @@ ElfObject::ElfObject(const string &_filename, int _fd, bss.size = phdr.p_memsz - phdr.p_filesz; bss.baseAddr = phdr.p_vaddr + phdr.p_filesz; bss.fileImage = NULL; - } - else if (data.size == 0) { // have text, this must be data + } else if (data.size == 0) { // have text, this must be data data.baseAddr = phdr.p_vaddr; data.size = phdr.p_filesz; data.fileImage = fileData + phdr.p_offset; @@ -229,6 +227,10 @@ ElfObject::ElfObject(const string &_filename, int _fd, bss.size = phdr.p_memsz - phdr.p_filesz; bss.baseAddr = phdr.p_vaddr + phdr.p_filesz; bss.fileImage = NULL; + } else { + warn("More than two loadable segments in ELF object."); + warn("Ignoring segment @ 0x%x length 0x%x.", + phdr.p_vaddr, phdr.p_filesz); } } |