summaryrefslogtreecommitdiff
path: root/firmware
diff options
context:
space:
mode:
authorArd Biesheuvel <ard.biesheuvel@linaro.org>2017-08-18 22:49:37 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-11-27 18:07:58 +0300
commitba0523881cac21c5cdc477390ff3e3ef9104437e (patch)
tree31acb9f4cd03993a6ca24af1b5c19e5a44a36407 /firmware
parentc2d14540ebbd0522b8226348909d13065544af94 (diff)
downloadlinux-ba0523881cac21c5cdc477390ff3e3ef9104437e.tar.xz
efi/libstub/arm64: Set -fpie when building the EFI stub
commit 91ee5b21ee026c49e4e7483de69b55b8b47042be upstream. Clang may emit absolute symbol references when building in non-PIC mode, even when using the default 'small' code model, which is already mostly position independent to begin with, due to its use of adrp/add pairs that have a relative range of +/- 4 GB. The remedy is to pass the -fpie flag, which can be done safely now that the code has been updated to avoid GOT indirections (which may be emitted due to the compiler assuming that the PIC/PIE code may end up in a shared library that is subject to ELF symbol preemption) Passing -fpie when building code that needs to execute at an a priori unknown offset is arguably an improvement in any case, and given that the recent visibility changes allow the PIC build to pass with GCC as well, let's add -fpie for all arm64 builds rather than only for Clang. Tested-by: Matthias Kaehlcke <mka@chromium.org> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Matt Fleming <matt@codeblueprint.co.uk> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: linux-efi@vger.kernel.org Link: http://lkml.kernel.org/r/20170818194947.19347-5-ard.biesheuvel@linaro.org Signed-off-by: Ingo Molnar <mingo@kernel.org> Signed-off-by: Nathan Chancellor <natechancellor@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'firmware')
0 files changed, 0 insertions, 0 deletions