[lld] [ELF] Change .debug_names tombstone value to UINT32_MAX/UINT64_MAX (PR #74686)

David Blaikie via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 7 08:43:33 PST 2023


================
@@ -986,8 +991,13 @@ void InputSection::relocateNonAlloc(uint8_t *buf, ArrayRef<RelTy> rels) {
       // value. Enable -1 in a future release.
       if (!sym.getOutputSection() || (ds && ds->folded && !isDebugLine)) {
         // If -z dead-reloc-in-nonalloc= is specified, respect it.
-        const uint64_t value = tombstone ? SignExtend64<bits>(*tombstone)
-                                         : (isDebugLocOrRanges ? 1 : 0);
+        uint64_t value;
+        if (tombstone)
+          value = SignExtend64<bits>(*tombstone);
+        else if (type == target.symbolicRel)
----------------
dwblaikie wrote:

This is intended as a proxy for "is the relocation 64 bits"? Is there a way this could be generalized/less indirect in its goals?

https://github.com/llvm/llvm-project/pull/74686


More information about the llvm-commits mailing list