summaryrefslogtreecommitdiffstats
path: root/arch/arm/boards/toshiba-ac100
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2019-11-12 12:07:04 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2019-11-12 12:09:37 +0100
commitb0348d677bb47bdbd368983603b3e9604528d4ed (patch)
tree9464fbd57f6c64dc597889712e763a3b2e40a6a0 /arch/arm/boards/toshiba-ac100
parent3b8b70bfd743c303349f67c892631cb04c2b3c68 (diff)
downloadbarebox-b0348d677bb47bdbd368983603b3e9604528d4ed.tar.gz
barebox-b0348d677bb47bdbd368983603b3e9604528d4ed.tar.xz
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/boards/toshiba-ac100')
-rw-r--r--arch/arm/boards/toshiba-ac100/Makefile4
1 files changed, 1 insertions, 3 deletions
diff --git a/arch/arm/boards/toshiba-ac100/Makefile b/arch/arm/boards/toshiba-ac100/Makefile
index 2b6c09e279..4ef18c0ce9 100644
--- a/arch/arm/boards/toshiba-ac100/Makefile
+++ b/arch/arm/boards/toshiba-ac100/Makefile
@@ -1,5 +1,3 @@
-CFLAGS_pbl-entry.o := \
- -mcpu=arm7tdmi -march=armv4t \
- -fno-tree-switch-conversion -fno-jump-tables
+CFLAGS_pbl-entry.o := -mcpu=arm7tdmi -march=armv4t
lwl-y += entry.o
obj-y += board.o