-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Compute base addresses from program headers while reading /proc/self/…
…maps. We previously had logic to compute the base address from program headers as part of symbolization. The problem is that we need a correct base address earlier in order to adjust a PC into the image's address space, as these addresses can appear in unsymbolized output. There was previously an assumption that only the mapping that was lowest in the address space did not need to be adjusted. This assumption is not guaranteed (for example, the kernel may choose to map an ET_DYN lowest) and in fact turned out to be wrong in binaries linked with lld because the first mapping is read-only. The solution is to move the program header reading logic into the code that reads /proc/self/maps.
- Loading branch information
Showing
1 changed file
with
58 additions
and
52 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