linux-stable/arch
Kees Cook e758471be0 x86/build: Keep local relocations with ld.lld
[ Upstream commit 7c21383f34 ]

The LLVM linker (ld.lld) defaults to removing local relocations, which
causes KASLR boot failures. ld.bfd and ld.gold already handle this
correctly. This adds the explicit instruction "--discard-none" during
the link phase. There is no change in output for ld.bfd and ld.gold,
but ld.lld now produces an image with all the needed relocations.

Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Borislav Petkov <bp@suse.de>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Nick Desaulniers <ndesaulniers@google.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: clang-built-linux@googlegroups.com
Cc: x86-ml <x86@kernel.org>
Link: https://lkml.kernel.org/r/20190404214027.GA7324@beast
Link: https://github.com/ClangBuiltLinux/linux/issues/404
Signed-off-by: Sasha Levin <sashal@kernel.org>
2019-05-31 06:46:24 -07:00
..
alpha
arc
arm ARM: vdso: Remove dependency with the arch_timer driver internals 2019-05-31 06:46:11 -07:00
arm64 arm64: vdso: Fix clock_getres() for CLOCK_REALTIME 2019-05-31 06:46:21 -07:00
c6x
h8300
hexagon
ia64
m68k
microblaze
mips MIPS: perf: Fix build with CONFIG_CPU_BMIPS5000 enabled 2019-05-25 18:23:33 +02:00
nds32
nios2
openrisc
parisc
powerpc powerpc/64: Fix booting large kernels with STRICT_KERNEL_RWX 2019-05-31 06:46:18 -07:00
riscv
s390 s390/mm: silence compiler warning when compiling without CONFIG_PGSTE 2019-05-31 06:46:23 -07:00
sh
sparc
um
unicore32
x86 x86/build: Keep local relocations with ld.lld 2019-05-31 06:46:24 -07:00
xtensa
.gitignore
Kconfig