[all-commits] [llvm/llvm-project] 0ab1d2: [DWARFLinker] Use DIEEntry for backward ref_addr r...
Shivam Kunwar via All-commits
all-commits at lists.llvm.org
Mon Feb 23 20:31:18 PST 2026
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 0ab1d23fbfa2ae0ba14315cb11678d2289510f66
https://github.com/llvm/llvm-project/commit/0ab1d23fbfa2ae0ba14315cb11678d2289510f66
Author: Shivam Kunwar <75530356+phyBrackets at users.noreply.github.com>
Date: 2026-02-24 (Tue, 24 Feb 2026)
Changed paths:
M llvm/include/llvm/DWARFLinker/Classic/DWARFLinkerCompileUnit.h
M llvm/lib/DWARFLinker/Classic/DWARFLinker.cpp
A llvm/test/tools/llvm-dwarfutil/ELF/X86/odr-backward-ref-addr.test
Log Message:
-----------
[DWARFLinker] Use DIEEntry for backward ref_addr references (#181881)
The classic DWARF linker avoids `DIEEntry` for `DW_FORM_ref_addr`
references, using raw `DIEInteger` values with manual offset computation
instead. A stale FIXME explains this was because "the implementation
calls back to DwarfDebug to find the unit offset", but this is no longer
true. `DIEEntry` resolves offsets via
`DIEUnit::getDebugSectionOffset()`, which has no `DwarfDebug`
dependency.
And the real constraint is that forward references may point to
placeholder `DIEs` that never get adopted into a unit tree (due toODR
pruning), so `DIEEntry` cannot resolve them(a test failed during
refactoring this). However, backward references are safe, the target DIE
is already cloned and parented in a unit tree.
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