llvm-project
fd3fecfc - Revert "[lld] Merge equivalent symbols found during ICF (#134342)"

Commit
223 days ago
Revert "[lld] Merge equivalent symbols found during ICF (#134342)" The change would also merge *non-equivalent* symbols under some circumstances, see comment with a reproducer on the PR. > Fixes a correctness issue for AArch64 when ADRP and LDR instructions are > outlined in separate sections and sections are fed to ICF for > deduplication. > > See test case (based on > https://github.com/llvm/llvm-project/issues/129122) for details. All > rodata.* sections are folded into a single section with ICF. This leads > to all f2_* function sections getting folded into one (as their > relocation target symbols g* belong to .rodata.g* sections that have > already been folded into one). Since relocations still refer original g* > symbols, we end up creating duplicate GOT entry for all such symbols. > This PR addresses that by tracking such folded symbols and create one > GOT entry for all such symbols. > > Fixes https://github.com/llvm/llvm-project/issues/129122 > > Co-authored by: @jyknight This reverts commit 8389d6fad76bd880f02bddce7f0f2612ff0afc40.
Author
Committer
Parents
Loading