All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chris Packham <judge.packham@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [RFC PATCH v1] powerpc: add --bss-plt to LDFLAGS
Date: Wed, 10 Sep 2014 16:03:10 +1200	[thread overview]
Message-ID: <1410321790-12914-1-git-send-email-judge.packham@gmail.com> (raw)
In-Reply-To: <CAFOYHZDpDPn4XkTUT+7bUgSVnTEn7t_Ps9oHMrnSGjW6KLZiTw@mail.gmail.com>

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>
---
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

  reply	other threads:[~2014-09-10  4:03 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-08  4:32 [U-Boot] relocation problem on powerpc Chris Packham
2014-09-08  5:18 ` Chris Packham
2014-09-08  5:51 ` Chris Packham
2014-09-08  9:04   ` Joakim Tjernlund
2014-09-08 12:22     ` Joakim Tjernlund
2014-09-08 23:07       ` Chris Packham
2014-09-09  9:05         ` Joakim Tjernlund
     [not found]         ` <OF3B16B156.FBE577FB-ONC1257D4E.002B79D7-C1257D4E.0031F02B@LocalDomain>
2014-09-09 12:30           ` Joakim Tjernlund
     [not found]           ` <OF76BFAD6D.627B6C04-ONC1257D4E.00438406-C1257D4E.0044AF3E@LocalDomain>
2014-09-09 13:20             ` Joakim Tjernlund
2014-09-10  3:48               ` Chris Packham
2014-09-10  4:03                 ` Chris Packham [this message]
2014-09-10 10:47                   ` [U-Boot] [RFC PATCH v1] powerpc: add --bss-plt to LDFLAGS Joakim Tjernlund
2014-09-24 22:14                   ` York Sun
2014-09-25  7:26                     ` Joakim Tjernlund
2014-09-25 16:49                   ` York Sun
2014-09-08 22:07     ` [U-Boot] relocation problem on powerpc Chris Packham
2014-09-09  0:22       ` [U-Boot] [RFC PATCH v1] powerpc: Fix off-by-one error in relocation Chris Packham
2014-09-10  3:54         ` Chris Packham
2014-09-08 20:21   ` [U-Boot] relocation problem on powerpc Wolfgang Denk
2014-09-08 22:10     ` Chris Packham
2014-09-09  6:37       ` Wolfgang Denk

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1410321790-12914-1-git-send-email-judge.packham@gmail.com \
    --to=judge.packham@gmail.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.