[U-Boot] [RFC PATCH v1] powerpc: add --bss-plt to LDFLAGS

Chris Packham judge.packham at gmail.com
Wed Sep 10 06:03:10 CEST 2014


With some versions of gcc (that we know of 4.6.3 and 4.8.2 are affected)
it is necessary to specify --bss-plt to get the final blrl in the
_GOT2_TABLE_. Without this the last symbol does not get it's address
relocated.  For the P2041RDB board this ended up being
NetArpWaitTimerStart which caused the ARP packets to timeout
immediately.

Helped-by: Joakim Tjernlund <joakim.tjernlund at transmode.se>
Signed-off-by: Chris Packham <judge.packham at gmail.com>
---
Technically this is v2 of
http://lists.denx.de/pipermail/u-boot/2014-September/188365.html but the
solution is so different that I'm treating it as a new patch series.

 arch/powerpc/config.mk |    1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/powerpc/config.mk b/arch/powerpc/config.mk
index 6329b6c..fec02f2 100644
--- a/arch/powerpc/config.mk
+++ b/arch/powerpc/config.mk
@@ -11,6 +11,7 @@ endif
 
 CONFIG_STANDALONE_LOAD_ADDR ?= 0x40000
 LDFLAGS_FINAL += --gc-sections
+LDFLAGS_FINAL += --bss-plt
 PLATFORM_RELFLAGS += -fpic -mrelocatable -ffunction-sections -fdata-sections \
 								-meabi
 PLATFORM_CPPFLAGS += -D__powerpc__ -ffixed-r2
-- 
1.7.9.5



More information about the U-Boot mailing list