[all-commits] [llvm/llvm-project] 57e5b8: [lld-macho] Fix STABS entries for `--icf=safe_thun...
alx32 via All-commits
all-commits at lists.llvm.org
Thu Mar 27 14:11:42 PDT 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 57e5b82e8cf4b892ce023c37c9f6053c15c582a5
https://github.com/llvm/llvm-project/commit/57e5b82e8cf4b892ce023c37c9f6053c15c582a5
Author: alx32 <103613512+alx32 at users.noreply.github.com>
Date: 2025-03-27 (Thu, 27 Mar 2025)
Changed paths:
M lld/MachO/SyntheticSections.cpp
M lld/test/MachO/icf-safe-thunks-dwarf.ll
Log Message:
-----------
[lld-macho] Fix STABS entries for `--icf=safe_thunks` and `--keep-icf-stabs` (#133179)
When using the linker flags `--icf=safe_thunks` and `--keep-icf-stabs`
together, an issue arises with the STABS debugging entries in the linked
output. The problem affects STABS entries for functions that are folded
via ICF using thunks.
For instance, if `func1` is merged into `func2` through a thunk, the
STABS entry for `func1` incorrectly points to the object file of
`func2`. This is incorrect behavior—each function’s STABS entry should
consistently point to its own original object file (e.g., the STABS
entry for `func1` should reference `func1`’s object file). This issue
causes `dsymutil` to not be able to retrieve the debug information for
the problematic function.
This patch corrects this behavior - making it so that STABS entries
always point to the correct object file.
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