[lld] [LLD] Tombstone LocalTU entry in .debug_names (PR #70701)
David Blaikie via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 2 14:34:22 PDT 2023
================
@@ -896,6 +893,16 @@ void InputSection::relocateNonAlloc(uint8_t *buf, ArrayRef<RelTy> rels) {
break;
}
+ const uint64_t debugTombstone = StringSwitch<uint64_t>(name)
+ .Case(".debug_ranges", 1)
+ .Case(".debug_loc", 1)
+ .Case(".debug_names", llvm::maxUIntN(32))
+ .Default(0);
+ // If -z dead-reloc-in-nonalloc= is specified, respect it.
+ if (!tombstone && isDebug)
+ tombstone = debugTombstone;
+ else if (tombstone)
+ tombstone = SignExtend64<bits>(*tombstone);
----------------
dwblaikie wrote:
if this is sign extended to 64 bits, but then we have a 32 bit relocation, I'd expect this fails/errors out?
https://github.com/llvm/llvm-project/pull/70701
More information about the llvm-commits
mailing list