summaryrefslogtreecommitdiffstats
path: root/arch/arm
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/Makefile7
1 files changed, 7 insertions, 0 deletions
diff --git a/arch/arm/Makefile b/arch/arm/Makefile
index 740b0790e7..29fd8e276c 100644
--- a/arch/arm/Makefile
+++ b/arch/arm/Makefile
@@ -140,6 +140,7 @@ CPPFLAGS += -DTEXT_BASE=$(TEXT_BASE)
# Add cleanup flags
CPPFLAGS += -fdata-sections -ffunction-sections
LDFLAGS_barebox += --gc-sections
+LDFLAGS_pbl += --gc-sections
# early code often runs at addresses we are not linked at
CPPFLAGS += -fPIE
@@ -150,6 +151,12 @@ else
LDFLAGS_barebox += -static
endif
+ifdef CONFIG_PBL_RELOCATABLE
+LDFLAGS_pbl += -pie
+else
+LDFLAGS_pbl += -static
+endif
+
KBUILD_BINARY := barebox.bin
barebox.s5p: $(KBUILD_BINARY)