* [PATCH v2] riscv: fix vdso build with lld
@ 2020-04-15 14:29 ` Ilie Halip
0 siblings, 0 replies; 6+ messages in thread
From: Ilie Halip @ 2020-04-15 14:29 UTC (permalink / raw)
To: linux-riscv
Cc: Fangrui Song, Jordan Rupprecht, Ilie Halip, Paul Walmsley,
Palmer Dabbelt, Albert Ou, Nick Desaulniers, Greg Kroah-Hartman,
Thomas Gleixner, Mao Han, linux-kernel, clang-built-linux
When building with the LLVM linker this error occurrs:
LD arch/riscv/kernel/vdso/vdso-syms.o
ld.lld: error: no input files
This happens because the lld treats -R as an alias to -rpath, as opposed
to ld where -R means --just-symbols.
Use the long option name for compatibility between the two.
Link: https://github.com/ClangBuiltLinux/linux/issues/805
Reported-by: Dmitry Golovin <dima@golovin.in>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Ilie Halip <ilie.halip@gmail.com>
---
Changed in v2:
* a comment line dropped, another one slightly reworded
* added Nick's Reviewed-by
---
arch/riscv/kernel/vdso/Makefile | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/arch/riscv/kernel/vdso/Makefile b/arch/riscv/kernel/vdso/Makefile
index 33b16f4212f7..a4ee3a0e7d20 100644
--- a/arch/riscv/kernel/vdso/Makefile
+++ b/arch/riscv/kernel/vdso/Makefile
@@ -33,15 +33,15 @@ $(obj)/vdso.so.dbg: $(src)/vdso.lds $(obj-vdso) FORCE
$(call if_changed,vdsold)
# We also create a special relocatable object that should mirror the symbol
-# table and layout of the linked DSO. With ld -R we can then refer to
-# these symbols in the kernel code rather than hand-coded addresses.
+# table and layout of the linked DSO. With ld --just-symbols we can then
+# refer to these symbols in the kernel code rather than hand-coded addresses.
SYSCFLAGS_vdso.so.dbg = -shared -s -Wl,-soname=linux-vdso.so.1 \
-Wl,--build-id -Wl,--hash-style=both
$(obj)/vdso-dummy.o: $(src)/vdso.lds $(obj)/rt_sigreturn.o FORCE
$(call if_changed,vdsold)
-LDFLAGS_vdso-syms.o := -r -R
+LDFLAGS_vdso-syms.o := -r --just-symbols
$(obj)/vdso-syms.o: $(obj)/vdso-dummy.o FORCE
$(call if_changed,ld)
--
2.17.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH v2] riscv: fix vdso build with lld
@ 2020-04-15 14:29 ` Ilie Halip
0 siblings, 0 replies; 6+ messages in thread
From: Ilie Halip @ 2020-04-15 14:29 UTC (permalink / raw)
To: linux-riscv
Cc: Albert Ou, Fangrui Song, Greg Kroah-Hartman, Ilie Halip,
Jordan Rupprecht, Nick Desaulniers, linux-kernel,
clang-built-linux, Palmer Dabbelt, Paul Walmsley,
Thomas Gleixner, Mao Han
When building with the LLVM linker this error occurrs:
LD arch/riscv/kernel/vdso/vdso-syms.o
ld.lld: error: no input files
This happens because the lld treats -R as an alias to -rpath, as opposed
to ld where -R means --just-symbols.
Use the long option name for compatibility between the two.
Link: https://github.com/ClangBuiltLinux/linux/issues/805
Reported-by: Dmitry Golovin <dima@golovin.in>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Ilie Halip <ilie.halip@gmail.com>
---
Changed in v2:
* a comment line dropped, another one slightly reworded
* added Nick's Reviewed-by
---
arch/riscv/kernel/vdso/Makefile | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/arch/riscv/kernel/vdso/Makefile b/arch/riscv/kernel/vdso/Makefile
index 33b16f4212f7..a4ee3a0e7d20 100644
--- a/arch/riscv/kernel/vdso/Makefile
+++ b/arch/riscv/kernel/vdso/Makefile
@@ -33,15 +33,15 @@ $(obj)/vdso.so.dbg: $(src)/vdso.lds $(obj-vdso) FORCE
$(call if_changed,vdsold)
# We also create a special relocatable object that should mirror the symbol
-# table and layout of the linked DSO. With ld -R we can then refer to
-# these symbols in the kernel code rather than hand-coded addresses.
+# table and layout of the linked DSO. With ld --just-symbols we can then
+# refer to these symbols in the kernel code rather than hand-coded addresses.
SYSCFLAGS_vdso.so.dbg = -shared -s -Wl,-soname=linux-vdso.so.1 \
-Wl,--build-id -Wl,--hash-style=both
$(obj)/vdso-dummy.o: $(src)/vdso.lds $(obj)/rt_sigreturn.o FORCE
$(call if_changed,vdsold)
-LDFLAGS_vdso-syms.o := -r -R
+LDFLAGS_vdso-syms.o := -r --just-symbols
$(obj)/vdso-syms.o: $(obj)/vdso-dummy.o FORCE
$(call if_changed,ld)
--
2.17.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH v2] riscv: fix vdso build with lld
2020-04-15 14:29 ` Ilie Halip
@ 2020-04-15 14:42 ` Fangrui Song
-1 siblings, 0 replies; 6+ messages in thread
From: Fangrui Song @ 2020-04-15 14:42 UTC (permalink / raw)
To: Ilie Halip
Cc: linux-riscv, Jordan Rupprecht, Paul Walmsley, Palmer Dabbelt,
Albert Ou, Nick Desaulniers, Greg Kroah-Hartman, Thomas Gleixner,
Mao Han, linux-kernel, clang-built-linux
On 2020-04-15, Ilie Halip wrote:
>When building with the LLVM linker this error occurrs:
> LD arch/riscv/kernel/vdso/vdso-syms.o
> ld.lld: error: no input files
>
>This happens because the lld treats -R as an alias to -rpath, as opposed
>to ld where -R means --just-symbols.
>
>Use the long option name for compatibility between the two.
>
>Link: https://github.com/ClangBuiltLinux/linux/issues/805
>Reported-by: Dmitry Golovin <dima@golovin.in>
>Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
>Signed-off-by: Ilie Halip <ilie.halip@gmail.com>
>
>---
>Changed in v2:
> * a comment line dropped, another one slightly reworded
> * added Nick's Reviewed-by
>---
> arch/riscv/kernel/vdso/Makefile | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
>diff --git a/arch/riscv/kernel/vdso/Makefile b/arch/riscv/kernel/vdso/Makefile
>index 33b16f4212f7..a4ee3a0e7d20 100644
>--- a/arch/riscv/kernel/vdso/Makefile
>+++ b/arch/riscv/kernel/vdso/Makefile
>@@ -33,15 +33,15 @@ $(obj)/vdso.so.dbg: $(src)/vdso.lds $(obj-vdso) FORCE
> $(call if_changed,vdsold)
>
> # We also create a special relocatable object that should mirror the symbol
>-# table and layout of the linked DSO. With ld -R we can then refer to
>-# these symbols in the kernel code rather than hand-coded addresses.
>+# table and layout of the linked DSO. With ld --just-symbols we can then
>+# refer to these symbols in the kernel code rather than hand-coded addresses.
>
> SYSCFLAGS_vdso.so.dbg = -shared -s -Wl,-soname=linux-vdso.so.1 \
> -Wl,--build-id -Wl,--hash-style=both
> $(obj)/vdso-dummy.o: $(src)/vdso.lds $(obj)/rt_sigreturn.o FORCE
> $(call if_changed,vdsold)
>
>-LDFLAGS_vdso-syms.o := -r -R
>+LDFLAGS_vdso-syms.o := -r --just-symbols
> $(obj)/vdso-syms.o: $(obj)/vdso-dummy.o FORCE
> $(call if_changed,ld)
>
>--
>2.17.1
https://lore.kernel.org/linux-riscv/20200402175354.pzhzhumlqsjk66nu@google.com/
Reviewed-by: Fangrui Song <maskray@google.com>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v2] riscv: fix vdso build with lld
@ 2020-04-15 14:42 ` Fangrui Song
0 siblings, 0 replies; 6+ messages in thread
From: Fangrui Song @ 2020-04-15 14:42 UTC (permalink / raw)
To: Ilie Halip
Cc: Albert Ou, Greg Kroah-Hartman, Jordan Rupprecht,
Nick Desaulniers, linux-kernel, clang-built-linux,
Palmer Dabbelt, Paul Walmsley, linux-riscv, Thomas Gleixner,
Mao Han
On 2020-04-15, Ilie Halip wrote:
>When building with the LLVM linker this error occurrs:
> LD arch/riscv/kernel/vdso/vdso-syms.o
> ld.lld: error: no input files
>
>This happens because the lld treats -R as an alias to -rpath, as opposed
>to ld where -R means --just-symbols.
>
>Use the long option name for compatibility between the two.
>
>Link: https://github.com/ClangBuiltLinux/linux/issues/805
>Reported-by: Dmitry Golovin <dima@golovin.in>
>Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
>Signed-off-by: Ilie Halip <ilie.halip@gmail.com>
>
>---
>Changed in v2:
> * a comment line dropped, another one slightly reworded
> * added Nick's Reviewed-by
>---
> arch/riscv/kernel/vdso/Makefile | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
>diff --git a/arch/riscv/kernel/vdso/Makefile b/arch/riscv/kernel/vdso/Makefile
>index 33b16f4212f7..a4ee3a0e7d20 100644
>--- a/arch/riscv/kernel/vdso/Makefile
>+++ b/arch/riscv/kernel/vdso/Makefile
>@@ -33,15 +33,15 @@ $(obj)/vdso.so.dbg: $(src)/vdso.lds $(obj-vdso) FORCE
> $(call if_changed,vdsold)
>
> # We also create a special relocatable object that should mirror the symbol
>-# table and layout of the linked DSO. With ld -R we can then refer to
>-# these symbols in the kernel code rather than hand-coded addresses.
>+# table and layout of the linked DSO. With ld --just-symbols we can then
>+# refer to these symbols in the kernel code rather than hand-coded addresses.
>
> SYSCFLAGS_vdso.so.dbg = -shared -s -Wl,-soname=linux-vdso.so.1 \
> -Wl,--build-id -Wl,--hash-style=both
> $(obj)/vdso-dummy.o: $(src)/vdso.lds $(obj)/rt_sigreturn.o FORCE
> $(call if_changed,vdsold)
>
>-LDFLAGS_vdso-syms.o := -r -R
>+LDFLAGS_vdso-syms.o := -r --just-symbols
> $(obj)/vdso-syms.o: $(obj)/vdso-dummy.o FORCE
> $(call if_changed,ld)
>
>--
>2.17.1
https://lore.kernel.org/linux-riscv/20200402175354.pzhzhumlqsjk66nu@google.com/
Reviewed-by: Fangrui Song <maskray@google.com>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v2] riscv: fix vdso build with lld
2020-04-15 14:29 ` Ilie Halip
@ 2020-04-21 22:24 ` Palmer Dabbelt
-1 siblings, 0 replies; 6+ messages in thread
From: Palmer Dabbelt @ 2020-04-21 22:24 UTC (permalink / raw)
To: ilie.halip
Cc: linux-riscv, maskray, rupprecht, ilie.halip, Paul Walmsley, aou,
Nick Desaulniers, Greg KH, tglx, han_mao, linux-kernel,
clang-built-linux
On Wed, 15 Apr 2020 07:29:58 PDT (-0700), ilie.halip@gmail.com wrote:
> When building with the LLVM linker this error occurrs:
> LD arch/riscv/kernel/vdso/vdso-syms.o
> ld.lld: error: no input files
>
> This happens because the lld treats -R as an alias to -rpath, as opposed
> to ld where -R means --just-symbols.
>
> Use the long option name for compatibility between the two.
>
> Link: https://github.com/ClangBuiltLinux/linux/issues/805
> Reported-by: Dmitry Golovin <dima@golovin.in>
> Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
> Signed-off-by: Ilie Halip <ilie.halip@gmail.com>
>
> ---
> Changed in v2:
> * a comment line dropped, another one slightly reworded
> * added Nick's Reviewed-by
> ---
> arch/riscv/kernel/vdso/Makefile | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/arch/riscv/kernel/vdso/Makefile b/arch/riscv/kernel/vdso/Makefile
> index 33b16f4212f7..a4ee3a0e7d20 100644
> --- a/arch/riscv/kernel/vdso/Makefile
> +++ b/arch/riscv/kernel/vdso/Makefile
> @@ -33,15 +33,15 @@ $(obj)/vdso.so.dbg: $(src)/vdso.lds $(obj-vdso) FORCE
> $(call if_changed,vdsold)
>
> # We also create a special relocatable object that should mirror the symbol
> -# table and layout of the linked DSO. With ld -R we can then refer to
> -# these symbols in the kernel code rather than hand-coded addresses.
> +# table and layout of the linked DSO. With ld --just-symbols we can then
> +# refer to these symbols in the kernel code rather than hand-coded addresses.
>
> SYSCFLAGS_vdso.so.dbg = -shared -s -Wl,-soname=linux-vdso.so.1 \
> -Wl,--build-id -Wl,--hash-style=both
> $(obj)/vdso-dummy.o: $(src)/vdso.lds $(obj)/rt_sigreturn.o FORCE
> $(call if_changed,vdsold)
>
> -LDFLAGS_vdso-syms.o := -r -R
> +LDFLAGS_vdso-syms.o := -r --just-symbols
> $(obj)/vdso-syms.o: $(obj)/vdso-dummy.o FORCE
> $(call if_changed,ld)
Thanks, this is on fixes.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v2] riscv: fix vdso build with lld
@ 2020-04-21 22:24 ` Palmer Dabbelt
0 siblings, 0 replies; 6+ messages in thread
From: Palmer Dabbelt @ 2020-04-21 22:24 UTC (permalink / raw)
To: ilie.halip
Cc: aou, maskray, Greg KH, ilie.halip, rupprecht, Nick Desaulniers,
linux-kernel, clang-built-linux, Paul Walmsley, linux-riscv,
tglx, han_mao
On Wed, 15 Apr 2020 07:29:58 PDT (-0700), ilie.halip@gmail.com wrote:
> When building with the LLVM linker this error occurrs:
> LD arch/riscv/kernel/vdso/vdso-syms.o
> ld.lld: error: no input files
>
> This happens because the lld treats -R as an alias to -rpath, as opposed
> to ld where -R means --just-symbols.
>
> Use the long option name for compatibility between the two.
>
> Link: https://github.com/ClangBuiltLinux/linux/issues/805
> Reported-by: Dmitry Golovin <dima@golovin.in>
> Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
> Signed-off-by: Ilie Halip <ilie.halip@gmail.com>
>
> ---
> Changed in v2:
> * a comment line dropped, another one slightly reworded
> * added Nick's Reviewed-by
> ---
> arch/riscv/kernel/vdso/Makefile | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/arch/riscv/kernel/vdso/Makefile b/arch/riscv/kernel/vdso/Makefile
> index 33b16f4212f7..a4ee3a0e7d20 100644
> --- a/arch/riscv/kernel/vdso/Makefile
> +++ b/arch/riscv/kernel/vdso/Makefile
> @@ -33,15 +33,15 @@ $(obj)/vdso.so.dbg: $(src)/vdso.lds $(obj-vdso) FORCE
> $(call if_changed,vdsold)
>
> # We also create a special relocatable object that should mirror the symbol
> -# table and layout of the linked DSO. With ld -R we can then refer to
> -# these symbols in the kernel code rather than hand-coded addresses.
> +# table and layout of the linked DSO. With ld --just-symbols we can then
> +# refer to these symbols in the kernel code rather than hand-coded addresses.
>
> SYSCFLAGS_vdso.so.dbg = -shared -s -Wl,-soname=linux-vdso.so.1 \
> -Wl,--build-id -Wl,--hash-style=both
> $(obj)/vdso-dummy.o: $(src)/vdso.lds $(obj)/rt_sigreturn.o FORCE
> $(call if_changed,vdsold)
>
> -LDFLAGS_vdso-syms.o := -r -R
> +LDFLAGS_vdso-syms.o := -r --just-symbols
> $(obj)/vdso-syms.o: $(obj)/vdso-dummy.o FORCE
> $(call if_changed,ld)
Thanks, this is on fixes.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2020-04-21 22:24 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-15 14:29 [PATCH v2] riscv: fix vdso build with lld Ilie Halip
2020-04-15 14:29 ` Ilie Halip
2020-04-15 14:42 ` Fangrui Song
2020-04-15 14:42 ` Fangrui Song
2020-04-21 22:24 ` Palmer Dabbelt
2020-04-21 22:24 ` Palmer Dabbelt
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.