On Thu, Oct 02, 2025 at 11:08:58AM +0200, Richard Biener wrote:
> Yes. So as for the patch in question can you please add
> -glinkage-names={default,none,all} and gate generation appropriately?
> And alias -g[no-]linkage-names to none/default appropriately.
I wouldn't add -g[no-]linkage-names, I think -glinkage-names=
is enough.
Regarding DWARF, what DWARF5 says I think matches both the use for public
name and non-exported names.
During Cauldron my understanding was that you want linkage names for
is the abstract origin of DW_TAG_inlined_subroutine, not for all non-public
symbols.
Do you actually get it with your patch also for DW_AT_abstract_origin of
DW_TAG_inlined_subroutine, or just for normal DW_TAG_subprogram attributes?
And as Richi wrote, I'd be interested to know what happens with LTO when
the compiler decides to rename them.
Also, wonder if at least for the non-public cases we shouldn't skip
DW_AT_linkage_name if it is the same as DW_AT_name (e.g. for C), while
the string is hopefully shared in that case, it will still mean an extra
4 bytes per DIE and if it is totally useless...
And would really like to know what is the debug info size with
-glinkage-names=default vs. -glinkage-names=all.
Jakub