[lld] [ELF] -r --compress-debug-sections: update addends for .debug_* sections relocated by REL (PR #66804)

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 20 09:17:16 PDT 2023


================
@@ -463,7 +463,10 @@ void InputSection::copyRelocations(uint8_t *buf,
 
       if (RelTy::IsRela)
         p->r_addend = sym.getVA(addend) - section->getOutputSection()->addr;
-      else if (config->relocatable && type != target.noneRel)
+      // See the comment in writeSections. For SHF_ALLOC sections relocated by
----------------
MaskRay wrote:

Thanks for the comment. Clarified in d63198be55293facbd5dd9ed929a32a710be56ad

https://github.com/llvm/llvm-project/pull/66804


More information about the llvm-commits mailing list