VisionFive2 Linux kernel

StarFive Tech Linux Kernel for VisionFive (JH7110) boards (mirror)

More than 9999 Commits   32 Branches   54 Tags
author: Nathan Chancellor <natechancellor@gmail.com> 2020-11-19 13:46:56 -0700 committer: Masahiro Yamada <masahiroy@kernel.org> 2020-12-01 22:45:36 +0900 commit: 59612b24f78a0b61fe078ec9dff2e48e9cec52c0 parent: b8a9092330da2030496ff357272f342eb970d51b
Commit Summary:
kbuild: Hoist '--orphan-handling' into Kconfig
Diffstat:
1 file changed, 6 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index ae1592c1f5d6..8327725e5d76 100644
--- a/Makefile
+++ b/Makefile
@@ -986,6 +986,12 @@ ifeq ($(CONFIG_RELR),y)
 LDFLAGS_vmlinux	+= --pack-dyn-relocs=relr
 endif
 
+# We never want expected sections to be placed heuristically by the
+# linker. All sections should be explicitly named in the linker script.
+ifdef CONFIG_LD_ORPHAN_WARN
+LDFLAGS_vmlinux += --orphan-handling=warn
+endif
+
 # Align the bit size of userspace programs with the kernel
 KBUILD_USERCFLAGS  += $(filter -m32 -m64 --target=%, $(KBUILD_CFLAGS))
 KBUILD_USERLDFLAGS += $(filter -m32 -m64 --target=%, $(KBUILD_CFLAGS))