[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
Tue Dec 12 14:57:28 PST 2023


================
@@ -898,10 +898,16 @@ void InputSection::relocateNonAlloc(uint8_t *buf, ArrayRef<RelTy> rels) {
   const TargetInfo &target = *elf::target;
   const auto emachine = config->emachine;
   const bool isDebug = isDebugSection(*this);
-  const bool isDebugLocOrRanges =
-      isDebug && (name == ".debug_loc" || name == ".debug_ranges");
   const bool isDebugLine = isDebug && name == ".debug_line";
-  std::optional<uint64_t> tombstone;
+  std::optional<uint64_t> tombstone, debugTombstone;
----------------
dwblaikie wrote:

I was mostly hoping there was some way to write the code more generally - I was inspired by @cmtice's first prototype where she had a switch over many different relocation types to handle tombstone values in different sizes of relocations (which aren't used currently, but I can appreciate the desire to have generic/general code in the linker) - so I was wondering if we could have that sort of generalized support without having to special case all the different sizes of relocations.

But, anyway, that's just my 2c. But sounds like lld's architecture doesn't make that feasible at this time - so be it.

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


More information about the llvm-commits mailing list