[all-commits] [llvm/llvm-project] 9eb646: [lld][MachO] Ignore relocated bytes when folding L...
Zhaoxuan Jiang via All-commits
all-commits at lists.llvm.org
Mon Sep 7 18:36:09 PDT 2026
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 9eb6467f3f03c7da1dbe3ebdd9a4d3068945e767
https://github.com/llvm/llvm-project/commit/9eb6467f3f03c7da1dbe3ebdd9a4d3068945e767
Author: Zhaoxuan Jiang <jiangzhaoxuan94 at gmail.com>
Date: 2026-09-08 (Tue, 08 Sep 2026)
Changed paths:
M lld/MachO/ICF.cpp
M lld/MachO/UnwindInfoSection.cpp
A lld/test/MachO/icf-lsda-reloc.s
Log Message:
-----------
[lld][MachO] Ignore relocated bytes when folding LSDAs (#220155)
AArch64 exception tables reference type info through PC-relative
pointer-to-GOT relocations. The assembler leaves the negated field
offset in each relocated field, which the linker ignores, so identical
tables differ in their raw bytes and are never folded. Treat
__gcc_except_tab like __eh_frame and zero the relocated fields before
ICF hashes and compares it.
Folding these LSDAs exposes a latent issue: the LSDA pointer of a DWARF
FDE is resolved to an InputSection when the FDE is parsed and is never
canonicalized after ICF. A function that is unwound via its FDE and
whose LSDA was folded away therefore gets an __unwind_info LSDA entry
computed from the dead input section. Fixed it in the same commit.
This patch is LLM-driven, but the issue was observed in production and
the test is reduced from the production object.
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