This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: gold: No .debug_aranges section when linking with --gdb-index


> when I use gold with --gdb-index, the resulting binary is missing the
> .debug_aranges section. The script below demonstrates the issue. lib1.so
> is linked without --gdb-index and has .debug_aranges, but not
> lib1_index.so. is this on purpose? .debug_aranges would be helpful for us
> for fast callstack resolution.
>
> Interestingly lld handles it differently (you can also test it with the
> script below, just set the path to lld binutils)

Yes, it was on purpose. The .gdb_index section contains its own
lookup-by-address table, making .debug_aranges redundant.

DWARF-5 support should resolve this. The new fast-lookup tables in
DWARF-5 provide the features of .gdb_index that are required for split
debug without replacing the .debug_aranges section.

If you want to use .gdb_index without stripping .debug_aranges, it
would probably be best to add a new option.

-cary


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]