[U-Boot] [RFC][PATCH] Code Clean-up (weak functions)
Shinya Kuribayashi
skuribay at ruby.dti.ne.jp
Wed Dec 24 17:55:05 CET 2008
Joakim Tjernlund wrote:
>>> - There is no purely weak functions and therfore no longer code like:
>>> if (do_something)
>>> do_somthing();
>>> All instances have been replaced by empty functions with an alias. e.g.
>>> void __do_something (args) {}
>>> do_something(args) __atttribute__((weak, alias("__do_something")));
>
> Curious as to why you removed such code? Was it because it didn't work? If
> so I might have an answer for that. See my post:
> "Re: [U-Boot] [PATCH V4] cmd_bdinfo: move implementation to arch instead of common"
>
> Jocke
Good to know. This doc also helps:
http://docs.sun.com/app/docs/doc/817-1984/chapter2-11?l=en&a=view
Then,
- we must try to not leave undefined weak symbols at all,
- or check the symbol before invocation for the safety in case of NULL
dereference.
More information about the U-Boot
mailing list