summaryrefslogtreecommitdiffstats
path: root/arch/mips/config.mk
diff options
context:
space:
mode:
authorGabor Juhos <juhosg@openwrt.org>2013-02-12 22:22:13 +0100
committerDaniel Schwierzeck <daniel.schwierzeck@gmail.com>2013-02-12 22:22:13 +0100
commit04380c651a2ff0d1495822321d2b7668dcd02537 (patch)
treefd763e5b4f62d349cbcfde50e5e24292f9a1a18f /arch/mips/config.mk
parent0ba8926e08bdabba681384ba3ea8476eda68c141 (diff)
downloadtalos-obmc-uboot-04380c651a2ff0d1495822321d2b7668dcd02537.tar.gz
talos-obmc-uboot-04380c651a2ff0d1495822321d2b7668dcd02537.zip
MIPS: add dynamic relocation support
The code handles relocation entries with the following relocation types only: mips32: R_MIPS_REL32 mips64: R_MIPS_REL+R_MIPS_64 xburst: R_MIPS_REL32 Other relocation entries are skipped without processing. The code must be extended if other relocation types must be supported. Add -pie to LDFLAGS_FINAL to generate the .rel.dyn fixup table, which will be applied to the relocated image before transferring control to it. The CONFIG_NEEDS_MANUAL_RELOC is not needed after the patch, so remove that as well. Signed-off-by: Gabor Juhos <juhosg@openwrt.org> Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Diffstat (limited to 'arch/mips/config.mk')
-rw-r--r--arch/mips/config.mk3
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/mips/config.mk b/arch/mips/config.mk
index de9140b67b..aaa94e8be2 100644
--- a/arch/mips/config.mk
+++ b/arch/mips/config.mk
@@ -65,4 +65,5 @@ PLATFORM_CPPFLAGS += -G 0 -mabicalls -fpic $(ENDIANNESS)
PLATFORM_CPPFLAGS += -msoft-float
PLATFORM_LDFLAGS += -G 0 -static -n -nostdlib $(ENDIANNESS)
PLATFORM_RELFLAGS += -ffunction-sections -fdata-sections
-LDFLAGS_FINAL += --gc-sections
+LDFLAGS_FINAL += --gc-sections -pie
+OBJCFLAGS += --remove-section=.dynsym
OpenPOWER on IntegriCloud