[U-Boot] [PATCH 6/6] powerpc: Add LINK_OFF calls in early C-code.
Scott Wood
scottwood at freescale.com
Tue Nov 23 22:20:58 CET 2010
On Tue, 23 Nov 2010 22:03:36 +0100
Joakim Tjernlund <joakim.tjernlund at transmode.se> wrote:
> Scott Wood <scottwood at freescale.com> wrote on 2010/11/23 21:46:51:
> > "Only these" that you've found so far, for the board you've tried --
>
> Yes, that is what I wrote.
Yes, I was just emphasizing that. :-)
> > is it worth adding another pre-relocation landmine to shrink the image
> > by 5%? I don't miss the manual fixups we had to do under the old
> > relocation scheme.
>
> -msingle-pic-base does not require LINK_OFF per se. It will shrink the image
> significantly for free. It enables impl. of true PIC and if you want to have
> that too you need LINK_OFF.
What is "true PIC" versus the rest of what -msingle-pic-base does, and
what are the advantages?
> > Is a missing LINK_OFF likely to result in a crash, or silent bad
> > behavior? Will LINK_OFF be a no-op after relocation?
>
> Either crash or garbage printed on the port.
Garbage possibly being empty strings that aren't noticed?
Or possibly bad values changing program flow in nonobvious ways?
> LINK_OFF is a NOP after relocation. It will be a NOP
> if link address == load address too.
"load address" being pre-relocation? Currently these must be equal
(which doesn't seem particularly burdensome).
Seems like there would be a high risk for a developer of board A to add
new code that affects board B, and needs a manual relocation, but board
A doesn't use this or loads at the link address, so it doesn't show up.
Seems like a maintenance headache.
-Scott
More information about the U-Boot
mailing list