Arthur Heymans has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/58934 )
Change subject: Documentation/coding_style.md: Avoid weakly linked symbols ......................................................................
Documentation/coding_style.md: Avoid weakly linked symbols
Change-Id: If70d38c5c646c1e8365bb16d3292cebb2787eba2 Signed-off-by: Arthur Heymans arthur@aheymans.xyz --- M Documentation/contributing/coding_style.md 1 file changed, 10 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/34/58934/1
diff --git a/Documentation/contributing/coding_style.md b/Documentation/contributing/coding_style.md index e3c92af..e32c83c 100644 --- a/Documentation/contributing/coding_style.md +++ b/Documentation/contributing/coding_style.md @@ -960,6 +960,16 @@ : /* outputs */ : /* inputs */ : /* clobbers */); ```
+Weakly linked symbols +--------------- + +Weakly linked symbols should generally be avoided if possible. Weakly linked +symbols like functions, which are often just a stubs, result in runtime +problems due to the lack of a proper implementation, where they could +otherwise be caught at compiletime. When calling functions in common code +that might not be implemented by all platforms, it is better to guard the +call with a conditional using a Kconfig parameter. + References ----------