[PATCH] D48929: [ELF] Update addends in non-allocatable sections for REL targets when creating a relocatable output.
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 18 22:48:13 PDT 2023
MaskRay added a comment.
In D48929#4647755 <https://reviews.llvm.org/D48929#4647755>, @MaskRay wrote:
> Note that the interaction with `--compress-debug-sections={zlib,zstd}` is not handled in this patch. For relocatable linking of `.rel.debug_*` sections, the implicit addends are not applied to the output.
> I am trying to figure out a solution.
>
> Writer<ELFT>::run
> maybeCompress
> OutputSection::writeTo
> InputSection::writeTo
> relocate # relocations is empty
> writeSections
> OutputSection::writeTo
> InputSection::writeTo
> if SHT_REL copyRelocations
> addReloc R_ABS
> elif non-compress relocate
> relocateNonAllocForRelocatable handle R_ABS
Filed https://github.com/llvm/llvm-project/issues/66738 and pushed 345f532f3fe9bd4b6d55a490683455ee542d90d9 <https://reviews.llvm.org/rG345f532f3fe9bd4b6d55a490683455ee542d90d9> to add a test demonstrating the issue.
Repository:
rLLD LLVM Linker
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D48929/new/
https://reviews.llvm.org/D48929
More information about the llvm-commits
mailing list