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>
This commit is contained in:
Yu-Ping Wu 2024-01-19 15:53:32 +08:00 committed by Felix Held
parent 71981cc3b9
commit 462a0c0cd2
1 changed files with 4 additions and 0 deletions

View File

@ -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