From 039b77396abb0ed78af34dadbd0786dfaf0e6aa9 Mon Sep 17 00:00:00 2001 From: Chris Packham Date: Wed, 10 Sep 2014 16:03:10 +1200 Subject: [PATCH] powerpc: add --bss-plt to LDFLAGS 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. Signed-off-by: Joakim Tjernlund Signed-off-by: Chris Packham Acked-by: Joakim Tjernlund Acked-by: Scott Wood Reviewed-by: York Sun --- arch/powerpc/config.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/powerpc/config.mk b/arch/powerpc/config.mk index 6329b6c74f..fec02f2b82 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 -- 2.39.5