MIPS: Truncate link address into 32bit for 32bit kernel
authorJiaxun Yang <jiaxun.yang@flygoat.com>
Wed, 6 May 2020 05:52:45 +0000 (13:52 +0800)
committerThomas Bogendoerfer <tsbogend@alpha.franken.de>
Thu, 7 May 2020 08:31:01 +0000 (10:31 +0200)
commitff487d41036035376e47972c7c522490b839ab37
tree3fd4276e90bb58d26b6df6c6ff4f586457da7969
parent53635eb2e24b96b7f2d308b7ac74641c8e2e112c
MIPS: Truncate link address into 32bit for 32bit kernel

LLD failed to link vmlinux with 64bit load address for 32bit ELF
while bfd will strip 64bit address into 32bit silently.
To fix LLD build, we should truncate load address provided by platform
into 32bit for 32bit kernel.

Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
Link: https://github.com/ClangBuiltLinux/linux/issues/786
Link: https://sourceware.org/bugzilla/show_bug.cgi?id=25784
Reviewed-by: Fangrui Song <maskray@google.com>
Reviewed-by: Kees Cook <keescook@chromium.org>
Tested-by: Nathan Chancellor <natechancellor@gmail.com>
Cc: Maciej W. Rozycki <macro@linux-mips.org>
Tested-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
arch/mips/Makefile
arch/mips/boot/compressed/Makefile
arch/mips/kernel/vmlinux.lds.S