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] [day] [month] [year] [list]
Message-ID: <20210322120429.3706-1-alobakin@pm.me>
Date:   Mon, 22 Mar 2021 12:04:43 +0000
From:   Alexander Lobakin <alobakin@...me>
To:     Paul Cercueil <paul@...pouillou.net>
Cc:     Alexander Lobakin <alobakin@...me>,
        Paul Burton <paulburton@...nel.org>,
        Thomas Bogendoerfer <tsbogend@...ha.franken.de>,
        Nathan Chancellor <nathan@...nel.org>,
        Nick Desaulniers <ndesaulniers@...gle.com>, od@...c.me,
        linux-mips@...r.kernel.org, linux-kernel@...r.kernel.org,
        clang-built-linux@...glegroups.com
Subject: [PATCH] MIPS: generic: Support linking with LLVM ld.lld

From: Paul Cercueil <paul@...pouillou.net>
Date: Sun, 21 Mar 2021 13:18:05 +0000

> LLVM's ld.lld chokes on the 64-bit sign-extended load addresses. Use
> 32-bit addresses if the linker is LLVM's ld.lld.
>
> Signed-off-by: Paul Cercueil <paul@...pouillou.net>
> ---
>  arch/mips/generic/Platform | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/arch/mips/generic/Platform b/arch/mips/generic/Platform
> index b871af16b5b6..19b7d92a4ca7 100644
> --- a/arch/mips/generic/Platform
> +++ b/arch/mips/generic/Platform
> @@ -12,8 +12,8 @@
>  cflags-$(CONFIG_MACH_INGENIC_SOC)	+= -I$(srctree)/arch/mips/include/asm/mach-ingenic
>  cflags-$(CONFIG_MIPS_GENERIC)	+= -I$(srctree)/arch/mips/include/asm/mach-generic
>
> -load-$(CONFIG_MIPS_GENERIC)	+= 0xffffffff80100000
> -zload-$(CONFIG_MIPS_GENERIC)	+= 0xffffffff81000000
> +load-$(CONFIG_MIPS_GENERIC)		+= $(if $(CONFIG_LD_IS_LLD),0x80100000,0xffffffff80100000)
> +zload-$(CONFIG_MIPS_GENERIC)	+= $(if $(CONFIG_LD_IS_LLD),0x81000000,0xffffffff81000000)
>  all-$(CONFIG_MIPS_GENERIC)	:= vmlinux.gz.itb

For load-y, it's handled in arch/mips/Makefile:289 arch-wide.
For zload-y, it's not handled at all, but the proper way to do this
is to add a similar to load-ld logics in
arch/mips/boot/compressed/Makefile.

>  its-y					:= vmlinux.its.S
> --
> 2.30.2

Thanks,
Al

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ