[U-Boot] [PATCH] Introduce a new linker flag LDFLAGS_FINAL
Graeme Russ
graeme.russ at gmail.com
Fri Feb 4 23:56:25 CET 2011
On 02/02/11 06:51, Scott Wood wrote:
> On Tue, 1 Feb 2011 20:32:29 +0100
> Wolfgang Denk <wd at denx.de> wrote:
>
>> Dear Scott Wood,
>>
>> In message <20110201102446.23b4a2e9 at udp111988uds.am.freescale.net> you wrote:
>>>
>>> Prior to the introduction of LDFLAGS_u-boot, was LDFLAGS not what was
>>> used? So before, anything that board/cpu code adds directly to LDFLAGS
>>> (maybe they're supposed to use PLATFORM_LDFLAGS, but not all do) was
>>> used in the final link. After 8aba9dc, only things in
>>> PLATFORM_LDFLAGS plus -Bstatic and -T are used in the final link.
>>
>> And this is correct for all boards?
>
> By "this" do you mean the switch to PLATFORM_LDFLAGS in 8aba9dc, or the
> switch back to LDFLAGS? It's not obvious to me that the dropping of
> board/cpu modifications to LDFLAGS except during partial link was an
> intentional change, or a correct one for all boards.
>
> The only case I see where it makes any difference at all is arch/i386,
> which does LDFLAGS += --cref. From the description of --cref in the
> linker manual, it probably actually belongs in LDFLAGS_FINAL, though
> I'm not sure if it's harmless to include it in partial link or not.
> Currently, with 8aba9dc, it's included *only* in partial link.
>
> It's also not clear to me what this option has to do with i386... it
> looks like an arch-neutral debugging feature that doesn't affect the
> actual u-boot image at all (the output goes into the map file).
--cref can be dropped from x86 - I really should send a patch to rename
i386 to x86 ;)
Since x86 is currently a very simple platform to maintain (one CPU, one
board) and I have been dealing with breakages do to non x86 cleanups for a
while, I have no problem with tweaking the x86 linker options to be more
arch neutral.
Regards,
Graeme
More information about the U-Boot
mailing list