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

Alexander Richardson via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 20 10:52:04 PDT 2023


================
@@ -463,7 +463,13 @@ 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)
+      // For SHF_ALLOC sections reloated by REL, append a relocation to
----------------
arichardson wrote:

```suggestion
      // For SHF_ALLOC sections relocated by REL, append a relocation to
```

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


More information about the llvm-commits mailing list