[PATCH] Add DWARF v5 sections and v4 .debug_types
Fangrui Song
maskray@google.com
Sat Jan 23 22:14:37 GMT 2021
PR ld/27230
* scripttempl/DWARF.sc: Add .debug_* sections.
---
ld/ChangeLog | 5 +++++
ld/scripttempl/DWARF.sc | 13 +++++++++++--
2 files changed, 16 insertions(+), 2 deletions(-)
diff --git a/ld/ChangeLog b/ld/ChangeLog
index 24adeff5fce..ac9bf1229d6 100644
--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -1,3 +1,8 @@
+2021-01-23 Fangrui Song <maskray@google.com>
+
+ PR ld/27230
+ * scripttempl/DWARF.sc: Add .debug_* sections.
+
2021-01-21 Alan Modra <amodra@gmail.com>
* testsuite/ld-elf/pr26936.d: No longer xfail mips.
diff --git a/ld/scripttempl/DWARF.sc b/ld/scripttempl/DWARF.sc
index 37c14caa36e..fe808bd93b0 100644
--- a/ld/scripttempl/DWARF.sc
+++ b/ld/scripttempl/DWARF.sc
@@ -40,7 +40,16 @@ cat <<EOF
.debug_pubtypes 0 : { *(.debug_pubtypes) }
.debug_ranges 0 : { *(.debug_ranges) }
- /* DWARF Extension. */
- .debug_macro 0 : { *(.debug_macro) }
+ /* DWARF version 4 */
+ .debug_types 0 : { *(.debug_types) }
+
+ /* DWARF version 5 */
.debug_addr 0 : { *(.debug_addr) }
+ .debug_line_str 0 : { *(.debug_line_str) }
+ .debug_loclists 0 : { *(.debug_loclists) }
+ .debug_macro 0 : { *(.debug_macro) }
+ .debug_names 0 : { *(.debug_names) }
+ .debug_rnglists 0 : { *(.debug_rnglists) }
+ .debug_str_offsets 0 : { *(.debug_str_offsets) }
+ .debug_sup 0 : { *(.debug_sup) }
EOF
--
2.30.0.280.ga3ce27912f-goog
More information about the Binutils
mailing list