Revert "kbuild: Check if linker supports the -X option"
authorMasahiro Yamada <masahiroy@kernel.org>
Thu, 29 Sep 2022 18:12:23 +0000 (03:12 +0900)
committerMasahiro Yamada <masahiroy@kernel.org>
Sun, 2 Oct 2022 18:52:58 +0000 (03:52 +0900)
This reverts commit d79a27195a33f4b5e591de5536799ad874ea6cf5.

According to the commit description, this ld-option test was added for
the gold linker at that time.

Commit 75959d44f9dc ("kbuild: Fail if gold linker is detected") gave
up the gold linker support after all.

I tested the BFD linker from binutils 2.23 and LLD from LLVM 11.0.0.
Both of them support the -X option.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Reviewed-by: Nathan Chancellor <nathan@kernel.org>
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Makefile

index f10a27c09d886d065deff761ad0524b48e15fc79..d7ba05191470326d43adcc8fc04cf9facbecf491 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1037,7 +1037,7 @@ KBUILD_LDFLAGS    += $(call ld-option,--no-warn-rwx-segments)
 endif
 
 ifeq ($(CONFIG_STRIP_ASM_SYMS),y)
-LDFLAGS_vmlinux        += $(call ld-option, -X,)
+LDFLAGS_vmlinux        += -X
 endif
 
 ifeq ($(CONFIG_RELR),y)