[all-commits] [llvm/llvm-project] 9e862a: [lld-macho] Fix invalid DWARF with --icf=safe_thun...
alx32 via All-commits
all-commits at lists.llvm.org
Fri Oct 4 21:48:30 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 9e862ae3219b09283971ca0ced52a64b0d6db86b
https://github.com/llvm/llvm-project/commit/9e862ae3219b09283971ca0ced52a64b0d6db86b
Author: alx32 <103613512+alx32 at users.noreply.github.com>
Date: 2024-10-04 (Fri, 04 Oct 2024)
Changed paths:
M lld/MachO/SyntheticSections.cpp
A lld/test/MachO/icf-safe-thunks-dwarf.ll
Log Message:
-----------
[lld-macho] Fix invalid DWARF with --icf=safe_thunks (#111097)
There is a bug in the current implementation of `--icf=safe_thunks`
where a STABS entry is emitted for generated thunks. This is problematic
as we end up generating invalid DWARF as dsymutil will think the entire
function body is at the thunk location, when in actuality there will
only be a single branch present. This will end up causing overlapping
DWARF entries.
To fix this we never generate STABS entries for such thunks.
The existing `--icf=safe_thunks` test is updated to also generate debug
info and we add a check that no corrupt DWARF is generated.
As a future TODO we need to make `--keep-icf-stabs` compatible with
`--icf=safe_thunks`.
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