Skip to content

Commit 4409d2f

Browse files
keesIngo Molnar
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 <[email protected]> Signed-off-by: Ingo Molnar <[email protected]> Reviewed-by: Nick Desaulniers <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 5a17850 commit 4409d2f

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

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)