This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[gold commit] Update list of debug sections for --strip-debug-xxx options
- From: Cary Coutant <ccoutant at google dot com>
- To: Binutils <binutils at sourceware dot org>
- Date: Wed, 26 Nov 2014 14:48:00 -0800
- Subject: [gold commit] Update list of debug sections for --strip-debug-xxx options
- Authentication-results: sourceware.org; auth=none
This patch adds .debug_gdb_scripts, .debug_gnu_pubnames,
.debug_gnu_pubtypes, and .debug_str_offsets to the lists of sections
to strip or keep when stripping debug info.
When using --strip-debug-gdb, we want to keep .debug_gdb_scripts and
.debug_str_offsets, but we want to strip .debug_gnu_pubnames and
.debug_gnu_pubtypes.
When using --strip-debug-non-line, we want to keep .debug_str_offsets
(a new section in DWARF v5, not yet used in any .o files). I've added
the other sections, commented out, to the list for completeness.
-cary
2014-11-26 Cary Coutant <ccoutant@google.com>
gold/
* layout.cc (gdb_sections): Keep .debug_gdb_scripts and
.debug_str_offsets; strip .debug_gnu_pubnames and
.debug_gnu_pubtypes.
(lines_only_debug_sections): Strip all four new sections.
diff --git a/gold/layout.cc b/gold/layout.cc
index 7cbbe39..4e60f8e 100644
--- a/gold/layout.cc
+++ b/gold/layout.cc
@@ -524,6 +524,7 @@ static const char* gdb_sections[] =
"addr", // Fission extension
// "aranges", // not used by gdb as of 7.4
"frame",
+ "gdb_scripts",
"info",
"types",
"line",
@@ -532,8 +533,11 @@ static const char* gdb_sections[] =
"macro",
// "pubnames", // not used by gdb as of 7.4
// "pubtypes", // not used by gdb as of 7.4
+ // "gnu_pubnames", // Fission extension
+ // "gnu_pubtypes", // Fission extension
"ranges",
"str",
+ "str_offsets",
};
// This is the minimum set of sections needed for line numbers.
@@ -544,6 +548,7 @@ static const char* lines_only_debug_sections[] =
// "addr", // Fission extension
// "aranges", // not used by gdb as of 7.4
// "frame",
+ // "gdb_scripts",
"info",
// "types",
"line",
@@ -552,8 +557,11 @@ static const char* lines_only_debug_sections[] =
// "macro",
// "pubnames", // not used by gdb as of 7.4
// "pubtypes", // not used by gdb as of 7.4
+ // "gnu_pubnames", // Fission extension
+ // "gnu_pubtypes", // Fission extension
// "ranges",
"str",
+ "str_offsets", // Fission extension
};
// These sections are the DWARF fast-lookup tables, and are not needed