ElfReader: Support for Section and Symbol size.

- getSection/getSymbol now returns an ElfSymbol reference.

Searching by address now searches if address is within
symbol address and symbol address + size.
So we can test, if we are *within* a function, object or
section and not only at the start address.
This commit is contained in:
Martin Hoffmann
2013-03-04 15:18:52 +01:00
parent 3501050548
commit 4686c27d3d
10 changed files with 185 additions and 218 deletions

View File

@ -35,9 +35,9 @@ bool KesoRefCampaign::run()
return false;
}
address_t injip = elf.getAddressByName("c23_PersistentDetectorScopeEntry_m5_run");
address_t injip = elf.getSymbol("c23_PersistentDetectorScopeEntry_m5_run").getAddress();
address_t rambase = elf.getAddressByName("__CIAO_APPDATA_cdx_det__heap");
address_t rambase = elf.getSymbol("__CIAO_APPDATA_cdx_det__heap").getAddress();
// address_t ramend = rambase + 0x80000;
address_t ramend = rambase + 4;
cout << "ramend: " << hex << ramend << endl;