[all-commits] [llvm/llvm-project] fd3fec: Revert "[lld] Merge equivalent symbols found durin...
Hans Wennborg via All-commits
all-commits at lists.llvm.org
Tue May 13 01:58:23 PDT 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: fd3fecfc0936703f2715fe6fea890e81b0b3c2ac
https://github.com/llvm/llvm-project/commit/fd3fecfc0936703f2715fe6fea890e81b0b3c2ac
Author: Hans Wennborg <hans at chromium.org>
Date: 2025-05-13 (Tue, 13 May 2025)
Changed paths:
M lld/ELF/ICF.cpp
M lld/ELF/SymbolTable.cpp
M lld/ELF/SymbolTable.h
R lld/test/ELF/aarch64-got-merging-icf.s
M lld/test/ELF/icf-preemptible.s
Log Message:
-----------
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.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list