diff options
author | Kees Cook <keescook@chromium.org> | 2020-09-02 05:53:43 +0300 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2020-09-03 11:28:35 +0300 |
commit | b3e5d80d0c48c0cc7bce56473672f4e6e1210910 (patch) | |
tree | 09dcae6063d2212f18c6807464f93e3f92a669ce /arch/arm64/Makefile | |
parent | 414d2ff5e5f21049b6b242271a6a8579f9dffc1b (diff) | |
download | linux-b3e5d80d0c48c0cc7bce56473672f4e6e1210910.tar.xz |
arm64/build: 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 warnings.
Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Acked-by: Will Deacon <will@kernel.org>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Link: https://lore.kernel.org/r/20200902025347.2504702-2-keescook@chromium.org
Diffstat (limited to 'arch/arm64/Makefile')
-rw-r--r-- | arch/arm64/Makefile | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/arm64/Makefile b/arch/arm64/Makefile index 6de7f551b821..081144fcc3da 100644 --- a/arch/arm64/Makefile +++ b/arch/arm64/Makefile @@ -29,6 +29,10 @@ LDFLAGS_vmlinux += --fix-cortex-a53-843419 endif endif +# We never want expected sections to be placed heuristically by the +# linker. All sections should be explicitly named in the linker script. +LDFLAGS_vmlinux += $(call ld-option, --orphan-handling=warn) + ifeq ($(CONFIG_ARM64_USE_LSE_ATOMICS), y) ifneq ($(CONFIG_ARM64_LSE_ATOMICS), y) $(warning LSE atomics not supported by binutils) |