[U-Boot] [RFC 2/3] MIPS: add -pie flag to LDFLAGS_FINAL

Gabor Juhos juhosg at openwrt.org
Sun Feb 3 10:26:21 CET 2013


This ensures that the linker generates the .rel.dyn
fixup table, which will be applied to the relocated
image before transferring control to it.

Signed-off-by: Gabor Juhos <juhosg at openwrt.org>
Cc: Daniel Schwierzeck <daniel.schwierzeck at googlemail.com>
---
 arch/mips/config.mk |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/mips/config.mk b/arch/mips/config.mk
index de9140b..57f2338 100644
--- a/arch/mips/config.mk
+++ b/arch/mips/config.mk
@@ -65,4 +65,4 @@ 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
-- 
1.7.10



More information about the U-Boot mailing list