Attention is currently required from: Paul Menzel, Arthur Heymans. Julius Werner has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/58934 )
Change subject: Documentation/coding_style.md: Avoid weakly linked symbols ......................................................................
Patch Set 2:
(1 comment)
Patchset:
PS2:
The problem is that those weak functions are often used initially just to get things compile tested. In the end a real implementation is needed but forgotten because jenkins does not complain. A good example of this can be found in: [...]
I'm not really familiar with the code you linked. Sounds like they differ from my examples (e.g. bootblock_soc_init()) in that every platform always must implement a specific behavior there, and they are just marked weak to make it easier to add new platform ports piecemeal? I agree that weak stubs shouldn't be used as just a placeholder for something that is 100% certain needs to be replaced later -- in that case, just writing the empty stub into platform code with a /* TODO: ... */ seems more appropriate.
Maybe we can compromise on saying that weak stubs should only be used in cases where the stub can be valid behavior for at least some platforms?