@@ -115,18 +115,21 @@ class Symbol {
115
115
uint8_t partition;
116
116
117
117
// True if this symbol is preemptible at load time.
118
+ LLVM_PREFERRED_TYPE (bool )
118
119
uint8_t isPreemptible : 1 ;
119
120
120
121
// True if the symbol was used for linking and thus need to be added to the
121
122
// output file's symbol table. This is true for all symbols except for
122
123
// unreferenced DSO symbols, lazy (archive) symbols, and bitcode symbols that
123
124
// are unreferenced except by other bitcode objects.
125
+ LLVM_PREFERRED_TYPE (bool )
124
126
uint8_t isUsedInRegularObj : 1 ;
125
127
126
128
// True if an undefined or shared symbol is used from a live section.
127
129
//
128
130
// NOTE: In Writer.cpp the field is used to mark local defined symbols
129
131
// which are referenced by relocations when -r or --emit-relocs is given.
132
+ LLVM_PREFERRED_TYPE (bool )
130
133
uint8_t used : 1 ;
131
134
132
135
// Used by a Defined symbol with protected or default visibility, to record
@@ -138,27 +141,33 @@ class Symbol {
138
141
// - If -shared or --export-dynamic is specified, any symbol in an object
139
142
// file/bitcode sets this property, unless suppressed by LTO
140
143
// canBeOmittedFromSymbolTable().
144
+ LLVM_PREFERRED_TYPE (bool )
141
145
uint8_t exportDynamic : 1 ;
142
146
143
147
// True if the symbol is in the --dynamic-list file. A Defined symbol with
144
148
// protected or default visibility with this property is required to be
145
149
// exported into .dynsym.
150
+ LLVM_PREFERRED_TYPE (bool )
146
151
uint8_t inDynamicList : 1 ;
147
152
148
153
// Used to track if there has been at least one undefined reference to the
149
154
// symbol. For Undefined and SharedSymbol, the binding may change to STB_WEAK
150
155
// if the first undefined reference from a non-shared object is weak.
156
+ LLVM_PREFERRED_TYPE (bool )
151
157
uint8_t referenced : 1 ;
152
158
153
159
// Used to track if this symbol will be referenced after wrapping is performed
154
160
// (i.e. this will be true for foo if __real_foo is referenced, and will be
155
161
// true for __wrap_foo if foo is referenced).
162
+ LLVM_PREFERRED_TYPE (bool )
156
163
uint8_t referencedAfterWrap : 1 ;
157
164
158
165
// True if this symbol is specified by --trace-symbol option.
166
+ LLVM_PREFERRED_TYPE (bool )
159
167
uint8_t traced : 1 ;
160
168
161
169
// True if the name contains '@'.
170
+ LLVM_PREFERRED_TYPE (bool )
162
171
uint8_t hasVersionSuffix : 1 ;
163
172
164
173
// Symbol visibility. This is the computed minimum visibility of all
@@ -270,20 +279,24 @@ class Symbol {
270
279
public:
271
280
// True if this symbol is in the Iplt sub-section of the Plt and the Igot
272
281
// sub-section of the .got.plt or .got.
282
+ LLVM_PREFERRED_TYPE (bool )
273
283
uint8_t isInIplt : 1;
274
284
275
285
// True if this symbol needs a GOT entry and its GOT entry is actually in
276
286
// Igot. This will be true only for certain non-preemptible ifuncs.
287
+ LLVM_PREFERRED_TYPE (bool )
277
288
uint8_t gotInIgot : 1;
278
289
279
290
// True if defined relative to a section discarded by ICF.
291
+ LLVM_PREFERRED_TYPE (bool )
280
292
uint8_t folded : 1;
281
293
282
294
// Allow reuse of a bit between architecture-exclusive symbol flags.
283
295
// - needsTocRestore(): On PPC64, true if a call to this symbol needs to be
284
296
// followed by a restore of the toc pointer.
285
297
// - isTagged(): On AArch64, true if the symbol needs special relocation and
286
298
// metadata semantics because it's tagged, under the AArch64 MemtagABI.
299
+ LLVM_PREFERRED_TYPE (bool )
287
300
uint8_t archSpecificBit : 1;
288
301
bool needsTocRestore () const { return archSpecificBit; }
289
302
bool isTagged () const { return archSpecificBit; }
@@ -296,13 +309,16 @@ class Symbol {
296
309
//
297
310
// LTO shouldn't inline the symbol because it doesn't know the final content
298
311
// of the symbol.
312
+ LLVM_PREFERRED_TYPE (bool )
299
313
uint8_t scriptDefined : 1;
300
314
301
315
// True if defined in a DSO. There may also be a definition in a relocatable
302
316
// object file.
317
+ LLVM_PREFERRED_TYPE (bool )
303
318
uint8_t dsoDefined : 1;
304
319
305
320
// True if defined in a DSO as protected visibility.
321
+ LLVM_PREFERRED_TYPE (bool )
306
322
uint8_t dsoProtected : 1;
307
323
308
324
// Temporary flags used to communicate which symbol entries need PLT and GOT
@@ -319,9 +335,11 @@ class Symbol {
319
335
// to a Verneed index in the output. Otherwise, this represents the Verdef
320
336
// index (VER_NDX_LOCAL, VER_NDX_GLOBAL, or a named version).
321
337
uint16_t versionId;
338
+ LLVM_PREFERRED_TYPE (bool )
322
339
uint8_t versionScriptAssigned : 1;
323
340
324
341
// True if targeted by a range extension thunk.
342
+ LLVM_PREFERRED_TYPE (bool )
325
343
uint8_t thunkAccessed : 1;
326
344
327
345
void setFlags (uint16_t bits) {
0 commit comments