[lld] [lld][ELF] Merge equivalent symbols found during ICF (PR #139493)
Hans Wennborg via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 11 08:25:55 PDT 2025
================
@@ -286,9 +313,14 @@ bool ICF<ELFT>::constantEq(const InputSection *secA, Relocs<RelTy> ra,
// Relocations referring to InputSections are constant-equal if their
// section offsets are equal.
if (isa<InputSection>(da->section)) {
- if (da->value + addA == db->value + addB)
+ if (da->value + addA == db->value + addB) {
----------------
zmodem wrote:
I may be misremembering, but IIRC the only size impact we complained about was from the suggested workaround of using `--icf=safe`.
I don't remember evaluating the size impact of this PR. We just tried it and confirmed it works (https://crbug.com/415810137#comment50), waited for it to get through review, and reverted the original change as the fix seemed to be taking a while.
https://github.com/llvm/llvm-project/pull/139493
More information about the llvm-commits
mailing list