38 _Pragma(
"GCC diagnostic ignored \"-Warray-bounds\"")
46 #define _XFA(type, name, prio) \
48 __attribute__((used, section(".xfa." #name "." #prio))) _Alignas(type) type
55 #define _XFA_CONST(type, name, prio) \
57 __attribute__((used, section(".roxfa." #name "." #prio))) _Alignas(type) type
73 #define XFA_INIT_CONST(type, name) \
74 _Pragma("GCC diagnostic push") \
75 _Pragma("GCC diagnostic ignored \"-Wpedantic\"") \
76 _XFA_CONST(type, name, 0_) name [0] = {}; \
77 _XFA_CONST(type, name, 9_) name ## _end [0] = {}; \
78 _Pragma("GCC diagnostic pop") \
79 extern const unsigned __xfa_dummy
95 #define XFA_INIT(type, name) \
96 _Pragma("GCC diagnostic push") \
97 _Pragma("GCC diagnostic ignored \"-Wpedantic\"") \
98 _XFA(type, name, 0_) name [0] = {}; \
99 _XFA(type, name, 9_) name ## _end [0] = {}; \
100 _Pragma("GCC diagnostic pop") \
101 extern const unsigned __xfa_dummy
114 #define XFA_USE_CONST(type, name) \
128 #define XFA_USE(type, name) \
129 extern type name []; \
130 extern type name ## _end []
145 #define XFA(type, xfa_name, prio) _XFA(type, xfa_name, 5_ ## prio)
160 #define XFA_CONST(type, xfa_name, prio) _XFA_CONST(type, xfa_name, 5_ ## prio)
178 #define XFA_ADD_PTR(xfa_name, prio, name, entry) \
179 _XFA_CONST(__typeof__(entry), xfa_name, 5_ ## prio) \
180 xfa_name ## _ ## prio ## _ ## name = entry
185 #define XFA_LEN(type, \
186 name) (((uintptr_t)name ## _end - (uintptr_t)name) / \
Common macros and compiler attributes/pragmas configuration.
Adds include for missing inttype definitions.