[PATCH] D65242: [ELF] More dynamic relocation packing
Peter Collingbourne via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 29 20:43:26 PDT 2019
pcc added inline comments.
================
Comment at: lld/ELF/SyntheticSections.cpp:1784
+ offset = r.r_offset;
+ if (config->isRela) {
+ add(r.r_addend - addend);
----------------
pcc wrote:
> For non-relative RELA relocations we can generally expect the addend to always be the same (usually 0) so you may want to consider only adding relocations with an addend of 0 to `nonRelativeGroups`. That would let you omit the addend field from these relocations.
Would it be simpler to only support an addend of 0 here? I reckon that non-zero addends are rare enough that we can just let them be emitted in `ungroupedNonRelatives`.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D65242/new/
https://reviews.llvm.org/D65242
More information about the llvm-commits
mailing list