diff options
author | Kees Cook <keescook@chromium.org> | 2019-04-05 00:40:27 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-05-31 16:43:37 +0300 |
commit | 5fa810fc6ab57408390041ba9c1e968f11d5a603 (patch) | |
tree | 76a26ce2e38e821b98b6ec15dc0f697742ddc0e4 /drivers/spi | |
parent | 10a8c316aaeac45bb5e0e1678b50dd4f4e4aa3ce (diff) | |
download | linux-5fa810fc6ab57408390041ba9c1e968f11d5a603.tar.xz |
x86/build: Keep local relocations with ld.lld
[ Upstream commit 7c21383f3429dd70da39c0c7f1efa12377a47ab6 ]
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>
Diffstat (limited to 'drivers/spi')
0 files changed, 0 insertions, 0 deletions