LLVM 20.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 () |
virtual Error | tryToGenerate (LookupState &LS, LookupKind K, JITDylib &JD, JITDylibLookupFlags JDLookupFlags, const SymbolLookupSet &LookupSet)=0 |
DefinitionGenerators should override this method to insert new definitions into the parent JITDylib. | |
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 351 of file ExecutionUtils.h.
|
static |
Creates a DLLImportDefinitionGenerator instance.
Definition at line 479 of file ExecutionUtils.cpp.
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 485 of file ExecutionUtils.cpp.
References llvm::orc::SymbolLookupSet::add(), llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::count(), llvm::orc::DLSym, llvm::StringRef::drop_front(), for(), G, llvm::orc::ExecutionSession::intern(), llvm::orc::ExecutionSession::lookup(), llvm::orc::RequiredSymbol, llvm::orc::Resolved, llvm::size(), llvm::StringRef::starts_with(), and llvm::orc::JITDylib::withLinkOrderDo().