linux-brain/drivers/firmware
Ard Biesheuvel ba0523881c efi/libstub/arm64: Set -fpie when building the EFI stub
commit 91ee5b21ee 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>
2018-11-27 16:07:58 +01:00
..
broadcom FIRMWARE: bcm47xx_nvram: Fix module license. 2015-08-19 15:00:08 +02:00
efi efi/libstub/arm64: Set -fpie when building the EFI stub 2018-11-27 16:07:58 +01:00
google firmware: google memconsole driver fixes 2014-02-15 11:30:28 -08:00
Kconfig Merge tag 'arm/soc/for-4.4/rpi-drivers' of https://github.com/Broadcom/stblinux into next/drivers 2015-10-26 10:39:22 +09:00
Makefile Merge tag 'arm/soc/for-4.4/rpi-drivers' of https://github.com/Broadcom/stblinux into next/drivers 2015-10-26 10:39:22 +09:00
arm_scpi.c firmware: arm_scpi: Extend to support sensors 2015-10-09 11:05:52 +01:00
dcdbas.c firmware: drop owner assignment from platform_drivers 2014-10-20 16:20:31 +02:00
dcdbas.h dcdbas: export functionality for use in other drivers 2009-01-08 08:31:12 -08:00
dell_rbu.c sysfs: add struct file* to bin_attr callbacks 2010-05-21 09:37:31 -07:00
dmi-id.c dmi-id: fix a memory leak in dmi_id_init error path 2010-08-05 13:53:34 -07:00
dmi-sysfs.c firmware: dmi_scan: add SBMIOS entry and DMI tables 2015-06-25 09:06:56 +02:00
dmi_scan.c firmware: dmi_scan: Fix handling of empty DMI strings 2018-05-30 07:48:56 +02:00
edd.c [SCSI] edd: Treat "XPRS" host bus type the same as "PCI" 2011-10-31 13:26:19 +04:00
iscsi_ibft.c iscsi_ibft: filter null v4-mapped v6 addresses 2015-06-05 21:07:02 -04:00
iscsi_ibft_find.c efi: Make 'efi_enabled' a function to query EFI facilities 2013-01-30 11:51:59 -08:00
memmap.c drivers/firmware/memmap.c: fix kernel-doc format 2015-06-25 17:00:41 -07:00
pcdp.c serial: 8250_early: Remove setup_early_serial8250_console() 2015-03-26 17:25:27 +01:00
pcdp.h Update broken web addresses in the kernel. 2010-10-18 11:03:14 +02:00
psci.c drivers: firmware: psci: drop duplicate const from psci_of_match 2017-10-08 10:14:20 +02:00
qcom_scm-32.c qcom-scm: fix endianess issue in __qcom_scm_is_call_available 2015-10-14 14:51:21 -05:00
qcom_scm-64.c firmware: qcom: scm: Add function stubs for ARM64 2015-09-23 12:00:43 -05:00
qcom_scm.c firmware: qcom: scm: Add HDCP Support 2015-05-28 10:47:45 -05:00
qcom_scm.h firmware: qcom: scm: Add HDCP Support 2015-05-28 10:47:45 -05:00
raspberrypi.c ARM: bcm2835: Add the Raspberry Pi firmware driver 2015-10-14 15:30:06 -07:00