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

Bevin Hansson via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 22 06:19:52 PST 2024


bevin-hansson wrote:

Hi @MaskRay ! This patch seems to have uncovered some odd behavior in our downstream, and I'm having a hard time understanding how this tombstoning is supposed to work.

Given the following conditions:
```
if (tombstone && (expr == R_ABS || expr == R_DTPREL)) {
  if (!sym.getOutputSection() || (ds && ds->folded && !isDebugLine)) {
```
It seems to me that relocations in debug sections for which the symbols are defined and absolute will always be tombstoned. Is this really the correct behavior? This means that if you have a symbol definition in the debug info from a source file, but where the symbol is instead defined to an absolute value through a linker script or command line option, the debug info relocation will be tombstoned even though the symbol existed. This situation can happen if the symbol in the source file is weak.

How is this intended to work, exactly?

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


More information about the llvm-commits mailing list