[lld] [ELF] Retain relocation sections for GOT entries added by relaxOnce (PR #225594)
Peter Smith via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 23 02:00:17 PDT 2026
================
@@ -1583,7 +1583,9 @@ template <class ELFT> void Writer<ELFT>::finalizeAddressDependentContent() {
changed |= ctx.in.relrDyn->updateAllocSize(ctx);
if (ctx.in.relrAuthDyn)
changed |= ctx.in.relrAuthDyn->updateAllocSize(ctx);
- if (ctx.in.relrAuthDyn && ctx.in.dynamic && ctx.in.dynamic->getParent()) {
+ if ((ctx.in.relrAuthDyn ||
----------------
smithp35 wrote:
Could this be simplified to `ctx.in.dynamic && ctx.in.dynamic->getParent()`?
The .dynamic section is fairly small, so it seems like skipping the update would be of marginal benefit. Would save some effort decoding the expression.
Not a strong opinion, happy to go with what you prefer.
https://github.com/llvm/llvm-project/pull/225594
More information about the llvm-commits
mailing list