LLVM 19.0.0git
Public Member Functions | Static Public Member Functions | List of all members
llvm::orc::DLLImportDefinitionGenerator Class Reference

A utility class to create COFF dllimport GOT symbols (__imp_*) and PLT stubs. More...

#include "llvm/ExecutionEngine/Orc/ExecutionUtils.h"

Inheritance diagram for llvm::orc::DLLImportDefinitionGenerator:
Inheritance graph
[legend]

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< DLLImportDefinitionGeneratorCreate (ExecutionSession &ES, ObjectLinkingLayer &L)
 Creates a DLLImportDefinitionGenerator instance.
 

Detailed Description

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 340 of file ExecutionUtils.h.

Member Function Documentation

◆ Create()

std::unique_ptr< DLLImportDefinitionGenerator > llvm::orc::DLLImportDefinitionGenerator::Create ( ExecutionSession ES,
ObjectLinkingLayer L 
)
static

Creates a DLLImportDefinitionGenerator instance.

Definition at line 486 of file ExecutionUtils.cpp.

Referenced by llvm::orc::COFFPlatform::setupJITDylib().

◆ tryToGenerate()

Error llvm::orc::DLLImportDefinitionGenerator::tryToGenerate ( LookupState LS,
LookupKind  K,
JITDylib JD,
JITDylibLookupFlags  JDLookupFlags,
const SymbolLookupSet LookupSet 
)
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 492 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().


The documentation for this class was generated from the following files: