Skip to content

Commit 3c4fa46

Browse files
nickdesaulniersmasahir0y
authored andcommitted
vmlinux.lds.h: add DWARF v5 sections
We expect toolchains to produce these new debug info sections as part of DWARF v5. Add explicit placements to prevent the linker warnings from --orphan-section=warn. Compilers may produce such sections with explicit -gdwarf-5, or based on the implicit default version of DWARF when -g is used via DEBUG_INFO. This implicit default changes over time, and has changed to DWARF v5 with GCC 11. .debug_sup was mentioned in review, but without compilers producing it today, let's wait to add it until it becomes necessary. Cc: [email protected] Link: https://bugzilla.redhat.com/show_bug.cgi?id=1922707 Reported-by: Chris Murphy <[email protected]> Suggested-by: Fangrui Song <[email protected]> Reviewed-by: Nathan Chancellor <[email protected]> Reviewed-by: Mark Wielaard <[email protected]> Tested-by: Sedat Dilek <[email protected]> Signed-off-by: Nick Desaulniers <[email protected]> Signed-off-by: Masahiro Yamada <[email protected]>
1 parent 1c3fae7 commit 3c4fa46

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

include/asm-generic/vmlinux.lds.h

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -828,8 +828,13 @@
828828
/* DWARF 4 */ \
829829
.debug_types 0 : { *(.debug_types) } \
830830
/* DWARF 5 */ \
831+
.debug_addr 0 : { *(.debug_addr) } \
832+
.debug_line_str 0 : { *(.debug_line_str) } \
833+
.debug_loclists 0 : { *(.debug_loclists) } \
831834
.debug_macro 0 : { *(.debug_macro) } \
832-
.debug_addr 0 : { *(.debug_addr) }
835+
.debug_names 0 : { *(.debug_names) } \
836+
.debug_rnglists 0 : { *(.debug_rnglists) } \
837+
.debug_str_offsets 0 : { *(.debug_str_offsets) }
833838

834839
/* Stabs debugging sections. */
835840
#define STABS_DEBUG \

0 commit comments

Comments
 (0)