LLVM 22.0.0git
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:
[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 ()

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

Member Function Documentation

◆ Create()

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

◆ 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 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().


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