|
LLVM
10.0.0
|
Namespaces | |
| MachO_arm64_Edges | |
| MachO_x86_64_Edges | |
Classes | |
| class | Addressable |
| Base class for Addressable entities (externals, absolutes, blocks). More... | |
| class | BasicGOTAndStubsBuilder |
| class | Block |
| An Addressable with content and edges. More... | |
| class | BlockAddressMap |
| Enables easy lookup of blocks by addresses. More... | |
| class | Edge |
| Represents fixups and constraints in the LinkGraph. More... | |
| class | EHFrameEdgeFixer |
| A LinkGraph pass that adds missing FDE-to-CIE, FDE-to-PC and FDE-to-LSDA edges. More... | |
| class | EHFrameRegistrar |
| Supports registration/deregistration of EH-frames in a target process. More... | |
| class | EHFrameSplitter |
| A LinkGraph pass that splits blocks in an eh-frame section into sub-blocks representing individual eh-frames. More... | |
| class | InProcessEHFrameRegistrar |
| Registers / Deregisters EH-frames in the current process. More... | |
| class | InProcessMemoryManager |
| A JITLinkMemoryManager that allocates in-process memory. More... | |
| class | JITLinkAsyncLookupContinuation |
| A function object to call with a resolved symbol map (See AsyncLookupResult) or an error if resolution failed. More... | |
| class | JITLinkContext |
| Holds context for a single jitLink invocation. More... | |
| class | JITLinker |
| class | JITLinkerBase |
| Base class for a JIT linker. More... | |
| class | JITLinkError |
| Base class for errors originating in JIT linker, e.g. More... | |
| class | JITLinkMemoryManager |
| Manages allocations of JIT memory. More... | |
| class | LinkGraph |
| class | MachOJITLinker_arm64 |
| class | MachOJITLinker_x86_64 |
| class | MachOLinkGraphBuilder |
| struct | PassConfiguration |
| An LinkGraph pass configuration, consisting of a list of pre-prune, post-prune, and post-fixup passes. More... | |
| class | Section |
| Represents an object file section. More... | |
| class | SectionRange |
| Represents a section address range via a pair of Block pointers to the first and last Blocks in the section. More... | |
| class | Symbol |
| Symbol representation. More... | |
| class | SymbolAddressMap |
| A map of addresses to Symbols. More... | |
Typedefs | |
| using | StoreFrameRangeFunction = std::function< void(JITTargetAddress EHFrameSectionAddr, size_t EHFrameSectionSize)> |
| using | SectionOrdinal = unsigned |
| using | LinkGraphPassFunction = std::function< Error(LinkGraph &)> |
| A function for mutating LinkGraphs. More... | |
| using | LinkGraphPassList = std::vector< LinkGraphPassFunction > |
| A list of LinkGraph passes. More... | |
| using | AsyncLookupResult = DenseMap< StringRef, JITEvaluatedSymbol > |
| A map of symbol names to resolved addresses. More... | |
Enumerations | |
| enum | Linkage : uint8_t { Linkage::Strong, Linkage::Weak } |
| Describes symbol linkage. More... | |
| enum | Scope : uint8_t { Scope::Default, Scope::Hidden, Scope::Local } |
| Defines the scope in which this symbol should be visible: Default – Visible in the public interface of the linkage unit. More... | |
| enum | SymbolLookupFlags { SymbolLookupFlags::RequiredSymbol, SymbolLookupFlags::WeaklyReferencedSymbol } |
| Flags for symbol lookup. More... | |
Functions | |
| Error | registerEHFrameSection (const void *EHFrameSectionAddr, size_t EHFrameSectionSize) |
| Registers all FDEs in the given eh-frame section with the current process. More... | |
| Error | deregisterEHFrameSection (const void *EHFrameSectionAddr, size_t EHFrameSectionSize) |
| Deregisters all FDEs in the given eh-frame section with the current process. More... | |
| LinkGraphPassFunction | createEHFrameRecorderPass (const Triple &TT, StoreFrameRangeFunction StoreFrameRange) |
| Creates a pass that records the address and size of the EH frame section. More... | |
| const char * | getGenericEdgeKindName (Edge::Kind K) |
| Returns the string name of the given generic edge kind, or "unknown" otherwise. More... | |
| const char * | getLinkageName (Linkage L) |
| For errors and debugging output. More... | |
| const char * | getScopeName (Scope S) |
| For debugging output. More... | |
| raw_ostream & | operator<< (raw_ostream &OS, const Block &B) |
| raw_ostream & | operator<< (raw_ostream &OS, const Symbol &A) |
| void | printEdge (raw_ostream &OS, const Block &B, const Edge &E, StringRef EdgeKindName) |
| raw_ostream & | operator<< (raw_ostream &OS, const SymbolLookupFlags &LF) |
| template<typename Continuation > | |
| std::unique_ptr< JITLinkAsyncLookupContinuation > | createLookupContinuation (Continuation Cont) |
| Create a lookup continuation from a function object. More... | |
| Error | markAllSymbolsLive (LinkGraph &G) |
| Marks all symbols in a graph live. More... | |
| void | jitLink (std::unique_ptr< JITLinkContext > Ctx) |
| Basic JITLink implementation. More... | |
| void | jitLink_MachO (std::unique_ptr< JITLinkContext > Ctx) |
| jit-link the given ObjBuffer, which must be a MachO object file. More... | |
| void | jitLink_MachO_arm64 (std::unique_ptr< JITLinkContext > Ctx) |
| jit-link the given object buffer, which must be a MachO arm64 object file. More... | |
| StringRef | getMachOARM64RelocationKindName (Edge::Kind R) |
| Return the string name of the given MachO arm64 edge kind. More... | |
| void | jitLink_MachO_x86_64 (std::unique_ptr< JITLinkContext > Ctx) |
| jit-link the given object buffer, which must be a MachO x86-64 object file. More... | |
| StringRef | getMachOX86RelocationKindName (Edge::Kind R) |
| Return the string name of the given MachO x86-64 edge kind. More... | |
| static Error | registerFrameWrapper (const void *P) |
| static Error | deregisterFrameWrapper (const void *P) |
| void | prune (LinkGraph &G) |
| Removes dead symbols/blocks/addressables. More... | |
| using llvm::jitlink::AsyncLookupResult = typedef DenseMap<StringRef, JITEvaluatedSymbol> |
| using llvm::jitlink::LinkGraphPassFunction = typedef std::function<Error(LinkGraph &)> |
| using llvm::jitlink::LinkGraphPassList = typedef std::vector<LinkGraphPassFunction> |
| using llvm::jitlink::SectionOrdinal = typedef unsigned |
| using llvm::jitlink::StoreFrameRangeFunction = typedef std::function<void(JITTargetAddress EHFrameSectionAddr, size_t EHFrameSectionSize)> |
Definition at line 75 of file EHFrameSupport.h.
|
strong |
|
strong |
Defines the scope in which this symbol should be visible: Default – Visible in the public interface of the linkage unit.
Hidden – Visible within the linkage unit, but not exported from it. Local – Visible only within the LinkGraph.
| Enumerator | |
|---|---|
| Default | |
| Hidden | |
| Local | |
|
strong |
Flags for symbol lookup.
FIXME: These basically duplicate orc::SymbolLookupFlags – We should merge the two types once we have an OrcSupport library.
| Enumerator | |
|---|---|
| RequiredSymbol | |
| WeaklyReferencedSymbol | |
| LinkGraphPassFunction llvm::jitlink::createEHFrameRecorderPass | ( | const Triple & | TT, |
| StoreFrameRangeFunction | StoreFrameRange | ||
| ) |
Creates a pass that records the address and size of the EH frame section.
If no eh-frame section is found then the address and size will both be given as zero.
Authors of JITLinkContexts can use this function to register a post-fixup pass that records the range of the eh-frame section. This range can be used after finalization to register and deregister the frame.
Definition at line 774 of file EHFrameSupport.cpp.
References llvm::jitlink::LinkGraph::findSectionByName(), G, llvm::Triple::getObjectFormat(), llvm::Triple::MachO, Size, and llvm::Error::success().
Referenced by llvm::orc::EHFrameRegistrationPlugin::modifyPassConfig().
| std::unique_ptr<JITLinkAsyncLookupContinuation> llvm::jitlink::createLookupContinuation | ( | Continuation | Cont | ) |
| Error llvm::jitlink::deregisterEHFrameSection | ( | const void * | EHFrameSectionAddr, |
| size_t | EHFrameSectionSize | ||
| ) |
Deregisters all FDEs in the given eh-frame section with the current process.
Definition at line 753 of file EHFrameSupport.cpp.
References deregisterFrameWrapper().
Referenced by llvm::jitlink::InProcessEHFrameRegistrar::deregisterEHFrames().
Definition at line 677 of file EHFrameSupport.cpp.
References llvm::sys::DynamicLibrary::SearchForAddressOfSymbol(), llvm::COFF::SectionSize, and llvm::Error::success().
Referenced by deregisterEHFrameSection().
| const char * llvm::jitlink::getGenericEdgeKindName | ( | Edge::Kind | K | ) |
Returns the string name of the given generic edge kind, or "unknown" otherwise.
Useful for debugging.
Definition at line 59 of file JITLink.cpp.
References llvm::Invalid, and llvm_unreachable.
Referenced by llvm::jitlink::LinkGraph::dump(), getMachOARM64RelocationKindName(), getMachOX86RelocationKindName(), and llvm::jitlink::Edge::setAddend().
For errors and debugging output.
Definition at line 70 of file JITLink.cpp.
References llvm_unreachable.
| StringRef llvm::jitlink::getMachOARM64RelocationKindName | ( | Edge::Kind | R | ) |
Return the string name of the given MachO arm64 edge kind.
Definition at line 688 of file MachO_arm64.cpp.
References llvm::jitlink::MachO_arm64_Edges::Branch26, llvm::jitlink::MachO_arm64_Edges::Delta32, llvm::jitlink::MachO_arm64_Edges::Delta64, getGenericEdgeKindName(), llvm::jitlink::MachO_arm64_Edges::GOTPage21, llvm::jitlink::MachO_arm64_Edges::GOTPageOffset12, llvm::jitlink::MachO_arm64_Edges::LDRLiteral19, llvm::jitlink::MachO_arm64_Edges::NegDelta32, llvm::jitlink::MachO_arm64_Edges::NegDelta64, llvm::jitlink::MachO_arm64_Edges::Page21, llvm::jitlink::MachO_arm64_Edges::PageOffset12, llvm::jitlink::MachO_arm64_Edges::PairedAddend, llvm::jitlink::MachO_arm64_Edges::Pointer64, llvm::jitlink::MachO_arm64_Edges::Pointer64Anon, and llvm::jitlink::MachO_arm64_Edges::PointerToGOT.
Referenced by llvm::jitlink::MachOJITLinker_arm64::MachOJITLinker_arm64().
| StringRef llvm::jitlink::getMachOX86RelocationKindName | ( | Edge::Kind | R | ) |
Return the string name of the given MachO x86-64 edge kind.
Definition at line 582 of file MachO_x86_64.cpp.
References llvm::jitlink::MachO_x86_64_Edges::Branch32, llvm::jitlink::MachO_x86_64_Edges::Delta32, llvm::jitlink::MachO_x86_64_Edges::Delta64, getGenericEdgeKindName(), llvm::jitlink::MachO_x86_64_Edges::NegDelta32, llvm::jitlink::MachO_x86_64_Edges::NegDelta64, llvm::jitlink::MachO_x86_64_Edges::PCRel32, llvm::jitlink::MachO_x86_64_Edges::PCRel32Anon, llvm::jitlink::MachO_x86_64_Edges::PCRel32GOT, llvm::jitlink::MachO_x86_64_Edges::PCRel32GOTLoad, llvm::jitlink::MachO_x86_64_Edges::PCRel32Minus1, llvm::jitlink::MachO_x86_64_Edges::PCRel32Minus1Anon, llvm::jitlink::MachO_x86_64_Edges::PCRel32Minus2, llvm::jitlink::MachO_x86_64_Edges::PCRel32Minus2Anon, llvm::jitlink::MachO_x86_64_Edges::PCRel32Minus4, llvm::jitlink::MachO_x86_64_Edges::PCRel32Minus4Anon, llvm::jitlink::MachO_x86_64_Edges::PCRel32TLV, llvm::jitlink::MachO_x86_64_Edges::Pointer32, llvm::jitlink::MachO_x86_64_Edges::Pointer64, and llvm::jitlink::MachO_x86_64_Edges::Pointer64Anon.
Referenced by llvm::jitlink::MachOJITLinker_x86_64::MachOJITLinker_x86_64().
For debugging output.
Definition at line 80 of file JITLink.cpp.
References llvm::Default, llvm::cl::Hidden, and llvm_unreachable.
| void llvm::jitlink::jitLink | ( | std::unique_ptr< JITLinkContext > | Ctx | ) |
Basic JITLink implementation.
This function will use sensible defaults for GOT and Stub handling.
Definition at line 302 of file JITLink.cpp.
References llvm::identify_magic(), jitLink_MachO(), llvm::file_magic::macho_object, and Magic.
Referenced by llvm::orc::ObjectLinkingLayer::emit().
| void llvm::jitlink::jitLink_MachO | ( | std::unique_ptr< JITLinkContext > | Ctx | ) |
jit-link the given ObjBuffer, which must be a MachO object file.
Uses conservative defaults for GOT and stub handling based on the target platform.
Definition at line 30 of file MachO.cpp.
References llvm::MachO::CPU_TYPE_ARM64, llvm::MachO::CPU_TYPE_X86_64, llvm::MachO::mach_header_64::cpusubtype, llvm::MachO::mach_header_64::cputype, llvm::Data, llvm::StringRef::data(), llvm::dbgs(), llvm::format(), jitLink_MachO_arm64(), jitLink_MachO_x86_64(), LLVM_DEBUG, Magic, llvm::MachO::MH_CIGAM, llvm::MachO::MH_CIGAM_64, llvm::MachO::MH_MAGIC, llvm::MachO::MH_MAGIC_64, llvm::StringRef::size(), and llvm::MachO::swapStruct().
Referenced by jitLink().
| void llvm::jitlink::jitLink_MachO_arm64 | ( | std::unique_ptr< JITLinkContext > | Ctx | ) |
jit-link the given object buffer, which must be a MachO arm64 object file.
If PrePrunePasses is empty then a default mark-live pass will be inserted that will mark all exported atoms live. If PrePrunePasses is not empty, the caller is responsible for including a pass to mark atoms as live.
If PostPrunePasses is empty then a default GOT-and-stubs insertion pass will be inserted. If PostPrunePasses is not empty then the caller is responsible for including a pass to insert GOT and stub edges.
Definition at line 663 of file MachO_arm64.cpp.
References G, markAllSymbolsLive(), llvm::jitlink::PassConfiguration::PostPrunePasses, llvm::jitlink::PassConfiguration::PrePrunePasses, llvm::Error::success(), and llvm::TT.
Referenced by jitLink_MachO().
| void llvm::jitlink::jitLink_MachO_x86_64 | ( | std::unique_ptr< JITLinkContext > | Ctx | ) |
jit-link the given object buffer, which must be a MachO x86-64 object file.
If PrePrunePasses is empty then a default mark-live pass will be inserted that will mark all exported atoms live. If PrePrunePasses is not empty, the caller is responsible for including a pass to mark atoms as live.
If PostPrunePasses is empty then a default GOT-and-stubs insertion pass will be inserted. If PostPrunePasses is not empty then the caller is responsible for including a pass to insert GOT and stub edges.
Definition at line 552 of file MachO_x86_64.cpp.
References llvm::jitlink::MachO_x86_64_Edges::Delta64, G, markAllSymbolsLive(), llvm::jitlink::MachO_x86_64_Edges::NegDelta32, llvm::jitlink::PassConfiguration::PostPrunePasses, llvm::jitlink::PassConfiguration::PrePrunePasses, llvm::Error::success(), and llvm::TT.
Referenced by jitLink_MachO().
Marks all symbols in a graph live.
This can be used as a default, conservative mark-live implementation.
Definition at line 296 of file JITLink.cpp.
References llvm::jitlink::LinkGraph::defined_symbols(), and llvm::Error::success().
Referenced by jitLink_MachO_arm64(), and jitLink_MachO_x86_64().
| raw_ostream & llvm::jitlink::operator<< | ( | raw_ostream & | OS, |
| const Block & | B | ||
| ) |
Definition at line 92 of file JITLink.cpp.
References llvm::formatv(), llvm::jitlink::Addressable::getAddress(), llvm::jitlink::Block::getAlignment(), llvm::jitlink::Block::getAlignmentOffset(), llvm::jitlink::Section::getName(), llvm::jitlink::Block::getSection(), llvm::jitlink::Block::getSize(), and llvm::jitlink::Block::isZeroFill().
Referenced by llvm::jitlink::Symbol::setScope().
| raw_ostream & llvm::jitlink::operator<< | ( | raw_ostream & | OS, |
| const Symbol & | A | ||
| ) |
Definition at line 101 of file JITLink.cpp.
References llvm::Default, llvm::StringRef::empty(), llvm::formatv(), llvm::jitlink::Addressable::getAddress(), llvm::jitlink::Symbol::getAddress(), llvm::jitlink::Symbol::getAddressable(), llvm::jitlink::Symbol::getBlock(), llvm::jitlink::Symbol::getLinkage(), llvm::jitlink::Symbol::getName(), llvm::jitlink::Section::getName(), llvm::jitlink::Symbol::getOffset(), llvm::jitlink::Symbol::getScope(), llvm::jitlink::Block::getSection(), llvm::jitlink::Symbol::getSize(), llvm::cl::Hidden, llvm::jitlink::Symbol::isDefined(), and llvm::jitlink::Symbol::isLive().
| raw_ostream & llvm::jitlink::operator<< | ( | raw_ostream & | OS, |
| const SymbolLookupFlags & | LF | ||
| ) |
Definition at line 269 of file JITLink.cpp.
References llvm_unreachable.
| void llvm::jitlink::printEdge | ( | raw_ostream & | OS, |
| const Block & | B, | ||
| const Edge & | E, | ||
| StringRef | EdgeKindName | ||
| ) |
Definition at line 138 of file JITLink.cpp.
References llvm::formatv(), llvm::jitlink::Edge::getAddend(), llvm::jitlink::Addressable::getAddress(), llvm::jitlink::Edge::getOffset(), and llvm::jitlink::Edge::getTarget().
Referenced by llvm::jitlink::LinkGraph::dump(), llvm::jitlink::MachOJITLinker_arm64::MachOJITLinker_arm64(), llvm::jitlink::MachOJITLinker_x86_64::MachOJITLinker_x86_64(), and llvm::jitlink::Symbol::setScope().
| void llvm::jitlink::prune | ( | LinkGraph & | G | ) |
Removes dead symbols/blocks/addressables.
Finds the set of symbols and addressables reachable from any symbol initially marked live. All symbols/addressables not marked live at the end of this process are removed.
Definition at line 316 of file JITLinkGeneric.cpp.
References B, llvm::jitlink::LinkGraph::blocks(), llvm::detail::DenseSetImpl< ValueT, MapTy, ValueInfoT >::count(), llvm::dbgs(), llvm::jitlink::LinkGraph::defined_symbols(), E, llvm::detail::DenseSetImpl< ValueT, MapTy, ValueInfoT >::insert(), LLVM_DEBUG, llvm::jitlink::LinkGraph::removeBlock(), and llvm::jitlink::LinkGraph::removeDefinedSymbol().
Referenced by llvm::StripDebugInfo().
| Error llvm::jitlink::registerEHFrameSection | ( | const void * | EHFrameSectionAddr, |
| size_t | EHFrameSectionSize | ||
| ) |
Registers all FDEs in the given eh-frame section with the current process.
Definition at line 736 of file EHFrameSupport.cpp.
References registerFrameWrapper().
Referenced by llvm::jitlink::InProcessEHFrameRegistrar::registerEHFrames().
Definition at line 661 of file EHFrameSupport.cpp.
References llvm::sys::DynamicLibrary::SearchForAddressOfSymbol(), and llvm::Error::success().
Referenced by registerEHFrameSection().
1.8.13