http://sourceware.org/bugzilla/show_bug.cgi?id=15021
--- Comment #2 from dje at google dot com ---
The example is incomplete, -gpubnames is needed as well.
Also, If gold doesn't see a usable pubnames/pubtypes section it will fall back
to reading all the debug info, and thus it can generate a better .gdb_index.
There is another issue at play here: gold can end up processing both
pubtypes/pubnames and reading the debug info, leading to the following
in .gdb_index for the original example:
bash$ gcc -g -Wl,--gdb-index -gpubnames -gdwarf-4 -fdebug-types-section 15021.c
bash$ readelf -w a.out
-->
[190] foo0:
2 [no symbol information]
T0 [no symbol information]
[191] foo1:
2 [no symbol information]
T0 [no symbol information]
[192] foo2:
2 [no symbol information]
T0 [no symbol information]
[193] foo3:
2 [no symbol information]
T0 [no symbol information]
[661] foo:
2 [no symbol information]
T0 [no symbol information]
Note that there are two copies of each symbol. The one for the CU came from
pubtypes and the one for the TU came from reading the debug info.
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
bug-binutils mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/bug-binutils