LLVM 22.0.0git
|
A utility class to create COFF dllimport GOT symbols (__imp_*) and PLT stubs. More...
#include "llvm/ExecutionEngine/Orc/ExecutionUtils.h"
Public Member Functions | |
Error | tryToGenerate (LookupState &LS, LookupKind K, JITDylib &JD, JITDylibLookupFlags JDLookupFlags, const SymbolLookupSet &Symbols) override |
DefinitionGenerators should override this method to insert new definitions into the parent JITDylib. | |
Public Member Functions inherited from llvm::orc::DefinitionGenerator | |
virtual | ~DefinitionGenerator () |
Static Public Member Functions | |
static std::unique_ptr< DLLImportDefinitionGenerator > | Create (ExecutionSession &ES, ObjectLinkingLayer &L) |
Creates a DLLImportDefinitionGenerator instance. |
A utility class to create COFF dllimport GOT symbols (__imp_*) and PLT stubs.
If an instance of this class is attached to a JITDylib as a fallback definition generator, PLT stubs and dllimport __imp_ symbols will be generated for external symbols found outside the given jitdylib. Currently only supports x86_64 architecture.
Definition at line 359 of file ExecutionUtils.h.
|
static |
Creates a DLLImportDefinitionGenerator instance.
Definition at line 506 of file ExecutionUtils.cpp.
References llvm::orc::DefinitionGenerator::ExecutionSession.
Referenced by llvm::orc::COFFPlatform::setupJITDylib().
|
overridevirtual |
DefinitionGenerators should override this method to insert new definitions into the parent JITDylib.
K specifies the kind of this lookup. JD specifies the target JITDylib being searched, and JDLookupFlags specifies whether the search should match against hidden symbols. Finally, Symbols describes the set of unresolved symbols and their associated lookup flags.
Implements llvm::orc::DefinitionGenerator.
Definition at line 512 of file ExecutionUtils.cpp.
References llvm::orc::SymbolLookupSet::add(), llvm::StringRef::drop_front(), G, llvm::orc::RequiredSymbol, llvm::orc::Resolved, llvm::size(), llvm::StringRef::starts_with(), llvm::orc::Static, llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::try_emplace(), and llvm::orc::JITDylib::withLinkOrderDo().