22#define DEBUG_TYPE "orc"
35 createDSOHandleSectionInterface(ENP, DSOHandleSymbol)),
40 void materialize(std::unique_ptr<MaterializationResponsibility> R)
override {
46 switch (TT.getArch()) {
49 Endianness = support::endianness::little;
54 Endianness = support::endianness::little;
62 auto G = std::make_unique<jitlink::LinkGraph>(
63 "<DSOHandleMU>", TT, PointerSize, Endianness,
65 auto &DSOHandleSection =
66 G->createSection(
".data.__dso_handle", MemProt::Read);
67 auto &DSOHandleBlock =
G->createContentBlock(
70 auto &DSOHandleSymbol =
G->addDefinedSymbol(
71 DSOHandleBlock, 0, *R->getInitializerSymbol(), DSOHandleBlock.getSize(),
72 jitlink::Linkage::Strong, jitlink::Scope::Default,
false,
true);
73 DSOHandleBlock.addEdge(EdgeKind, 0, DSOHandleSymbol, 0);
91 static const char Content[8] = {0};
106 JITDylib &PlatformJD, std::unique_ptr<DefinitionGenerator> OrcRuntime,
107 std::optional<SymbolAliasMap> RuntimeAliases) {
111 return make_error<StringError>(
"Unsupported ELFNixPlatform triple: " +
118 if (!RuntimeAliases) {
120 if (!StandardRuntimeAliases)
121 return StandardRuntimeAliases.takeError();
122 RuntimeAliases = std::move(*StandardRuntimeAliases);
127 return std::move(Err);
131 {{ES.
intern(
"__orc_rt_jit_dispatch"),
132 {EPC.getJITDispatchInfo().JITDispatchFunction.getValue(),
134 {ES.
intern(
"__orc_rt_jit_dispatch_ctx"),
135 {EPC.getJITDispatchInfo().JITDispatchContext.getValue(),
137 return std::move(Err);
142 ES, ObjLinkingLayer, PlatformJD, std::move(OrcRuntime), Err));
144 return std::move(Err);
151 JITDylib &PlatformJD,
const char *OrcRuntimePath,
152 std::optional<SymbolAliasMap> RuntimeAliases) {
155 auto OrcRuntimeArchiveGenerator =
157 if (!OrcRuntimeArchiveGenerator)
158 return OrcRuntimeArchiveGenerator.takeError();
160 return Create(ES, ObjLinkingLayer, PlatformJD,
161 std::move(*OrcRuntimeArchiveGenerator),
162 std::move(RuntimeAliases));
167 std::make_unique<DSOHandleMaterializationUnit>(*
this, DSOHandleSymbol));
181 RegisteredInitSymbols[&JD].add(InitSym,
184 dbgs() <<
"ELFNixPlatform: Registered init symbol " << *InitSym
185 <<
" for MU " << MU.
getName() <<
"\n";
195 ArrayRef<std::pair<const char *, const char *>> AL) {
196 for (
auto &KV : AL) {
197 auto AliasName = ES.
intern(KV.first);
198 assert(!Aliases.
count(AliasName) &&
"Duplicate symbol name in alias map");
199 Aliases[std::move(AliasName)] = {ES.
intern(KV.second),
215 auto RTRegisterFrame = ES.
intern(
"__orc_rt_register_eh_frame_section");
216 auto LibUnwindRegisterFrame = ES.
intern(
"__unw_add_dynamic_eh_frame_section");
217 auto RTDeregisterFrame = ES.
intern(
"__orc_rt_deregister_eh_frame_section");
218 auto LibUnwindDeregisterFrame =
219 ES.
intern(
"__unw_remove_dynamic_eh_frame_section");
222 .add(LibUnwindRegisterFrame,
224 .add(LibUnwindDeregisterFrame,
228 return SM.takeError();
229 }
else if (SM->size() == 2) {
231 dbgs() <<
"Using libunwind " << LibUnwindRegisterFrame
232 <<
" for unwind info registration\n";
234 Aliases[std::move(RTRegisterFrame)] = {LibUnwindRegisterFrame,
236 Aliases[std::move(RTDeregisterFrame)] = {LibUnwindDeregisterFrame,
242 dbgs() <<
"Using libgcc __register_frame"
243 <<
" for unwind info registration\n";
245 Aliases[std::move(RTRegisterFrame)] = {ES.
intern(
"__register_frame"),
247 Aliases[std::move(RTDeregisterFrame)] = {ES.
intern(
"__deregister_frame"),
256 static const std::pair<const char *, const char *> RequiredCXXAliases[] = {
257 {
"__cxa_atexit",
"__orc_rt_elfnix_cxa_atexit"},
258 {
"atexit",
"__orc_rt_elfnix_atexit"}};
265 static const std::pair<const char *, const char *>
266 StandardRuntimeUtilityAliases[] = {
267 {
"__orc_rt_run_program",
"__orc_rt_elfnix_run_program"},
268 {
"__orc_rt_jit_dlerror",
"__orc_rt_elfnix_jit_dlerror"},
269 {
"__orc_rt_jit_dlopen",
"__orc_rt_elfnix_jit_dlopen"},
270 {
"__orc_rt_jit_dlclose",
"__orc_rt_elfnix_jit_dlclose"},
271 {
"__orc_rt_jit_dlsym",
"__orc_rt_elfnix_jit_dlsym"},
272 {
"__orc_rt_log_error",
"__orc_rt_log_error_to_stderr"}};
275 StandardRuntimeUtilityAliases);
278bool ELFNixPlatform::supportedTarget(
const Triple &TT) {
279 switch (TT.getArch()) {
288ELFNixPlatform::ELFNixPlatform(
291 std::unique_ptr<DefinitionGenerator> OrcRuntimeGenerator,
Error &Err)
292 : ES(ES), ObjLinkingLayer(ObjLinkingLayer),
293 DSOHandleSymbol(ES.intern(
"__dso_handle")) {
296 ObjLinkingLayer.
addPlugin(std::make_unique<ELFNixPlatformPlugin>(*
this));
298 PlatformJD.
addGenerator(std::move(OrcRuntimeGenerator));
307 RegisteredInitSymbols[&PlatformJD].add(
311 if (
auto E2 = associateRuntimeSupportFunctions(PlatformJD)) {
319 if (
auto E2 = bootstrapELFNixRuntime(PlatformJD)) {
325Error ELFNixPlatform::associateRuntimeSupportFunctions(
JITDylib &PlatformJD) {
328 using GetInitializersSPSSig =
330 WFs[ES.
intern(
"__orc_rt_elfnix_get_initializers_tag")] =
332 this, &ELFNixPlatform::rt_getInitializers);
334 using GetDeinitializersSPSSig =
336 WFs[ES.
intern(
"__orc_rt_elfnix_get_deinitializers_tag")] =
338 this, &ELFNixPlatform::rt_getDeinitializers);
340 using LookupSymbolSPSSig =
342 WFs[ES.
intern(
"__orc_rt_elfnix_symbol_lookup_tag")] =
344 &ELFNixPlatform::rt_lookupSymbol);
349void ELFNixPlatform::getInitializersBuildSequencePhase(
350 SendInitializerSequenceFn SendResult,
JITDylib &JD,
351 std::vector<JITDylibSP> DFSLinkOrder) {
354 std::lock_guard<std::mutex> Lock(PlatformMutex);
355 for (
auto &InitJD :
reverse(DFSLinkOrder)) {
357 dbgs() <<
"ELFNixPlatform: Appending inits for \"" << InitJD->getName()
358 <<
"\" to sequence\n";
360 auto ISItr = InitSeqs.find(InitJD.get());
361 if (ISItr != InitSeqs.end()) {
362 FullInitSeq.emplace_back(std::move(ISItr->second));
363 InitSeqs.erase(ISItr);
368 SendResult(std::move(FullInitSeq));
371void ELFNixPlatform::getInitializersLookupPhase(
372 SendInitializerSequenceFn SendResult,
JITDylib &JD) {
376 SendResult(DFSLinkOrder.takeError());
382 for (
auto &InitJD : *DFSLinkOrder) {
383 auto RISItr = RegisteredInitSymbols.find(InitJD.get());
384 if (RISItr != RegisteredInitSymbols.end()) {
385 NewInitSymbols[InitJD.get()] = std::move(RISItr->second);
386 RegisteredInitSymbols.erase(RISItr);
393 if (NewInitSymbols.
empty()) {
394 getInitializersBuildSequencePhase(std::move(SendResult), JD,
395 std::move(*DFSLinkOrder));
401 [
this, SendResult = std::move(SendResult), &JD](
Error Err)
mutable {
403 SendResult(std::move(Err));
405 getInitializersLookupPhase(std::move(SendResult), JD);
407 ES, std::move(NewInitSymbols));
410void ELFNixPlatform::rt_getInitializers(SendInitializerSequenceFn SendResult,
413 dbgs() <<
"ELFNixPlatform::rt_getInitializers(\"" << JDName <<
"\")\n";
419 dbgs() <<
" No such JITDylib \"" << JDName <<
"\". Sending error.\n";
421 SendResult(make_error<StringError>(
"No JITDylib named " + JDName,
426 getInitializersLookupPhase(std::move(SendResult), *JD);
429void ELFNixPlatform::rt_getDeinitializers(
430 SendDeinitializerSequenceFn SendResult,
ExecutorAddr Handle) {
432 dbgs() <<
"ELFNixPlatform::rt_getDeinitializers(\""
439 std::lock_guard<std::mutex> Lock(PlatformMutex);
440 auto I = HandleAddrToJITDylib.find(Handle);
441 if (
I != HandleAddrToJITDylib.end())
447 dbgs() <<
" No JITDylib for handle "
450 SendResult(make_error<StringError>(
"No JITDylib associated with handle " +
459void ELFNixPlatform::rt_lookupSymbol(SendSymbolAddressFn SendResult,
463 dbgs() <<
"ELFNixPlatform::rt_lookupSymbol(\""
470 std::lock_guard<std::mutex> Lock(PlatformMutex);
471 auto I = HandleAddrToJITDylib.find(Handle);
472 if (
I != HandleAddrToJITDylib.end())
478 dbgs() <<
" No JITDylib for handle "
481 SendResult(make_error<StringError>(
"No JITDylib associated with handle " +
488 class RtLookupNotifyComplete {
490 RtLookupNotifyComplete(SendSymbolAddressFn &&SendResult)
491 : SendResult(
std::
move(SendResult)) {}
494 assert(
Result->size() == 1 &&
"Unexpected result map count");
497 SendResult(
Result.takeError());
502 SendSymbolAddressFn SendResult;
511Error ELFNixPlatform::bootstrapELFNixRuntime(
JITDylib &PlatformJD) {
513 std::pair<const char *, ExecutorAddr *> Symbols[] = {
514 {
"__orc_rt_elfnix_platform_bootstrap", &orc_rt_elfnix_platform_bootstrap},
515 {
"__orc_rt_elfnix_platform_shutdown", &orc_rt_elfnix_platform_shutdown},
516 {
"__orc_rt_elfnix_register_object_sections",
517 &orc_rt_elfnix_register_object_sections},
518 {
"__orc_rt_elfnix_create_pthread_key",
519 &orc_rt_elfnix_create_pthread_key}};
522 std::vector<std::pair<SymbolStringPtr, ExecutorAddr *>> AddrsToRecord;
523 for (
const auto &KV : Symbols) {
526 AddrsToRecord.push_back({std::move(
Name), KV.second});
529 auto RuntimeSymbolAddrs = ES.
lookup(
531 if (!RuntimeSymbolAddrs)
532 return RuntimeSymbolAddrs.takeError();
534 for (
const auto &KV : AddrsToRecord) {
535 auto &
Name = KV.first;
536 assert(RuntimeSymbolAddrs->count(
Name) &&
"Missing runtime symbol?");
537 KV.second->setValue((*RuntimeSymbolAddrs)[
Name].getAddress());
540 auto PJDDSOHandle = ES.
lookup(
543 return PJDDSOHandle.takeError();
546 orc_rt_elfnix_platform_bootstrap, PJDDSOHandle->getAddress()))
552 RuntimeBootstrapped =
true;
553 std::vector<ELFPerObjectSectionsToRegister> DeferredPOSRs;
555 std::lock_guard<std::mutex> Lock(PlatformMutex);
556 DeferredPOSRs = std::move(BootstrapPOSRs);
559 for (
auto &
D : DeferredPOSRs)
560 if (
auto Err = registerPerObjectSections(
D))
566Error ELFNixPlatform::registerInitInfo(
569 std::unique_lock<std::mutex> Lock(PlatformMutex);
573 auto I = InitSeqs.find(&JD);
574 if (
I == InitSeqs.end()) {
581 if (
auto Err = ES.
lookup(SearchOrder, DSOHandleSymbol).takeError())
585 I = InitSeqs.find(&JD);
587 "Entry missing after header symbol lookup?");
589 InitSeq = &
I->second;
592 for (
auto *Sec : InitSections) {
602Error ELFNixPlatform::registerPerObjectSections(
605 if (!orc_rt_elfnix_register_object_sections)
606 return make_error<StringError>(
"Attempting to register per-object "
607 "sections, but runtime support has not "
614 orc_rt_elfnix_register_object_sections, ErrResult, POSR))
620 if (!orc_rt_elfnix_create_pthread_key)
621 return make_error<StringError>(
622 "Attempting to create pthread key in target, but runtime support has "
623 "not been loaded yet",
628 orc_rt_elfnix_create_pthread_key,
Result))
629 return std::move(Err);
633void ELFNixPlatform::ELFNixPlatformPlugin::modifyPassConfig(
640 addDSOHandleSupportPasses(MR, Config);
648 addInitializerSupportPasses(MR, Config);
651 addEHAndTLVSupportPasses(MR, Config);
655ELFNixPlatform::ELFNixPlatformPlugin::getSyntheticSymbolDependencies(
657 std::lock_guard<std::mutex> Lock(PluginMutex);
658 auto I = InitSymbolDeps.find(&MR);
659 if (
I != InitSymbolDeps.end()) {
660 SyntheticSymbolDependenciesMap
Result;
662 InitSymbolDeps.erase(&MR);
665 return SyntheticSymbolDependenciesMap();
668void ELFNixPlatform::ELFNixPlatformPlugin::addInitializerSupportPasses(
673 if (
auto Err = preserveInitSections(
G, MR))
680 return registerInitSections(
G, JD);
684void ELFNixPlatform::ELFNixPlatformPlugin::addDSOHandleSupportPasses(
689 auto I = llvm::find_if(G.defined_symbols(), [this](jitlink::Symbol *Sym) {
690 return Sym->getName() == *MP.DSOHandleSymbol;
692 assert(
I !=
G.defined_symbols().end() &&
"Missing DSO handle symbol");
694 std::lock_guard<std::mutex> Lock(MP.PlatformMutex);
695 auto HandleAddr = (*I)->getAddress();
696 MP.HandleAddrToJITDylib[HandleAddr] = &JD;
697 assert(!MP.InitSeqs.count(&JD) &&
"InitSeq entry for JD already exists");
698 MP.InitSeqs.insert(std::make_pair(
705void ELFNixPlatform::ELFNixPlatformPlugin::addEHAndTLVSupportPasses(
715 return fixTLVSectionsAndEdges(G, JD);
724 jitlink::SectionRange R(*EHFrameSection);
726 POSR.EHFrameSection = {ExecutorAddr(R.getStart()),
727 ExecutorAddr(R.getEnd())};
740 if (ThreadDataSection)
741 G.mergeSections(*ThreadDataSection, *ThreadBSSSection);
743 ThreadDataSection = ThreadBSSSection;
748 if (ThreadDataSection) {
759 if (!MP.RuntimeBootstrapped) {
760 std::lock_guard<std::mutex> Lock(MP.PlatformMutex);
761 MP.BootstrapPOSRs.push_back(POSR);
766 if (
auto Err = MP.registerPerObjectSections(POSR))
774Error ELFNixPlatform::ELFNixPlatformPlugin::preserveInitSections(
777 JITLinkSymbolSet InitSectionSymbols;
778 for (
auto &InitSection :
G.sections()) {
786 for (
auto &Sym : InitSection.symbols()) {
787 auto &
B = Sym->getBlock();
788 if (Sym->isLive() && Sym->getOffset() == 0 &&
789 Sym->getSize() ==
B.getSize() && !AlreadyLiveBlocks.
count(&
B)) {
790 InitSectionSymbols.insert(Sym);
796 for (
auto *
B : InitSection.blocks())
797 if (!AlreadyLiveBlocks.
count(
B))
798 InitSectionSymbols.insert(
799 &
G.addAnonymousSymbol(*
B, 0,
B->getSize(),
false,
true));
802 if (!InitSectionSymbols.empty()) {
803 std::lock_guard<std::mutex> Lock(PluginMutex);
804 InitSymbolDeps[&MR] = std::move(InitSectionSymbols);
810Error ELFNixPlatform::ELFNixPlatformPlugin::registerInitSections(
815 LLVM_DEBUG({
dbgs() <<
"ELFNixPlatform::registerInitSections\n"; });
817 for (
auto &Sec :
G.sections()) {
825 dbgs() <<
"ELFNixPlatform: Scraped " <<
G.getName() <<
" init sections:\n";
826 for (
auto *Sec : InitSections) {
828 dbgs() <<
" " << Sec->getName() <<
": "
829 <<
formatv(
"[ {0:x} -- {1:x} ]",
R.getStart(),
R.getEnd()) <<
"\n";
833 return MP.registerInitInfo(JD, InitSections);
836Error ELFNixPlatform::ELFNixPlatformPlugin::fixTLVSectionsAndEdges(
839 for (
auto *Sym :
G.external_symbols()) {
840 if (Sym->getName() ==
"__tls_get_addr") {
841 Sym->setName(
"___orc_rt_elfnix_tls_get_addr");
842 }
else if (Sym->getName() ==
"__tlsdesc_resolver") {
843 Sym->setName(
"___orc_rt_elfnix_tlsdesc_resolver");
847 auto *TLSInfoEntrySection =
G.findSectionByName(
"$__TLSINFO");
849 if (TLSInfoEntrySection) {
850 std::optional<uint64_t>
Key;
852 std::lock_guard<std::mutex> Lock(MP.PlatformMutex);
853 auto I = MP.JITDylibToPThreadKey.find(&JD);
854 if (
I != MP.JITDylibToPThreadKey.end())
858 if (
auto KeyOrErr = MP.createPThreadKey())
861 return KeyOrErr.takeError();
867 for (
auto *
B : TLSInfoEntrySection->blocks()) {
870 assert(
B->getSize() == (
G.getPointerSize() * 2) &&
871 "TLS descriptor must be 2 words length");
872 auto TLSInfoEntryContent =
B->getMutableContent(
G);
873 memcpy(TLSInfoEntryContent.data(), &PlatformKeyBits,
G.getPointerSize());
static GCRegistry::Add< OcamlGC > B("ocaml", "ocaml 3.10-compatible GC")
static GCRegistry::Add< StatepointGC > D("statepoint-example", "an example strategy for statepoint")
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...
size_type count(const_arg_type_t< KeyT > Val) const
Return 1 if the specified key is in the map, 0 otherwise.
Implements a dense probed hash-table based set.
Helper for Errors used as out-parameters.
Lightweight error class with error context and mandatory checking.
static ErrorSuccess success()
Create a success value.
Tagged union holding either a T or a Error.
void push_back(const T &Elt)
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.
StringRef - Represent a constant reference to a string, i.e.
Triple - Helper class for working with autoconf configuration names.
const std::string & str() const
std::pair< iterator, bool > insert(const ValueT &V)
size_type count(const_arg_type_t< ValueT > V) const
Return 1 if the specified key is in the set, 0 otherwise.
const std::string & getName() const
Get the name for this JITLinkDylib.
Represents a section address range via a pair of Block pointers to the first and last Blocks in the s...
Represents an object file section.
An ExecutionSession represents a running JIT program.
ExecutorProcessControl & getExecutorProcessControl()
Get the ExecutorProcessControl object associated with this ExecutionSession.
const Triple & getTargetTriple() const
Return the triple for the executor.
Error callSPSWrapper(ExecutorAddr WrapperFnAddr, WrapperCallArgTs &&...WrapperCallArgs)
Run a wrapper function using SPS to serialize the arguments and deserialize the results.
SymbolStringPtr intern(StringRef SymName)
Add a symbol name to the SymbolStringPool and return a pointer to it.
JITDylib * getJITDylibByName(StringRef Name)
Return a pointer to the "name" JITDylib.
static JITDispatchHandlerFunction wrapAsyncWithSPS(HandlerT &&H)
Wrap a handler that takes concrete argument types (and a sender for a concrete return type) to produc...
void lookup(LookupKind K, const JITDylibSearchOrder &SearchOrder, SymbolLookupSet Symbols, SymbolState RequiredState, SymbolsResolvedCallback NotifyComplete, RegisterDependenciesFunction RegisterDependencies)
Search the given JITDylibs for the given symbols.
Error registerJITDispatchHandlers(JITDylib &JD, JITDispatchHandlerAssociationMap WFs)
For each tag symbol name, associate the corresponding AsyncHandlerWrapperFunction with the address of...
decltype(auto) runSessionLocked(Func &&F)
Run the given lambda with the session mutex locked.
Represents an address in the executor process.
uint64_t getValue() const
Represents a JIT'd dynamic library.
Error define(std::unique_ptr< MaterializationUnitType > &&MU, ResourceTrackerSP RT=nullptr)
Define all symbols provided by the materialization unit to be part of this JITDylib.
static Expected< std::vector< JITDylibSP > > getDFSLinkOrder(ArrayRef< JITDylibSP > JDs)
Returns the given JITDylibs and all of their transitive dependencies in DFS order (based on linkage r...
auto withLinkOrderDo(Func &&F) -> decltype(F(std::declval< const JITDylibSearchOrder & >()))
Do something with the link order (run under the session lock).
GeneratorT & addGenerator(std::unique_ptr< GeneratorT > DefGenerator)
Adds a definition generator to this JITDylib and returns a referenece to it.
Tracks responsibility for materialization, and mediates interactions between MaterializationUnits and...
const SymbolStringPtr & getInitializerSymbol() const
Returns the initialization pseudo-symbol, if any.
JITDylib & getTargetJITDylib() const
Returns the target JITDylib that these symbols are being materialized into.
A MaterializationUnit represents a set of symbol definitions that can be materialized as a group,...
virtual StringRef getName() const =0
Return the name of this materialization unit.
SymbolFlagsMap SymbolFlags
virtual void materialize(std::unique_ptr< MaterializationResponsibility > R)=0
Implementations of this method should materialize all symbols in the materialzation unit,...
const SymbolStringPtr & getInitializerSymbol() const
Returns the initialization symbol for this MaterializationUnit (if any).
An ObjectLayer implementation built on JITLink.
ObjectLinkingLayer & addPlugin(std::unique_ptr< Plugin > P)
Add a pass-config modifier.
void emit(std::unique_ptr< MaterializationResponsibility > R, std::unique_ptr< MemoryBuffer > O) override
Emit an object file.
API to remove / transfer ownership of JIT resources.
JITDylib & getJITDylib() const
Return the JITDylib targeted by this tracker.
static Expected< std::unique_ptr< StaticLibraryDefinitionGenerator > > Load(ObjectLayer &L, const char *FileName, GetObjectFileInterface GetObjFileInterface=GetObjectFileInterface())
Try to create a StaticLibraryDefinitionGenerator from the given path.
A set of symbols to look up, each associated with a SymbolLookupFlags value.
SymbolLookupSet & add(SymbolStringPtr Name, SymbolLookupFlags Flags=SymbolLookupFlags::RequiredSymbol)
Add an element to the set.
Pointer to a pooled string representing a symbol name.
SPS tag type for expecteds, which are either a T or a string representing an error.
SPS tag type for sequences.
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
@ Pointer64
A plain 64-bit pointer value relocation.
@ Pointer64
A plain 64-bit pointer value relocation.
const char * getGenericEdgeKindName(Edge::Kind K)
Returns the string name of the given generic edge kind, or "unknown" otherwise.
StringRef ELFThreadBSSSectionName
JITDylibSearchOrder makeJITDylibSearchOrder(ArrayRef< JITDylib * > JDs, JITDylibLookupFlags Flags=JITDylibLookupFlags::MatchExportedSymbolsOnly)
Convenience function for creating a search order from an ArrayRef of JITDylib*, all with the same fla...
std::vector< std::pair< JITDylib *, JITDylibLookupFlags > > JITDylibSearchOrder
A list of (JITDylib*, JITDylibLookupFlags) pairs to be used as a search order during symbol lookup.
std::unique_ptr< ReExportsMaterializationUnit > symbolAliases(SymbolAliasMap Aliases)
Create a ReExportsMaterializationUnit with the given aliases.
std::unique_ptr< AbsoluteSymbolsMaterializationUnit > absoluteSymbols(SymbolMap Symbols)
Create an AbsoluteSymbolsMaterializationUnit with the given symbols.
StringRef ELFEHFrameSectionName
std::vector< ELFNixJITDylibDeinitializers > ELFNixJITDylibDeinitializerSequence
@ MatchExportedSymbolsOnly
static void addAliases(ExecutionSession &ES, SymbolAliasMap &Aliases, ArrayRef< std::pair< const char *, const char * > > AL)
StringRef ELFThreadDataSectionName
RegisterDependenciesFunction NoDependenciesToRegister
This can be used as the value for a RegisterDependenciesFunction if there are no dependants to regist...
@ Ready
Emitted to memory, but waiting on transitive dependencies.
std::vector< ELFNixJITDylibInitializers > ELFNixJITDylibInitializerSequence
bool isELFInitializerSection(StringRef SecName)
value_type byte_swap(value_type value, endianness endian)
This is an optimization pass for GlobalISel generic memory operations.
auto formatv(const char *Fmt, Ts &&... Vals) -> formatv_object< decltype(std::make_tuple(detail::build_format_adapter(std::forward< Ts >(Vals))...))>
std::error_code inconvertibleErrorCode()
The value returned by this function can be returned from convertToErrorCode for Error values where no...
auto reverse(ContainerTy &&C)
raw_ostream & dbgs()
dbgs() - This returns a reference to a raw_ostream for debugging messages.
OutputIt move(R &&Range, OutputIt Out)
Provide wrappers to std::move which take ranges instead of having to pass begin/end explicitly.
An LinkGraph pass configuration, consisting of a list of pre-prune, post-prune, and post-fixup passes...
LinkGraphPassList PostAllocationPasses
Post-allocation passes.
LinkGraphPassList PostFixupPasses
Post-fixup passes.
LinkGraphPassList PostPrunePasses
Post-prune passes.
LinkGraphPassList PrePrunePasses
Pre-prune passes.
StringMap< SectionList > InitSections
ExecutorAddrRange EHFrameSection
ExecutorAddrRange ThreadDataSection