Skip to content

Commit 3b14aef

Browse files
keesingomolnar
authored andcommitted
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
1 parent d7e3b06 commit 3b14aef

3 files changed

Lines changed: 6 additions & 2 deletions

File tree

arch/arm/include/asm/vmlinux.lds.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,10 @@
5252
ARM_MMU_DISCARD(*(__ex_table)) \
5353
COMMON_DISCARDS
5454

55+
#define ARM_DETAILS \
56+
ELF_DETAILS \
57+
.ARM.attributes 0 : { *(.ARM.attributes) }
58+
5559
#define ARM_STUBS_TEXT \
5660
*(.gnu.warning) \
5761
*(.glue_7) \

arch/arm/kernel/vmlinux-xip.lds.S

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ SECTIONS
150150
_end = .;
151151

152152
STABS_DEBUG
153-
ELF_DETAILS
153+
ARM_DETAILS
154154
}
155155

156156
/*

arch/arm/kernel/vmlinux.lds.S

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ SECTIONS
149149
_end = .;
150150

151151
STABS_DEBUG
152-
ELF_DETAILS
152+
ARM_DETAILS
153153
}
154154

155155
#ifdef CONFIG_STRICT_KERNEL_RWX

0 commit comments

Comments
 (0)