Skip to content

Commit 2883352

Browse files
keesingomolnar
authored andcommitted
arm64/build: Use common DISCARDS in linker script
Use the common DISCARDS rule for the linker script in an effort to regularize the linker script to prepare for warning on orphaned sections. Additionally clean up left-over no-op macros. Signed-off-by: Kees Cook <keescook@chromium.org> Signed-off-by: Ingo Molnar <mingo@kernel.org> Acked-by: Will Deacon <will@kernel.org> Link: https://lore.kernel.org/r/20200821194310.3089815-12-keescook@chromium.org
1 parent 6e0a66d commit 2883352

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

arch/arm64/kernel/vmlinux.lds.S

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
*/
77

88
#define RO_EXCEPTION_TABLE_ALIGN 8
9+
#define RUNTIME_DISCARD_EXIT
910

1011
#include <asm-generic/vmlinux.lds.h>
1112
#include <asm/cache.h>
@@ -88,10 +89,8 @@ SECTIONS
8889
* matching the same input section name. There is no documented
8990
* order of matching.
9091
*/
92+
DISCARDS
9193
/DISCARD/ : {
92-
EXIT_CALL
93-
*(.discard)
94-
*(.discard.*)
9594
*(.interp .dynamic)
9695
*(.dynsym .dynstr .hash .gnu.hash)
9796
}

0 commit comments

Comments
 (0)