|
LLVM 22.0.0git
|
#include "llvm/MC/MCSymbolELF.h"
Public Member Functions | |
| MCSymbolELF (const MCSymbolTableEntry *Name, bool isTemporary) | |
| void | setSize (const MCExpr *SS) |
| const MCExpr * | getSize () const |
| void | setVisibility (unsigned Visibility) |
| unsigned | getVisibility () const |
| void | setOther (unsigned Other) |
| unsigned | getOther () const |
| void | setType (unsigned Type) const |
| unsigned | getType () const |
| void | setBinding (unsigned Binding) const |
| unsigned | getBinding () const |
| bool | isBindingSet () const |
| void | setIsWeakref () const |
| bool | isWeakref () const |
| void | setIsSignature () const |
| bool | isSignature () const |
| void | setMemtag (bool Tagged) |
| bool | isMemtag () const |
| Public Member Functions inherited from llvm::MCSymbol | |
| StringRef | getName () const |
| getName - Get the symbol name. | |
| bool | isRegistered () const |
| void | setIsRegistered (bool Value) const |
| void | setUsedInReloc () const |
| bool | isUsedInReloc () const |
| uint32_t | getIndex () const |
| Get the (implementation defined) index. | |
| void | setIndex (uint32_t Value) const |
| Set the (implementation defined) index. | |
| uint64_t | getOffset () const |
| void | setOffset (uint64_t Value) |
| uint64_t | getCommonSize () const |
| Return the size of a 'common' symbol. | |
| void | setCommon (uint64_t Size, Align Alignment) |
| Mark this symbol as being 'common'. | |
| MaybeAlign | getCommonAlignment () const |
| Return the alignment of a 'common' symbol. | |
| bool | declareCommon (uint64_t Size, Align Alignment) |
| Declare this symbol as being 'common'. | |
| bool | isCommon () const |
| Is this a 'common' symbol. | |
| MCFragment * | getFragment () const |
| bool | isWeakExternal () const |
| LLVM_ABI void | print (raw_ostream &OS, const MCAsmInfo *MAI) const |
print - Print the value to the stream OS. | |
| LLVM_ABI void | dump () const |
| dump - Print the value to stderr. | |
| bool | isTemporary () const |
| isTemporary - Check if this is an assembler temporary symbol. | |
| bool | isRedefinable () const |
| Check if this symbol is redefinable. | |
| void | setRedefinable (bool Value) |
| Mark this symbol as redefinable. | |
| void | redefineIfPossible () |
| Prepare this symbol to be redefined. | |
| bool | isResolving () const |
| void | setIsResolving (bool V) |
| bool | isDefined () const |
| isDefined - Check if this symbol is defined (i.e., it has an address). | |
| bool | isInSection () const |
| isInSection - Check if this symbol is defined in some section (i.e., it is defined but not absolute). | |
| bool | isUndefined () const |
| isUndefined - Check if this symbol undefined (i.e., implicitly defined). | |
| bool | isAbsolute () const |
| isAbsolute - Check if this is an absolute symbol. | |
| MCSection & | getSection () const |
| Get the section associated with a defined, non-absolute symbol. | |
| void | setFragment (MCFragment *F) const |
Mark the symbol as defined in the fragment F. | |
| bool | isVariable () const |
| isVariable - Check if this is a variable symbol. | |
| const MCExpr * | getVariableValue () const |
| Get the expression of the variable symbol. | |
| LLVM_ABI void | setVariableValue (const MCExpr *Value) |
Friends | |
| class | MCAsmInfoELF |
Additional Inherited Members | |
| Protected Types inherited from llvm::MCSymbol | |
| enum | Kind : uint8_t { Regular , Equated , Common } |
| enum | : unsigned { NumCommonAlignmentBits = 5 } |
| The alignment of the symbol if it is 'common'. More... | |
| enum | : unsigned { NumFlagsBits = 16 } |
| The Flags field is used by object file implementations to store additional per symbol information which is not easily classified. More... | |
| using | NameEntryStorageTy |
| The name for a symbol. | |
| Protected Member Functions inherited from llvm::MCSymbol | |
| MCSymbol (const MCSymbolTableEntry *Name, bool isTemporary) | |
| MCSymbol (const MCSymbol &)=default | |
| MCSymbol & | operator= (const MCSymbol &)=delete |
| LLVM_ABI void * | operator new (size_t s, const MCSymbolTableEntry *Name, MCContext &Ctx) |
| uint32_t | getFlags () const |
| Get the (implementation defined) symbol flags. | |
| void | setFlags (uint32_t Value) const |
| Set the (implementation defined) symbol flags. | |
| void | modifyFlags (uint32_t Value, uint32_t Mask) const |
| Modify the flags via a mask. | |
| Protected Attributes inherited from llvm::MCSymbol | |
| MCFragment * | Fragment = nullptr |
| If a symbol has a Fragment, the section is implied, so we only need one pointer. | |
| unsigned | kind: 2 |
| The symbol kind. | |
| unsigned | HasName: 1 |
| True if this symbol is named. | |
| unsigned | IsTemporary: 1 |
| IsTemporary - True if this is an assembler temporary label, which typically does not survive in the .o file's symbol table. | |
| unsigned | IsRedefinable: 1 |
| True if this symbol can be redefined. | |
| unsigned | IsRegistered: 1 |
| unsigned | IsExternal: 1 |
| True if this symbol is visible outside this translation unit. | |
| unsigned | IsPrivateExtern: 1 |
| Mach-O specific: This symbol is private extern. | |
| unsigned | IsWeakExternal: 1 |
| This symbol is weak external. | |
| unsigned | IsUsedInReloc: 1 |
| True if we have created a relocation that uses this symbol. | |
| unsigned | IsResolving: 1 |
| Used to detect cyclic dependency like a = a + 1 and a = b; b = a. | |
| unsigned | CommonAlignLog2: NumCommonAlignmentBits |
| uint32_t | Flags: NumFlagsBits |
| uint32_t | Index = 0 |
| Index field, for use by the object file implementation. | |
| union { | |
| uint64_t Offset | |
| The offset to apply to the fragment address to form this symbol's value. More... | |
| uint64_t CommonSize | |
| The size of the symbol, if it is 'common'. More... | |
| const MCExpr * Value | |
| If non-null, the value for a variable symbol. More... | |
| }; | |
| Static Protected Attributes inherited from llvm::MCSymbol | |
| static LLVM_ABI MCFragment * | AbsolutePseudoFragment = &SentinelFragment |
Definition at line 15 of file MCSymbolELF.h.
|
inline |
Definition at line 22 of file MCSymbolELF.h.
References llvm::MCSymbol::isTemporary(), and llvm::MCSymbol::MCSymbol().
| unsigned llvm::MCSymbolELF::getBinding | ( | ) | const |
Definition at line 66 of file MCSymbolELF.cpp.
References llvm::MCSymbol::Flags, isBindingSet(), llvm::MCSymbol::isDefined(), isSignature(), llvm::MCSymbol::isUsedInReloc(), llvm_unreachable, llvm::ELF::STB_GLOBAL, llvm::ELF::STB_GNU_UNIQUE, llvm::ELF::STB_LOCAL, and llvm::ELF::STB_WEAK.
| unsigned llvm::MCSymbolELF::getOther | ( | ) | const |
Definition at line 166 of file MCSymbolELF.cpp.
References llvm::MCSymbol::Flags, and llvm::Other.
Definition at line 26 of file MCSymbolELF.h.
References llvm::MCSymbol::MCExpr.
| unsigned llvm::MCSymbolELF::getType | ( | ) | const |
Definition at line 123 of file MCSymbolELF.cpp.
References llvm::MCSymbol::Flags, llvm_unreachable, llvm::ELF::STT_COMMON, llvm::ELF::STT_FUNC, llvm::ELF::STT_GNU_IFUNC, llvm::ELF::STT_NOTYPE, llvm::ELF::STT_OBJECT, llvm::ELF::STT_SECTION, and llvm::ELF::STT_TLS.
Referenced by llvm::ELFObjectWriter::useSectionSymbol().
| unsigned llvm::MCSymbolELF::getVisibility | ( | ) | const |
Definition at line 153 of file MCSymbolELF.cpp.
References llvm::MCSymbol::Flags.
| bool llvm::MCSymbolELF::isBindingSet | ( | ) | const |
Definition at line 194 of file MCSymbolELF.cpp.
References llvm::MCSymbol::getFlags().
Referenced by getBinding().
| bool llvm::MCSymbolELF::isMemtag | ( | ) | const |
Definition at line 198 of file MCSymbolELF.cpp.
References llvm::MCSymbol::getFlags().
| bool llvm::MCSymbolELF::isSignature | ( | ) | const |
Definition at line 185 of file MCSymbolELF.cpp.
References llvm::MCSymbol::getFlags().
Referenced by getBinding().
| bool llvm::MCSymbolELF::isWeakref | ( | ) | const |
Definition at line 176 of file MCSymbolELF.cpp.
References llvm::MCSymbol::getFlags().
| void llvm::MCSymbolELF::setBinding | ( | unsigned | Binding | ) | const |
Definition at line 43 of file MCSymbolELF.cpp.
References Binding, llvm::MCSymbol::getFlags(), llvm_unreachable, llvm::MCSymbol::setFlags(), llvm::ELF::STB_GLOBAL, llvm::ELF::STB_GNU_UNIQUE, llvm::ELF::STB_LOCAL, and llvm::ELF::STB_WEAK.
Referenced by llvm::MCELFStreamer::changeSection(), llvm::AMDGPUTargetELFStreamer::EmitAmdhsaKernelDescriptor(), llvm::HexagonMCELFStreamer::HexagonMCEmitCommonSymbol(), and llvm::HexagonMCELFStreamer::HexagonMCEmitLocalCommonSymbol().
| void llvm::MCSymbolELF::setIsSignature | ( | ) | const |
Definition at line 180 of file MCSymbolELF.cpp.
References llvm::MCSymbol::getFlags(), and llvm::MCSymbol::setFlags().
| void llvm::MCSymbolELF::setIsWeakref | ( | ) | const |
Definition at line 171 of file MCSymbolELF.cpp.
References llvm::MCSymbol::getFlags(), and llvm::MCSymbol::setFlags().
| void llvm::MCSymbolELF::setMemtag | ( | bool | Tagged | ) |
Definition at line 202 of file MCSymbolELF.cpp.
References llvm::MCSymbol::getFlags(), and llvm::MCSymbol::setFlags().
| void llvm::MCSymbolELF::setOther | ( | unsigned | Other | ) |
Definition at line 158 of file MCSymbolELF.cpp.
References assert(), llvm::MCSymbol::getFlags(), llvm::Other, and llvm::MCSymbol::setFlags().
Referenced by llvm::MipsTargetELFStreamer::emitAssignment().
Definition at line 24 of file MCSymbolELF.h.
References llvm::MCSymbol::MCExpr.
| void llvm::MCSymbolELF::setType | ( | unsigned | Type | ) | const |
Definition at line 92 of file MCSymbolELF.cpp.
References llvm::MCSymbol::getFlags(), llvm_unreachable, llvm::MCSymbol::setFlags(), llvm::ELF::STT_COMMON, llvm::ELF::STT_FUNC, llvm::ELF::STT_GNU_IFUNC, llvm::ELF::STT_NOTYPE, llvm::ELF::STT_OBJECT, llvm::ELF::STT_SECTION, and llvm::ELF::STT_TLS.
Referenced by llvm::AMDGPUTargetELFStreamer::emitAMDGPULDS(), and llvm::AMDGPUTargetELFStreamer::EmitAMDGPUSymbolType().
| void llvm::MCSymbolELF::setVisibility | ( | unsigned | Visibility | ) |
Definition at line 145 of file MCSymbolELF.cpp.
References assert(), llvm::MCSymbol::getFlags(), llvm::MCSymbol::setFlags(), llvm::ELF::STV_DEFAULT, llvm::ELF::STV_HIDDEN, llvm::ELF::STV_INTERNAL, and llvm::ELF::STV_PROTECTED.
|
friend |
Definition at line 16 of file MCSymbolELF.h.
References MCAsmInfoELF, and llvm::MCSymbol::MCExpr.
Referenced by MCAsmInfoELF.