lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 15 Apr 2020 07:42:17 -0700
From:   Fangrui Song <maskray@...gle.com>
To:     Ilie Halip <ilie.halip@...il.com>
Cc:     linux-riscv@...ts.infradead.org,
        Jordan Rupprecht <rupprecht@...gle.com>,
        Paul Walmsley <paul.walmsley@...ive.com>,
        Palmer Dabbelt <palmer@...belt.com>,
        Albert Ou <aou@...s.berkeley.edu>,
        Nick Desaulniers <ndesaulniers@...gle.com>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Thomas Gleixner <tglx@...utronix.de>,
        Mao Han <han_mao@...ky.com>, linux-kernel@...r.kernel.org,
        clang-built-linux@...glegroups.com
Subject: Re: [PATCH v2] riscv: fix vdso build with lld

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@...ovin.in>
>Reviewed-by: Nick Desaulniers <ndesaulniers@...gle.com>
>Signed-off-by: Ilie Halip <ilie.halip@...il.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@...gle.com>

Powered by blists - more mailing lists