Hi,
I was cleaning up the expected-at.cc table for dwarflint, in particular
for DW_AT_linkage_name, which is the dwarf4 variant of
DW_AT_MIPS_linkage_name. I removed some XXXs that I think are not valid
anymore (in particlar DW_TAG_member shouldn't have a linkage_name
attached, which was fixed in gcc some time ago). And I added a new check
to see if there are DIEs which have a linkage_name, but aren't marked
external. Patch attached and now on dwarf branch.
But I am seeing lots of warnings with this. So either gcc is not
following the dwarf spec, has some bugs, or I am misinterpreting things.
The warnings are of two variants:
- DW_TAG_variables, which do have a linkage_name, can be found in symtab
(not checked by the code, just my manual spot checking), but don't have
DW_AT_external set. I think this is just a gcc bug.
- DW_TAG_union_type and DW_TAG_structure_type with DW_AT_linkage_name
set (but not DW_AT_external, which on itself makes sense). These are
unexpected because the dwarf spec doesn't explain why or how these would
be necessary.
The linkage_names strings can be pretty large, so it would be nice if we
could get rid of them when not necessary. But I might have
misinterpreted how they are actually used. So, does any of the above
make sense?
Cheers,
Mark