vmlinux.lds.h: Split ELF_DETAILS from STABS_DEBUG
The .comment section doesn't belong in STABS_DEBUG. Split it out into a new macro named ELF_DETAILS. This will gain other non-debug sections that need to be accounted for when linking with --orphan-handling=warn. Signed-off-by: Kees Cook <keescook@chromium.org> Signed-off-by: Ingo Molnar <mingo@kernel.org> Cc: linux-arch@vger.kernel.org Link: https://lore.kernel.org/r/20200821194310.3089815-5-keescook@chromium.org
This commit is contained in:
parent
d812db7828
commit
c604abc3f6
|
@ -72,6 +72,7 @@ SECTIONS
|
|||
|
||||
STABS_DEBUG
|
||||
DWARF_DEBUG
|
||||
ELF_DETAILS
|
||||
|
||||
DISCARDS
|
||||
}
|
||||
|
|
|
@ -122,6 +122,7 @@ SECTIONS
|
|||
_end = . ;
|
||||
|
||||
STABS_DEBUG
|
||||
ELF_DETAILS
|
||||
DISCARDS
|
||||
|
||||
.arcextmap 0 : {
|
||||
|
|
|
@ -152,6 +152,7 @@ SECTIONS
|
|||
_end = .;
|
||||
|
||||
STABS_DEBUG
|
||||
ELF_DETAILS
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -151,6 +151,7 @@ SECTIONS
|
|||
_end = .;
|
||||
|
||||
STABS_DEBUG
|
||||
ELF_DETAILS
|
||||
}
|
||||
|
||||
#ifdef CONFIG_STRICT_KERNEL_RWX
|
||||
|
|
|
@ -241,6 +241,7 @@ SECTIONS
|
|||
_end = .;
|
||||
|
||||
STABS_DEBUG
|
||||
ELF_DETAILS
|
||||
|
||||
HEAD_SYMBOLS
|
||||
}
|
||||
|
|
|
@ -109,6 +109,7 @@ SECTIONS
|
|||
|
||||
STABS_DEBUG
|
||||
DWARF_DEBUG
|
||||
ELF_DETAILS
|
||||
|
||||
DISCARDS
|
||||
}
|
||||
|
|
|
@ -67,5 +67,6 @@ SECTIONS
|
|||
|
||||
STABS_DEBUG
|
||||
DWARF_DEBUG
|
||||
ELF_DETAILS
|
||||
|
||||
}
|
||||
|
|
|
@ -218,6 +218,7 @@ SECTIONS {
|
|||
|
||||
STABS_DEBUG
|
||||
DWARF_DEBUG
|
||||
ELF_DETAILS
|
||||
|
||||
/* Default discards */
|
||||
DISCARDS
|
||||
|
|
|
@ -202,6 +202,7 @@ SECTIONS
|
|||
|
||||
STABS_DEBUG
|
||||
DWARF_DEBUG
|
||||
ELF_DETAILS
|
||||
|
||||
/* These must appear regardless of . */
|
||||
.gptab.sdata : {
|
||||
|
|
|
@ -64,6 +64,7 @@ SECTIONS
|
|||
|
||||
STABS_DEBUG
|
||||
DWARF_DEBUG
|
||||
ELF_DETAILS
|
||||
|
||||
DISCARDS
|
||||
}
|
||||
|
|
|
@ -58,6 +58,7 @@ SECTIONS
|
|||
|
||||
STABS_DEBUG
|
||||
DWARF_DEBUG
|
||||
ELF_DETAILS
|
||||
|
||||
DISCARDS
|
||||
}
|
||||
|
|
|
@ -115,6 +115,7 @@ SECTIONS
|
|||
/* Throw in the debugging sections */
|
||||
STABS_DEBUG
|
||||
DWARF_DEBUG
|
||||
ELF_DETAILS
|
||||
|
||||
/* Sections to be discarded -- must be last */
|
||||
DISCARDS
|
||||
|
|
|
@ -84,6 +84,7 @@ SECTIONS
|
|||
}
|
||||
|
||||
STABS_DEBUG
|
||||
ELF_DETAILS
|
||||
.note 0 : { *(.note) }
|
||||
|
||||
/* Sections to be discarded */
|
||||
|
|
|
@ -164,6 +164,7 @@ SECTIONS
|
|||
_end = . ;
|
||||
|
||||
STABS_DEBUG
|
||||
ELF_DETAILS
|
||||
.note 0 : { *(.note) }
|
||||
|
||||
/* Sections to be discarded */
|
||||
|
|
|
@ -360,8 +360,8 @@ SECTIONS
|
|||
PROVIDE32 (end = .);
|
||||
|
||||
STABS_DEBUG
|
||||
|
||||
DWARF_DEBUG
|
||||
ELF_DETAILS
|
||||
|
||||
DISCARDS
|
||||
/DISCARD/ : {
|
||||
|
|
|
@ -97,6 +97,7 @@ SECTIONS
|
|||
|
||||
STABS_DEBUG
|
||||
DWARF_DEBUG
|
||||
ELF_DETAILS
|
||||
|
||||
DISCARDS
|
||||
}
|
||||
|
|
|
@ -181,6 +181,7 @@ SECTIONS
|
|||
/* Debugging sections. */
|
||||
STABS_DEBUG
|
||||
DWARF_DEBUG
|
||||
ELF_DETAILS
|
||||
|
||||
/* Sections to be discarded */
|
||||
DISCARDS
|
||||
|
|
|
@ -76,6 +76,7 @@ SECTIONS
|
|||
|
||||
STABS_DEBUG
|
||||
DWARF_DEBUG
|
||||
ELF_DETAILS
|
||||
|
||||
DISCARDS
|
||||
}
|
||||
|
|
|
@ -187,6 +187,7 @@ SECTIONS
|
|||
|
||||
STABS_DEBUG
|
||||
DWARF_DEBUG
|
||||
ELF_DETAILS
|
||||
|
||||
DISCARDS
|
||||
}
|
||||
|
|
|
@ -164,8 +164,8 @@ SECTIONS
|
|||
PROVIDE (end = .);
|
||||
|
||||
STABS_DEBUG
|
||||
|
||||
DWARF_DEBUG
|
||||
ELF_DETAILS
|
||||
|
||||
DISCARDS
|
||||
}
|
||||
|
|
|
@ -108,8 +108,8 @@ SECTIONS
|
|||
PROVIDE (end = .);
|
||||
|
||||
STABS_DEBUG
|
||||
|
||||
DWARF_DEBUG
|
||||
ELF_DETAILS
|
||||
|
||||
DISCARDS
|
||||
}
|
||||
|
|
|
@ -82,6 +82,8 @@ SECTIONS
|
|||
. = ALIGN(PAGE_SIZE); /* keep ZO size page aligned */
|
||||
_end = .;
|
||||
|
||||
ELF_DETAILS
|
||||
|
||||
DISCARDS
|
||||
}
|
||||
|
||||
|
|
|
@ -411,6 +411,7 @@ SECTIONS
|
|||
|
||||
STABS_DEBUG
|
||||
DWARF_DEBUG
|
||||
ELF_DETAILS
|
||||
|
||||
DISCARDS
|
||||
}
|
||||
|
|
|
@ -34,6 +34,7 @@
|
|||
*
|
||||
* STABS_DEBUG
|
||||
* DWARF_DEBUG
|
||||
* ELF_DETAILS
|
||||
*
|
||||
* DISCARDS // must be the last
|
||||
* }
|
||||
|
@ -811,14 +812,17 @@
|
|||
.debug_macro 0 : { *(.debug_macro) } \
|
||||
.debug_addr 0 : { *(.debug_addr) }
|
||||
|
||||
/* Stabs debugging sections. */
|
||||
/* Stabs debugging sections. */
|
||||
#define STABS_DEBUG \
|
||||
.stab 0 : { *(.stab) } \
|
||||
.stabstr 0 : { *(.stabstr) } \
|
||||
.stab.excl 0 : { *(.stab.excl) } \
|
||||
.stab.exclstr 0 : { *(.stab.exclstr) } \
|
||||
.stab.index 0 : { *(.stab.index) } \
|
||||
.stab.indexstr 0 : { *(.stab.indexstr) } \
|
||||
.stab.indexstr 0 : { *(.stab.indexstr) }
|
||||
|
||||
/* Required sections not related to debugging. */
|
||||
#define ELF_DETAILS \
|
||||
.comment 0 : { *(.comment) }
|
||||
|
||||
#ifdef CONFIG_GENERIC_BUG
|
||||
|
|
Loading…
Reference in New Issue