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

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 6 17:04:56 PST 2023


MaskRay wrote:

> #73872 added support for ...
> .debug_names references local TUs in COMDAT .debug_info.
> When the referenced .debug_info is non-prevailing, we leave a value of zero, which is a valid offset within the .debug_info section.
> 
> % cat a.cc
> ...
> % cat b.cc
> ...
> % clang++ -g -gpubnames -fdebug-types-section -fuse-ld=lld a.cc b.cc -o old
> % llvm-dwarfdump -v old
> ...
> Local Type Unit Offsets [
>   LocalTU[0]: 0x00000000  // this is a valid offset within the .debug_info section
> ...
> 
> https://dwarfstd.org/issues/231013.1.html proposes that we use a tombstone value instead.
> This patch implements the idea. The new llvm-dwarfdump output will look like:
> 
> % llvm-dwarfdump -v new
> ...
> Local Type Unit Offsets [
>   LocalTU[0]: 0xffffffff  // tombstone value
> ...

I have created #74686 as an alternative. Thank you for your and @dwblaikie's descriptions to improve my .debug_names understanding :)

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


More information about the llvm-commits mailing list