aboutsummaryrefslogtreecommitdiff
path: root/src/lib/prog_loaders.c
diff options
context:
space:
mode:
authorAaron Durbin <adurbin@chromium.org>2018-04-21 14:45:32 -0600
committerAaron Durbin <adurbin@chromium.org>2018-04-24 14:37:59 +0000
commit6403167d290da235a732bd2d6157aa2124fb403a (patch)
tree9c4805af37a31830934f91098d299e967df930c6 /src/lib/prog_loaders.c
parent38fd6685e9da61daadc96a8d537e6966dfe3b219 (diff)
compiler.h: add __weak macro
Instead of writing out '__attribute__((weak))' use a shorter form. Change-Id: If418a1d55052780077febd2d8f2089021f414b91 Signed-off-by: Aaron Durbin <adurbin@chromium.org> Reviewed-on: https://review.coreboot.org/25767 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Arthur Heymans <arthur@aheymans.xyz> Reviewed-by: Justin TerAvest <teravest@chromium.org>
Diffstat (limited to 'src/lib/prog_loaders.c')
-rw-r--r--src/lib/prog_loaders.c7
1 files changed, 4 insertions, 3 deletions
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 <stdlib.h>
#include <cbfs.h>
#include <cbmem.h>
+#include <compiler.h>
#include <console/console.h>
#include <fallback.h>
#include <halt.h>
@@ -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)
{
}