diff options
| author | Ian McIntyre <ianpmcintyre@gmail.com> | 2023-09-29 15:11:55 -0400 |
|---|---|---|
| committer | Ian McIntyre <ianpmcintyre@gmail.com> | 2023-09-29 16:42:38 -0400 |
| commit | cfaac90ddfbab00aa5709c1f6dc2b796e63c6d77 (patch) | |
| tree | 2d49b97146fddb2d1c96a9a53a2f1f0939215552 /.github/workflows | |
| parent | c485a9090a3b623a5de0c2e6da6c857770bf079a (diff) | |
Refactor LMA computation in inspect_elf
Depending on the ordering and contents of program headers, the previous
predicate for "is this the program header for this section?" could
select the wrong header. GNU's ld and LLVM's lld produce that different
header ordering and contents, causing select asserts to fail when using
GNU's linker.
This commit changes how we select the program header, approximating the
way GNU objdump figures the value. This new approach needs more
information from the section header, so I'm changing the API to make it
easier to call the section_header method.
The previous approach was influenced by LLVM objdump. Turns out that
LLVM objdump will also compute the wrong LMA for these binaries when
they're linked with GNU ld. GNU objdump always produces the correct
section LMA, no matter the LLVM or GNU linker.
Diffstat (limited to '.github/workflows')
0 files changed, 0 insertions, 0 deletions
