Changeset View
Changeset View
Standalone View
Standalone View
lld/ELF/Symbols.h
Show First 20 Lines • Show All 124 Lines • ▼ Show 20 Lines | public: | ||||
// True if the symbol is in the --dynamic-list file. A Defined symbol with | // True if the symbol is in the --dynamic-list file. A Defined symbol with | ||||
// protected or default visibility with this property is required to be | // protected or default visibility with this property is required to be | ||||
// exported into .dynsym. | // exported into .dynsym. | ||||
uint8_t inDynamicList : 1; | uint8_t inDynamicList : 1; | ||||
// Used to track if there has been at least one undefined reference to the | // Used to track if there has been at least one undefined reference to the | ||||
// symbol. For Undefined and SharedSymbol, the binding may change to STB_WEAK | // symbol. For Undefined and SharedSymbol, the binding may change to STB_WEAK | ||||
// if the first undefined reference from a non-shared object is weak. | // if the first undefined reference from a non-shared object is weak. | ||||
// | |||||
// This is also used to retain __wrap_foo when foo is referenced. | |||||
uint8_t referenced : 1; | uint8_t referenced : 1; | ||||
MaskRay: Is this sentence stale now? | |||||
Hmm. In a way it is because referencedAfterWrap will be used for the retaining now, but referenced on the pre-wrapped symbol is still used to set referencedAfterWrap on the wrapped symbol. I think it's fine to remove the sentence though, since the referencedAfterWrap comment also mentions that property being set based on if the original symbol is referenced. smeenai: Hmm. In a way it is because `referencedAfterWrap` will be used for the retaining now, but… | |||||
// Used to track if this symbol will be referenced after wrapping is performed | |||||
// (i.e. this will be true for foo if __real_foo is referenced, and will be | |||||
// true for __wrap_foo if foo is referenced). | |||||
uint8_t referencedAfterWrap : 1; | |||||
The name may be too long. We don't need to pursue perfect grammar, we can just call it referencedAfterWrap MaskRay: The name may be too long. We don't need to pursue perfect grammar, we can just call it… | |||||
Sure, I'll change it. smeenai: Sure, I'll change it. | |||||
// True if this symbol is specified by --trace-symbol option. | // True if this symbol is specified by --trace-symbol option. | ||||
uint8_t traced : 1; | uint8_t traced : 1; | ||||
// True if the name contains '@'. | // True if the name contains '@'. | ||||
uint8_t hasVersionSuffix : 1; | uint8_t hasVersionSuffix : 1; | ||||
inline void replace(const Symbol &other); | inline void replace(const Symbol &other); | ||||
▲ Show 20 Lines • Show All 93 Lines • ▼ Show 20 Lines | |||||
protected: | protected: | ||||
Symbol(Kind k, InputFile *file, StringRef name, uint8_t binding, | Symbol(Kind k, InputFile *file, StringRef name, uint8_t binding, | ||||
uint8_t stOther, uint8_t type) | uint8_t stOther, uint8_t type) | ||||
: file(file), nameData(name.data()), nameSize(name.size()), type(type), | : file(file), nameData(name.data()), nameSize(name.size()), type(type), | ||||
binding(binding), stOther(stOther), symbolKind(k), | binding(binding), stOther(stOther), symbolKind(k), | ||||
visibility(stOther & 3), isPreemptible(false), | visibility(stOther & 3), isPreemptible(false), | ||||
isUsedInRegularObj(false), used(false), exportDynamic(false), | isUsedInRegularObj(false), used(false), exportDynamic(false), | ||||
inDynamicList(false), referenced(false), traced(false), | inDynamicList(false), referenced(false), referencedAfterWrap(false), | ||||
hasVersionSuffix(false), isInIplt(false), gotInIgot(false), | traced(false), hasVersionSuffix(false), isInIplt(false), | ||||
folded(false), needsTocRestore(false), scriptDefined(false), | gotInIgot(false), folded(false), needsTocRestore(false), | ||||
needsCopy(false), needsGot(false), needsPlt(false), needsTlsDesc(false), | scriptDefined(false), needsCopy(false), needsGot(false), | ||||
needsTlsGd(false), needsTlsGdToIe(false), needsGotDtprel(false), | needsPlt(false), needsTlsDesc(false), needsTlsGd(false), | ||||
needsTlsIe(false), hasDirectReloc(false) {} | needsTlsGdToIe(false), needsGotDtprel(false), needsTlsIe(false), | ||||
hasDirectReloc(false) {} | |||||
public: | public: | ||||
// True if this symbol is in the Iplt sub-section of the Plt and the Igot | // True if this symbol is in the Iplt sub-section of the Plt and the Igot | ||||
// sub-section of the .got.plt or .got. | // sub-section of the .got.plt or .got. | ||||
uint8_t isInIplt : 1; | uint8_t isInIplt : 1; | ||||
// True if this symbol needs a GOT entry and its GOT entry is actually in | // True if this symbol needs a GOT entry and its GOT entry is actually in | ||||
// Igot. This will be true only for certain non-preemptible ifuncs. | // Igot. This will be true only for certain non-preemptible ifuncs. | ||||
▲ Show 20 Lines • Show All 298 Lines • Show Last 20 Lines |
Is this sentence stale now?