summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYu-Ping Wu <yupingso@chromium.org>2024-01-19 15:53:32 +0800
committerFelix Held <felix-coreboot@felixheld.de>2024-01-22 12:20:22 +0000
commit462a0c0cd2e2bde287a5d56ecafe146115b64088 (patch)
treeec3945349260537642115856cd8dd3b8036a7990
parent71981cc3b95000b3f9305daa1ca2f733df538a49 (diff)
downloadcoreboot-462a0c0cd2e2bde287a5d56ecafe146115b64088.tar.gz
coreboot-462a0c0cd2e2bde287a5d56ecafe146115b64088.tar.bz2
coreboot-462a0c0cd2e2bde287a5d56ecafe146115b64088.zip
commonlib/bsd/compiler.h: Define __section(section) macro
Define __section(section) to be a shorthand for __attribute__((__section__(section))). Change-Id: I67a37e5b2aae0bfa68b0319c477ab5d6c55e6501 Signed-off-by: Yu-Ping Wu <yupingso@chromium.org> Reviewed-on: https://review.coreboot.org/c/coreboot/+/80137 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Julius Werner <jwerner@chromium.org>
-rw-r--r--src/commonlib/bsd/include/commonlib/bsd/compiler.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/commonlib/bsd/include/commonlib/bsd/compiler.h b/src/commonlib/bsd/include/commonlib/bsd/compiler.h
index 6bde28db0e8b..2d77c49ab5d8 100644
--- a/src/commonlib/bsd/include/commonlib/bsd/compiler.h
+++ b/src/commonlib/bsd/include/commonlib/bsd/compiler.h
@@ -50,6 +50,10 @@
#define __noreturn __attribute__((__noreturn__))
#endif
+#ifndef __section
+#define __section(section) __attribute__((__section__(section)))
+#endif
+
#ifndef __always_inline
#define __always_inline inline __attribute__((__always_inline__))
#endif