[lld] [LLD] Tombstone LocalTU entry in .debug_names (PR #70701)

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Sun Nov 5 16:44:43 PST 2023


MaskRay wrote:

> By default LLD uses 0x0... as a tombstone value. For Type Units this is a valid address. Changed so that MAX value is used for tombstone.
> 
> This was introduced as a change to DWARF6 spec: [dwarfstd.org/issues/231013.1.html](https://dwarfstd.org/issues/231013.1.html)

The description (the draft commit message when the patch eventually lands) can use some clang commands for the curious to play with.

Some information can be extracted from 
@dwblaikie's https://discourse.llvm.org/t/debug-names-tombstoning-for-local-type-units/74410/2

```
$ clang++-tot null.cpp a.cpp b.cpp -g -fdebug-types-section -fuse-ld=lld -gpubnames && llvm-dwarfdump-tot a.out -debug-names
    LocalTU[0]: 0x00000030
 # some comments to explain what this is and how it is undesired can be useful
    LocalTU[0]: 0x00000000
```

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


More information about the llvm-commits mailing list