lawrencejiabin
3/12/2020 - 8:49 AM

C语言属性汇总

///<locate code to x segment ever exist
#define SEC_USED(x)     __attribute__((section(#x),used))
///<locate code to x segment optimized by dependency
#define SEC(x)          __attribute__((section(#x)))
#define sec(x)          __attribute__((section(#x),used))
///<locate data to x segment
#define AT(x)           __attribute__((section(#x)))
#define SET(x)          __attribute__((x))
#define ALIGNED(x)	    __attribute__((aligned(x)))
#define _GNU_PACKED_	__attribute__((packed))
#define _NOINLINE_	    __attribute__((noinline))
#define _INLINE_	    __attribute__((always_inline))
#define _WEAK_	        __attribute__((weak))
#define _WEAKREF_	    __attribute__((weakref))
#define _NORETURN_      __attribute__((noreturn))