From 6403167d290da235a732bd2d6157aa2124fb403a Mon Sep 17 00:00:00 2001 From: Aaron Durbin Date: Sat, 21 Apr 2018 14:45:32 -0600 Subject: compiler.h: add __weak macro Instead of writing out '__attribute__((weak))' use a shorter form. Change-Id: If418a1d55052780077febd2d8f2089021f414b91 Signed-off-by: Aaron Durbin Reviewed-on: https://review.coreboot.org/25767 Tested-by: build bot (Jenkins) Reviewed-by: Arthur Heymans Reviewed-by: Justin TerAvest --- src/lib/prog_loaders.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/lib/prog_loaders.c') diff --git a/src/lib/prog_loaders.c b/src/lib/prog_loaders.c index 128869b2ba..8a6d6afafa 100644 --- a/src/lib/prog_loaders.c +++ b/src/lib/prog_loaders.c @@ -17,6 +17,7 @@ #include #include #include +#include #include #include #include @@ -71,9 +72,9 @@ fail: halt(); } -void __attribute__((weak)) stage_cache_add(int stage_id, +void __weak stage_cache_add(int stage_id, const struct prog *stage) {} -void __attribute__((weak)) stage_cache_load_stage(int stage_id, +void __weak stage_cache_load_stage(int stage_id, struct prog *stage) {} static void ramstage_cache_invalid(void) @@ -164,7 +165,7 @@ fail: static struct prog global_payload = PROG_INIT(PROG_PAYLOAD, CONFIG_CBFS_PREFIX "/payload"); -void __attribute__((weak)) mirror_payload(struct prog *payload) +void __weak mirror_payload(struct prog *payload) { } -- cgit v1.2.3