
Chris Packham judge.packham@gmail.com wrote on 2014/09/10 06:03:10:
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@transmode.se Signed-off-by: Chris Packham judge.packham@gmail.com
The commit text is a bit misleading, it is binutils(ld) which has changed default so now one have to specify --bss-plt to get what u-boot needs. Works fine with binutils 2.21.1
Acked-by: Joakim Tjernlund joakim.tjernlund@transmode.se
One could possibly argue that --secure-plt should have a NULL word there like the other 3 reserved words around _GLOBAL_OFFSET_TABLE_ to preserve compatibility.
PS. -mbss-plt is the gcc option while --bss-plt is the ld option. u-boot invokes ld directly so --bss-plt is appropriate
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