mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] Revert "kbuild: Check if linker supports the -X option"
@ 2022-09-29 18:12 Masahiro Yamada
  2022-09-29 18:17 ` Nick Desaulniers
  2022-09-29 18:17 ` Nathan Chancellor
  0 siblings, 2 replies; 3+ messages in thread
From: Masahiro Yamada @ 2022-09-29 18:12 UTC (permalink / raw)
  To: linux-kbuild
  Cc: linux-kernel, Masahiro Yamada, Michal Marek, Nathan Chancellor,
	Nick Desaulniers, Tom Rix, llvm

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>
---

 Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index 49dcae886c48..d7c85ec79000 100644
--- 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)
-- 
2.34.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] Revert "kbuild: Check if linker supports the -X option"
  2022-09-29 18:12 [PATCH] Revert "kbuild: Check if linker supports the -X option" Masahiro Yamada
@ 2022-09-29 18:17 ` Nick Desaulniers
  2022-09-29 18:17 ` Nathan Chancellor
  1 sibling, 0 replies; 3+ messages in thread
From: Nick Desaulniers @ 2022-09-29 18:17 UTC (permalink / raw)
  To: Masahiro Yamada
  Cc: linux-kbuild, linux-kernel, Michal Marek, Nathan Chancellor,
	Tom Rix, llvm

On Thu, Sep 29, 2022 at 11:13 AM Masahiro Yamada <masahiroy@kernel.org> wrote:
>
> 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>

Thanks for the patch!
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>

> ---
>
>  Makefile | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/Makefile b/Makefile
> index 49dcae886c48..d7c85ec79000 100644
> --- 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)
> --
> 2.34.1
>


-- 
Thanks,
~Nick Desaulniers

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] Revert "kbuild: Check if linker supports the -X option"
  2022-09-29 18:12 [PATCH] Revert "kbuild: Check if linker supports the -X option" Masahiro Yamada
  2022-09-29 18:17 ` Nick Desaulniers
@ 2022-09-29 18:17 ` Nathan Chancellor
  1 sibling, 0 replies; 3+ messages in thread
From: Nathan Chancellor @ 2022-09-29 18:17 UTC (permalink / raw)
  To: Masahiro Yamada
  Cc: linux-kbuild, linux-kernel, Michal Marek, Nick Desaulniers,
	Tom Rix, llvm

On Fri, Sep 30, 2022 at 03:12:23AM +0900, Masahiro Yamada wrote:
> 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: Nathan Chancellor <nathan@kernel.org>

> ---
> 
>  Makefile | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/Makefile b/Makefile
> index 49dcae886c48..d7c85ec79000 100644
> --- 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)
> -- 
> 2.34.1
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-09-29 18:18 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-29 18:12 [PATCH] Revert "kbuild: Check if linker supports the -X option" Masahiro Yamada
2022-09-29 18:17 ` Nick Desaulniers
2022-09-29 18:17 ` Nathan Chancellor

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®