From: Scott Wood <scottwood@freescale.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] PowerPC: Change -fpic flag to -fPIC flag in the config.mk
Date: Thu, 26 Apr 2012 16:26:52 -0500 [thread overview]
Message-ID: <4F99BD9C.8070104@freescale.com> (raw)
In-Reply-To: <OF84C17420.AFDB5B35-ONC12579EC.0024A627-C12579EC.0025DB46@transmode.se>
On 04/26/2012 01:53 AM, Joakim Tjernlund wrote:
> Scott Wood <scottwood@freescale.com> wrote on 2012/04/25 21:01:00:
>>
>> On 04/18/2012 05:07 AM, Joakim Tjernlund wrote:
>>> Your linker file is buggy I think. I found u-boot-nand_spl.lds, is that the one?
>>
>> That's the one for the SPL part.
>
> OK, good.
>
>>
>>> Check out that files reloc part:
>>> .reloc : {
>>> _GOT2_TABLE_ = .;
>>> KEEP(*(.got2))
>>> _FIXUP_TABLE_ = .;
>>> KEEP(*(.fixup))
>>> }
>>> __got2_entries = (_FIXUP_TABLE_ - _GOT2_TABLE_) >> 2;
>>> __fixup_entries = (. - _FIXUP_TABLE_) >> 2;
>>>
>>> Compare that with(from u-boot.lds):
>>> .reloc :
>>> {
>>> _GOT2_TABLE_ = .;
>>> KEEP(*(.got2))
>>> KEEP(*(.got))
>>> PROVIDE(_GLOBAL_OFFSET_TABLE_ = . + 4);
>>> _FIXUP_TABLE_ = .;
>>> KEEP(*(.fixup))
>>> }
>>> __got2_entries = ((_GLOBAL_OFFSET_TABLE_ - _GOT2_TABLE_) >> 2) - 1;
>>> __fixup_entries = (. - _FIXUP_TABLE_) >> 2;
>>
>> I notice a difference between u-boot.lds and u-boot-nand.lds -- the
>> latter (used for the main part of U-Boot when loaded from SPL) has:
>>
>>> .reloc :
>>> {
>>> KEEP(*(.got))
>>> _GOT2_TABLE_ = .;
>>> KEEP(*(.got2))
>>> _FIXUP_TABLE_ = .;
>>> KEEP(*(.fixup))
>>> }
>>> __got2_entries = (_FIXUP_TABLE_ - _GOT2_TABLE_) >> 2;
>>> __fixup_entries = (. - _FIXUP_TABLE_) >> 2;
>>
>> Is this wrong as well?
>
> Yes, I think so. This one does not care about the .got entries at all so I suspect
> never gcc's wont work.
Thanks.
I'm not entirely sure about the _GLOBAL_OFFSET_TABLE_ stuff, though --
what's wrong with the simpler version that uses _FIXUP_TABLE_?
-Scott
next prev parent reply other threads:[~2012-04-26 21:26 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-18 3:19 [U-Boot] [PATCH] PowerPC: Change -fpic flag to -fPIC flag in the config.mk Chunhe Lan
2012-04-18 6:03 ` Wolfgang Denk
[not found] ` <4F8E5F11.4020904@freescale.com>
2012-04-18 7:11 ` Wolfgang Denk
2012-04-18 7:32 ` Chunhe Lan
2012-04-18 9:20 ` Wolfgang Denk
2012-04-18 10:07 ` Joakim Tjernlund
2012-04-25 19:01 ` Scott Wood
2012-04-26 6:53 ` Joakim Tjernlund
2012-04-26 21:26 ` Scott Wood [this message]
2012-04-27 7:05 ` Joakim Tjernlund
2012-04-27 7:10 ` Joakim Tjernlund
[not found] <1334717055-16652-1-git-send-email-Chunhe.Lan@freescale.com>
2012-04-18 16:10 ` Scott Wood
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=4F99BD9C.8070104@freescale.com \
--to=scottwood@freescale.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox