[U-Boot] [PATCH V3 1/3] arm926ejs: fix linker file for newer ld support
Albert ARIBAUD
albert.aribaud at free.fr
Thu Nov 4 23:06:28 CET 2010
Le 04/11/2010 20:39, Alexander Holler a écrit :
> Sidenote: My toolchain is reproducable, but that means you have to
> compile a Gentoo system, because Gentoo is a source only distribution.
> So it isn't as comfortable as using binary distributions (here), but it
> has other advantages.
It probably has advantages, but having to adopt and run a given
distribution in order to get access to a given toolchain goes way beyond
what I am willing to do.
However, I think I have found the cause of the problem in my V3 build,
at least on an openrd_base.
V3 tried to overlay bss and rel.dyn so as to minimize the FLASH/NAND
footprint as well as RAM footprint. However, overlaying was done by
forcing .rel.dyn address to be equal to __bss_start and marking it
OVERLAY, which made it disappear from the .bin file, thus causing
relocation to fail.
I reversed the definition and order by forcing bss to start at
__rel_dyn_start, which worked but caused a linker warning that two
sections started at the same VMA -- the linker apparently does not take
into account that one of them, .bss, is NOLOAD.
I changed NOLOAD into OVERLAY, and then all worked: initial mapping (in
FLASH or in RAM when loaded from NAND) has text, data, rel.dyn and
dynsym bytes but not bss, which is fine since no code running there
should use it; final mapping (once relocated) has text, data and bss
without rel.dyn and dynsym using up RAM.
Tested on openrd_base, works.
V4 of patch set coming in the next few minutes.
> Regards,
>
> Alexander
Amicalement,
--
Albert.
More information about the U-Boot
mailing list