Lines Matching refs:set
40 * For ELF, this is done by constructing a separate segment for each set.
57 #define __MAKE_SET(set, sym) \
58 __GLOBL(__CONCAT(__start_set_,set)); \
59 __GLOBL(__CONCAT(__stop_set_,set)); \
61 __set_##set##_sym_##sym __section("set_" #set) \
67 #define __MAKE_SET(set, sym) extern void const * const (__set_##set##_sym_##sym)
73 #define TEXT_SET(set, sym) __MAKE_SET(set, sym)
74 #define DATA_SET(set, sym) __MAKE_SET(set, sym)
75 #define BSS_SET(set, sym) __MAKE_SET(set, sym)
76 #define ABS_SET(set, sym) __MAKE_SET(set, sym)
77 #define SET_ENTRY(set, sym) __MAKE_SET(set, sym)
80 * Initialize before referring to a given linker set.
82 #define SET_DECLARE(set, ptype) \
83 extern ptype __weak_symbol *__CONCAT(__start_set_,set); \
84 extern ptype __weak_symbol *__CONCAT(__stop_set_,set)
86 #define SET_BEGIN(set) \
87 (&__CONCAT(__start_set_,set))
88 #define SET_LIMIT(set) \
89 (&__CONCAT(__stop_set_,set))
92 * Iterate over all the elements of a set.
96 * and the address of each set item is obtained inside the loop by "*pvar".
98 #define SET_FOREACH(pvar, set) \
99 for (pvar = SET_BEGIN(set); pvar < SET_LIMIT(set); pvar++)
101 #define SET_ITEM(set, i) \
102 ((SET_BEGIN(set))[i])
105 * Provide a count of the items in a set.
107 #define SET_COUNT(set) \
108 (SET_LIMIT(set) - SET_BEGIN(set))