[PATCH] D65242: [ELF] More dynamic relocation packing

Peter Collingbourne via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 29 11:52:11 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);
----------------
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.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D65242/new/

https://reviews.llvm.org/D65242





More information about the llvm-commits mailing list