summaryrefslogtreecommitdiffstats
path: root/arch/arm/include
diff options
context:
space:
mode:
authorKees Cook <keescook@chromium.org>2020-08-21 21:42:57 +0200
committerIngo Molnar <mingo@kernel.org>2020-09-01 10:03:18 +0200
commit3b14aefb84320ac430cecbdc87b680317916b2bd (patch)
tree7794b35b87f541829a72ac4aeddaa94c1ab68d45 /arch/arm/include
parentarm/build: Refactor linker script headers (diff)
downloadlinux-3b14aefb84320ac430cecbdc87b680317916b2bd.tar.xz
linux-3b14aefb84320ac430cecbdc87b680317916b2bd.zip
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/D85867 Suggested-by: Nick Desaulniers <ndesaulniers@google.com> Signed-off-by: Kees Cook <keescook@chromium.org> Signed-off-by: Ingo Molnar <mingo@kernel.org> Reviewed-by: Fangrui 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
Diffstat (limited to 'arch/arm/include')
-rw-r--r--arch/arm/include/asm/vmlinux.lds.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/arm/include/asm/vmlinux.lds.h b/arch/arm/include/asm/vmlinux.lds.h
index a08f4301b718..c4af5182ab48 100644
--- a/arch/arm/include/asm/vmlinux.lds.h
+++ b/arch/arm/include/asm/vmlinux.lds.h
@@ -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) \