Skip to content

Commit 4409d2f

Browse files
keesingomolnar
authored andcommitted
arm/boot: Warn on orphan section placement
We don't want to depend on the linker's orphan section placement heuristics as these can vary between linkers, and may change between versions. All sections need to be explicitly handled in the linker script. With all sections now handled, enable orphan section warning. Signed-off-by: Kees Cook <keescook@chromium.org> Signed-off-by: Ingo Molnar <mingo@kernel.org> Reviewed-by: Nick Desaulniers <ndesaulniers@google.com> Link: https://lore.kernel.org/r/20200902025347.2504702-4-keescook@chromium.org
1 parent 5a17850 commit 4409d2f

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

arch/arm/boot/compressed/Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,8 @@ endif
123123
LDFLAGS_vmlinux += --no-undefined
124124
# Delete all temporary local symbols
125125
LDFLAGS_vmlinux += -X
126+
# Report orphan sections
127+
LDFLAGS_vmlinux += $(call ld-option, --orphan-handling=warn)
126128
# Next argument is a linker script
127129
LDFLAGS_vmlinux += -T
128130

0 commit comments

Comments
 (0)