[lld] [LLD] Tombstone LocalTU entry in .debug_names (PR #70701)
Alexander Yermolovich via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 31 15:47:22 PDT 2023
================
@@ -918,7 +917,8 @@ void InputSection::relocateNonAlloc(uint8_t *buf, ArrayRef<RelTy> rels) {
continue;
if (tombstone ||
- (isDebug && (type == target.symbolicRel || expr == R_DTPREL))) {
+ ((isDebug && (type == target.symbolicRel || expr == R_DTPREL))) ||
----------------
ayermolo wrote:
Well basically that condition checks if relocation is 64bit: R_X86_64_64 (type == 1).
Primarily used in .debug_addr. Incidentally why DWARF64 tests works without adding isDebugNames to that condition. since for .debug_names relocation type is controlled by DWARF32 vs DWARF64.
Slightly more interesting case is expr == R_DTPREL. Since pretty much all relocs in debug sections are ABS. Looks like that relocation is used to reference TLS symbols. Learned something new today.
https://github.com/llvm/llvm-project/pull/70701
More information about the llvm-commits
mailing list