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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAKwvOdnasXV2Uw1r4we_46oGD_0Ybjanm7T_-9J83bdf6jeOAg@mail.gmail.com>
Date:   Thu, 2 Apr 2020 10:35:14 -0700
From:   Nick Desaulniers <ndesaulniers@...gle.com>
To:     Ilie Halip <ilie.halip@...il.com>
Cc:     linux-riscv@...ts.infradead.org,
        Paul Walmsley <paul.walmsley@...ive.com>,
        Palmer Dabbelt <palmer@...belt.com>,
        Albert Ou <aou@...s.berkeley.edu>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Mao Han <han_mao@...ky.com>,
        Thomas Gleixner <tglx@...utronix.de>,
        LKML <linux-kernel@...r.kernel.org>,
        clang-built-linux <clang-built-linux@...glegroups.com>,
        Jordan Rupprecht <rupprecht@...gle.com>,
        Fangrui Song <maskray@...gle.com>
Subject: Re: [PATCH] riscv: fix vdso build with lld

+ Jordan, Fangrui

On Thu, Apr 2, 2020 at 1:56 AM Ilie Halip <ilie.halip@...il.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@...ovin.in>
> Signed-off-by: Ilie Halip <ilie.halip@...il.com>
> ---
>  arch/riscv/kernel/vdso/Makefile | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/arch/riscv/kernel/vdso/Makefile b/arch/riscv/kernel/vdso/Makefile
> index 33b16f4212f7..19f7b9ea10ab 100644
> --- a/arch/riscv/kernel/vdso/Makefile
> +++ b/arch/riscv/kernel/vdso/Makefile
> @@ -41,7 +41,8 @@ SYSCFLAGS_vdso.so.dbg = -shared -s -Wl,-soname=linux-vdso.so.1 \
>  $(obj)/vdso-dummy.o: $(src)/vdso.lds $(obj)/rt_sigreturn.o FORCE
>         $(call if_changed,vdsold)
>
> -LDFLAGS_vdso-syms.o := -r -R
> +# lld aliases -R to -rpath; use the longer option name

Thanks for the patch.  Maybe the comment can be dropped? It doesn't
make sense if there's no -R in the source file you're touching.  If
someone cares about why `--just-symbols` is spelled out, that's what
`git log` or vim fugitive is for.  Maybe the maintainer would be kind
enough to just drop that line for you when merging?

Reviewed-by: Nick Desaulniers <ndesaulniers@...gle.com>

Jordan, Fangrui, thoughts on this? Sounds like something other users
of LLD might run into porting their codebase to LLVM's linker.

$ ld.lld --help | grep \\-R
  -R <value>              Alias for --rpath
$ ld.bfd --help | grep \\-R
  -R FILE, --just-symbols FILE

> +LDFLAGS_vdso-syms.o := -r --just-symbols
>  $(obj)/vdso-syms.o: $(obj)/vdso-dummy.o FORCE
>         $(call if_changed,ld)
>
> --
> 2.17.1
>


-- 
Thanks,
~Nick Desaulniers

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ