[PATCH] D115993: [ELF] Optimize RelocationSection<ELFT>::writeTo
Igor Kudrin via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 21 08:38:12 PST 2021
ikudrin added inline comments.
================
Comment at: lld/ELF/SyntheticSections.cpp:1668
+ addend = computeAddend();
+ kind = AddendOnly; // Catch errors
}
----------------
And now we have an inconsistency if `kind` was `AddendOnlyWithTargetVA` or `AgainstSymbolWithTargetVA` because `sym` is not `nullptr` and an `assert()` in `computeAddend()` can trigger. Maybe add a new kind `PostComputeRaw` and add `assert`s to `computeAddend()` and `needsDynSymIndex()` to ensure that they are not called after `computeRaw()`?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D115993/new/
https://reviews.llvm.org/D115993
More information about the llvm-commits
mailing list