-
Notifications
You must be signed in to change notification settings - Fork 275
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
1. For ELF files we compute base as the difference between the address of any loadable code segment and its offset. If there are no loadable code segments, then we find a section with minimal offset value and substract its address from its offset. 2. For MachO, when the file is relocatable, i.e., it doesn't have addresses we compute base as $vaddr - offset$, the same as we do in ELF. This gives us results that match objdump (but do not match radare2, however radare2 is not seeing any symbols, so it doesn't really matter) 3. For COFF nothing is done, and I am not sure that we need to do anything. 4. Removed special computation of the base address (Base.from_sections_offset) from ELF, MachO, and COFF. It is not tested on LLVM versions below 6, but I believe it should work up to 3.4. resolves #1183 Co-authored-by: gitoleg <forown@yandex.ru>
- Loading branch information
Showing
12 changed files
with
116 additions
and
187 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.