
Dear Sebastien Carlier,
In message 4CD3F58F.8090302@gmail.com you wrote:
It does seem like weak symbols were designed with other uses in mind, such as C++ class members defined within a class declaration, or to weak the dependencies between libraries... but not really to allow overridable definitions (what if two objects want to override the same weak symbol in different ways?).
Well, but that's exactly why they are used in library code: to allow overridable definitions.
Yes. The old-fashioned #define CONFIG_BOARD_INIT_F and friends method. I would prefer that one. Its not beautiful but still widely used and bullet-proof.
Could you please elaborate? I have looked for things like this in the code base but I could not find what you are referring to.
Don't bother looking for it. We are happy that we have eliminated a bit of the #ifdef mess. We will not add it again.
Best regards,
Wolfgang Denk