[U-Boot] weak functions not being over-ridden (location dependent)

Mike Frysinger vapier at gentoo.org
Thu Nov 27 20:50:03 CET 2008


On Wednesday 26 November 2008 14:32:48 Graeme Russ wrote:
> Wolfgang Denk wrote:
> > In message ... you wrote:
> >>> I have a very strange problem - I am trying to define a weak function,
> >>> but whether or not the function is overridden depends on where I put
> >>> the overriding function. Case in point:
> >>
> >> You are not the only one, I have seen this also with the LED interface
> >> in U-boot.
> >
> > I think this has been answered before: it doesn't work when the
> > functions are in libraries. It only works when the respective
> > functions are in explicitely linked object files.
>
> This doesn't seem right - reset_cpu () will be in a library no matter where
> I put it (either libsc520.a or libeNET.a)

the linker treates archives differently from shared libraries by design.  
"linked objects" refers to .o object files, not .a archives.
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 835 bytes
Desc: This is a digitally signed message part.
Url : http://lists.denx.de/pipermail/u-boot/attachments/20081127/0a34bae5/attachment.pgp 


More information about the U-Boot mailing list