From 4320c6919860634baf2207d9a642a9fbd9efc3d5 Mon Sep 17 00:00:00 2001 From: Cary Coutant Date: Fri, 6 Jun 2014 16:23:21 -0700 Subject: Strip .debug_gnu_pubnames and .debug_gnu_pubtypes when building .gdb_index. When not stripping those sections, there was a bug where gold was incorrectly adjusting section-relative offsets by the offset of the input section within the output section. That adjustment was both unnecessary and wrong, causing gold to miss a number of debug entries that should have been added to .gdb_index. (With stripping, the adjustment was always 0, so the bug in dwarf_reader.cc would have been hidden by the change to layout.cc.) gold/ * dwarf_reader.h (Dwarf_pubnames_table): Remove output_section_offset_. * dwarf_reader.cc (Dwarf_pubnames_table::read_section): Likewise. (Dwarf_pubnames_table::read_header): Likewise. * layout.cc (gdb_fast_lookup_sections): Add .debug_gnu_pubnames and .debug_gnu_pubtypes. --- gold/layout.cc | 2 ++ 1 file changed, 2 insertions(+) (limited to 'gold/layout.cc') diff --git a/gold/layout.cc b/gold/layout.cc index 147f740..c5c3b57 100644 --- a/gold/layout.cc +++ b/gold/layout.cc @@ -563,7 +563,9 @@ static const char* gdb_fast_lookup_sections[] = { "aranges", "pubnames", + "gnu_pubnames", "pubtypes", + "gnu_pubtypes", }; // Returns whether the given debug section is in the list of -- cgit v1.1