Commit 3b14aefb authored by Kees Cook's avatar Kees Cook Committed by Ingo Molnar

arm/build: Explicitly keep .ARM.attributes sections

In preparation for adding --orphan-handling=warn, explicitly keep the
.ARM.attributes section (at address 0[1]) by expanding the existing
ELF_DETAILS macro into ARM_DETAILS.

[1] https://reviews.llvm.org/D85867Suggested-by: default avatarNick Desaulniers <ndesaulniers@google.com>
Signed-off-by: default avatarKees Cook <keescook@chromium.org>
Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
Reviewed-by: default avatarFangrui Song <maskray@google.com>
Cc: Russell King <linux@armlinux.org.uk>
Link: https://lore.kernel.org/lkml/CAKwvOdk-racgq5pxsoGS6Vtifbtrk5fmkmnoLxrQMaOvV0nPWw@mail.gmail.com/
Link: https://lore.kernel.org/r/20200821194310.3089815-17-keescook@chromium.org
parent d7e3b065
......@@ -52,6 +52,10 @@
ARM_MMU_DISCARD(*(__ex_table)) \
COMMON_DISCARDS
#define ARM_DETAILS \
ELF_DETAILS \
.ARM.attributes 0 : { *(.ARM.attributes) }
#define ARM_STUBS_TEXT \
*(.gnu.warning) \
*(.glue_7) \
......
......@@ -150,7 +150,7 @@ SECTIONS
_end = .;
STABS_DEBUG
ELF_DETAILS
ARM_DETAILS
}
/*
......
......@@ -149,7 +149,7 @@ SECTIONS
_end = .;
STABS_DEBUG
ELF_DETAILS
ARM_DETAILS
}
#ifdef CONFIG_STRICT_KERNEL_RWX
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment