Bug fix: only use guessed heap start if no heap start was found in the ELF file

This commit is contained in:
Niclas Finne 2013-03-08 17:51:24 +01:00
parent 9f774a31dd
commit 55753f2bd4
1 changed files with 4 additions and 4 deletions

View File

@ -455,10 +455,10 @@ public class ELF {
addr += symTable.getEntrySize();
}
if (sAddrHighest > 0) {
System.out.printf("Warning: Unable to parse _end symbol. I'm guessing that heap starts at 0x%05x\n", sAddrHighest);
map.setHeapStart(sAddrHighest);
}
if (map.getHeapStart() <= 0 && sAddrHighest > 0) {
System.err.printf("Warning: Unable to parse _end symbol. I'm guessing that heap starts at 0x%05x\n", sAddrHighest);
map.setHeapStart(sAddrHighest);
}
return map;
}