diff options
author | Itamar <itamar8910@gmail.com> | 2021-09-09 12:25:02 +0300 |
---|---|---|
committer | Brian Gianforcaro <b.gianfo@gmail.com> | 2021-09-10 13:57:34 +0000 |
commit | c78838c2d247d9e838095f15faebb8a404c07242 (patch) | |
tree | 687afaabdd56534d2871a8a51378c18b4a4373da /Documentation | |
parent | 679bde06edf301e920f2fc3ede3be37a910a3ebd (diff) | |
download | serenity-c78838c2d247d9e838095f15faebb8a404c07242.zip |
LibDebug: Use the first memory segment of a library as the ELF's base
When parsing the libraries of the debugee process, we previously
assumed that the region that's called `<library name>: .text` was also
the base of the ELF file.
However, since we started linking with `-z separate-code`, this is no
longer the case - our executables have a read-only segment before the
.text segment, and that segment is actually at the base of the ELF.
This broke inserting breakpoints with the debugger since they were
inserted at a wrong offset.
To fix that, we now use the address of the first segment in the memory
map for the ELF's base address (The memory map is sorted by address).
Diffstat (limited to 'Documentation')
0 files changed, 0 insertions, 0 deletions