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
| ||
|
Date: Mon, 11 Jul 2022 10:38:25 -0700 From: Nick Desaulniers <ndesaulniers@...gle.com> To: Fangrui Song <maskray@...gle.com> Cc: Paul Walmsley <paul.walmsley@...ive.com>, Palmer Dabbelt <palmer@...belt.com>, Albert Ou <aou@...s.berkeley.edu>, linux-riscv@...ts.infradead.org, Khem Raj <raj.khem@...il.com>, linux-kernel@...r.kernel.org, llvm@...ts.linux.dev Subject: Re: [PATCH] riscv: Pass -mno-relax only on lld < 15.0.0 On Sun, Jul 10, 2022 at 12:11 AM Fangrui Song <maskray@...gle.com> wrote: > > lld since > https://github.com/llvm/llvm-project/commit/6611d58f5bbcbec77262d392e2923e1d680f6985 > (milestone: 15.0.0) has implemented some RISC-V linker relaxation. > -mno-relax is no longer needed in KBUILD_CFLAGS/KBUILD_AFLAGS to > suppress R_RISCV_ALIGN which older lld can not handle: > > ld.lld: error: capability.c:(.fixup+0x0): relocation R_RISCV_ALIGN requires unimplemented linker relaxation; recompile with -mno-relax but the .o is already compiled with -mno-relax > > Signed-off-by: Fangrui Song <maskray@...gle.com> Thanks for implementing relaxation in LLD for RISC-V! Reviewed-by: Nick Desaulniers <ndesaulniers@...gle.com> Tested-by: Nick Desaulniers <ndesaulniers@...gle.com> > --- > arch/riscv/Makefile | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/arch/riscv/Makefile b/arch/riscv/Makefile > index 34cf8a598617..7e4ceb2a0981 100644 > --- a/arch/riscv/Makefile > +++ b/arch/riscv/Makefile > @@ -37,6 +37,7 @@ else > endif > > ifeq ($(CONFIG_LD_IS_LLD),y) > +ifeq ($(shell test $(CONFIG_LLD_VERSION) -lt 150000; echo $$?),0) > KBUILD_CFLAGS += -mno-relax > KBUILD_AFLAGS += -mno-relax > ifndef CONFIG_AS_IS_LLVM > @@ -44,6 +45,7 @@ ifndef CONFIG_AS_IS_LLVM > KBUILD_AFLAGS += -Wa,-mno-relax > endif > endif > +endif > > # ISA string setting > riscv-march-$(CONFIG_ARCH_RV32I) := rv32ima > -- > 2.37.0.144.g8ac04bfd2-goog > > -- Thanks, ~Nick Desaulniers
Powered by blists - more mailing lists