[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:34 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:

Seems unfortunate that the `tombstone` and `debugTombstone` handling is distinct here - rather than `debugTombstone` being a default behavior that could be expressed via the `tombstone`/`deadRelocInNonAlloc` functionality. (eg: for the 32/64 bit issue - I guess there's no way for a user to, on the command line, express "use max int/all-1s in this section, for both 32 bit and 64 bit (or other size) relocations"?)

(or, alternatively, perhaps it'd be simpler to remove the generic-but-not-quite-sufficient-to-express-these-situations `deadRelocInNonAlloc` flag and have something narrower that describes the specific tombstoning strategies we want to support, pre-canned (v5-and-below compatible and v6-and-above/standard tombstoning, basically))

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


More information about the llvm-commits mailing list