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

Wolfgang Denk wd at denx.de
Wed Nov 26 16:12:36 CET 2008


Dear Remy,

In message <3efb10970811260501h6dcf87b9idf3d80981ceee07b at mail.gmail.com> 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.
> My workaround was simple: remove the weak functions... I never took
> the time to figure it out exactly, so I am curious if anyone knows the
> real answer.

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.

Jean-Christophe is planning to switch to  linking  objects  like  the
Linux kernel does, but this is a medium/long term task.

For now, check if you can separately link the respective object files.

See the ML archive for the previous discussion.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
It seems intuitively obvious to me, which  means  that  it  might  be
wrong.                                                 -- Chris Torek


More information about the U-Boot mailing list