diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2019-11-12 12:07:04 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2019-11-12 12:09:37 +0100 |
commit | b0348d677bb47bdbd368983603b3e9604528d4ed (patch) | |
tree | 9464fbd57f6c64dc597889712e763a3b2e40a6a0 /arch/arm/mach-omap | |
parent | 3b8b70bfd743c303349f67c892631cb04c2b3c68 (diff) | |
download | barebox-b0348d677bb47bdbd368983603b3e9604528d4ed.tar.gz |
ARM: Compile with -fPIE
Early code in barebox often runs at an address the binary is not linked
at. This causes problems for example when simple initializations in a
switch are converted to an array lookup (-ftree-switch-conversion).
These arrays are then addressed where they are linked at. Some code
where this is known to cause problems is already compiled with
-fno-tree-switch-conversion. This however is limited to single files.
This patch compiles barebox with -fPIE enabled. This causes such tables
to be looked up PC relative rather than with its absolute address. This
makes the -fno-tree-switch-conversion and -fno-jump-table options
unnecessary.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/arm/mach-omap')
-rw-r--r-- | arch/arm/mach-omap/Makefile | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/arch/arm/mach-omap/Makefile b/arch/arm/mach-omap/Makefile index 06cd191f95..36b2aa090e 100644 --- a/arch/arm/mach-omap/Makefile +++ b/arch/arm/mach-omap/Makefile @@ -22,8 +22,6 @@ pbl-$(CONFIG_ARCH_OMAP3) += omap3_generic.o auxcr.o obj-$(CONFIG_ARCH_OMAP4) += omap4_generic.o omap4_clock.o pbl-$(CONFIG_ARCH_OMAP4) += omap4_generic.o omap4_clock.o obj-pbl-$(CONFIG_ARCH_AM33XX) += am33xx_generic.o am33xx_clock.o am33xx_mux.o am3xxx.o -CFLAGS_pbl-am33xx_generic.o := -fno-tree-switch-conversion -fno-jump-tables -CFLAGS_am33xx_generic.o := -fno-tree-switch-conversion -fno-jump-tables obj-pbl-$(CONFIG_ARCH_AM35XX) += am3xxx.o am35xx_emif4.o obj-$(CONFIG_ARCH_AM33XX) += am33xx_scrm.o obj-$(CONFIG_ARCH_OMAP3) += omap3_clock.o |