37 _Pragma(
"GCC diagnostic ignored \"-Warray-bounds\"")
45 #define _XFA(type, name, prio) \
47 __attribute__((used, section(".xfa." #name "." #prio))) _Alignas(type) type
54 #define _XFA_CONST(type, name, prio) \
56 __attribute__((used, section(".roxfa." #name "." #prio))) _Alignas(type) type
72 #define XFA_INIT_CONST(type, name) \
73 _Pragma("GCC diagnostic push") \
74 _Pragma("GCC diagnostic ignored \"-Wpedantic\"") \
75 _XFA_CONST(type, name, 0_) name [0] = {}; \
76 _XFA_CONST(type, name, 9_) name ## _end [0] = {}; \
77 _Pragma("GCC diagnostic pop") \
78 extern const unsigned __xfa_dummy
94 #define XFA_INIT(type, name) \
95 _Pragma("GCC diagnostic push") \
96 _Pragma("GCC diagnostic ignored \"-Wpedantic\"") \
97 _XFA(type, name, 0_) name [0] = {}; \
98 _XFA(type, name, 9_) name ## _end [0] = {}; \
99 _Pragma("GCC diagnostic pop") \
100 extern const unsigned __xfa_dummy
113 #define XFA_USE_CONST(type, name) \
127 #define XFA_USE(type, name) \
128 extern type name []; \
129 extern type name ## _end []
144 #define XFA(type, xfa_name, prio) _XFA(type, xfa_name, 5_ ## prio)
159 #define XFA_CONST(type, xfa_name, prio) _XFA_CONST(type, xfa_name, 5_ ## prio)
177 #define XFA_ADD_PTR(xfa_name, prio, name, entry) \
178 _XFA_CONST(__typeof__(entry), xfa_name, 5_ ## prio) \
179 xfa_name ## _ ## prio ## _ ## name = entry
184 #define XFA_LEN(type, \
185 name) (((uintptr_t)name ## _end - (uintptr_t)name) / \
Common macros and compiler attributes/pragmas configuration.
Adds include for missing inttype definitions.