LLVM
15.0.0git
include
llvm
ExecutionEngine
JITLink
MachO_arm64.h
Go to the documentation of this file.
1
//===---- MachO_arm64.h - JIT link functions for MachO/arm64 ----*- C++ -*-===//
2
//
3
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4
// See https://llvm.org/LICENSE.txt for license information.
5
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6
//
7
//===----------------------------------------------------------------------===//
8
//
9
// jit-link functions for MachO/arm64.
10
//
11
//===----------------------------------------------------------------------===//
12
13
#ifndef LLVM_EXECUTIONENGINE_JITLINK_MACHO_ARM64_H
14
#define LLVM_EXECUTIONENGINE_JITLINK_MACHO_ARM64_H
15
16
#include "
llvm/ExecutionEngine/JITLink/JITLink.h
"
17
18
namespace
llvm
{
19
namespace
jitlink {
20
21
namespace
MachO_arm64_Edges {
22
23
enum
MachOARM64RelocationKind
:
Edge::Kind
{
24
Branch26
=
Edge::FirstRelocation
,
25
Pointer32
,
26
Pointer64
,
27
Pointer64Anon
,
28
Page21
,
29
PageOffset12
,
30
GOTPage21
,
31
GOTPageOffset12
,
32
TLVPage21
,
33
TLVPageOffset12
,
34
PointerToGOT
,
35
PairedAddend
,
36
LDRLiteral19
,
37
Delta32
,
38
Delta64
,
39
NegDelta32
,
40
NegDelta64
,
41
};
42
43
}
// namespace MachO_arm64_Edges
44
45
/// Create a LinkGraph from a MachO/arm64 relocatable object.
46
///
47
/// Note: The graph does not take ownership of the underlying buffer, nor copy
48
/// its contents. The caller is responsible for ensuring that the object buffer
49
/// outlives the graph.
50
Expected<std::unique_ptr<LinkGraph>
>
51
createLinkGraphFromMachOObject_arm64
(
MemoryBufferRef
ObjectBuffer);
52
53
/// jit-link the given object buffer, which must be a MachO arm64 object file.
54
///
55
/// If PrePrunePasses is empty then a default mark-live pass will be inserted
56
/// that will mark all exported atoms live. If PrePrunePasses is not empty, the
57
/// caller is responsible for including a pass to mark atoms as live.
58
///
59
/// If PostPrunePasses is empty then a default GOT-and-stubs insertion pass will
60
/// be inserted. If PostPrunePasses is not empty then the caller is responsible
61
/// for including a pass to insert GOT and stub edges.
62
void
link_MachO_arm64
(std::unique_ptr<LinkGraph>
G
,
63
std::unique_ptr<JITLinkContext> Ctx);
64
65
/// Return the string name of the given MachO arm64 edge kind.
66
const
char
*
getMachOARM64RelocationKindName
(
Edge::Kind
R);
67
68
}
// end namespace jitlink
69
}
// end namespace llvm
70
71
#endif // LLVM_EXECUTIONENGINE_JITLINK_MACHO_ARM64_H
llvm::jitlink::MachO_arm64_Edges::TLVPage21
@ TLVPage21
Definition:
MachO_arm64.h:32
llvm
This is an optimization pass for GlobalISel generic memory operations.
Definition:
AddressRanges.h:17
llvm::jitlink::MachO_arm64_Edges::Branch26
@ Branch26
Definition:
MachO_arm64.h:24
llvm::jitlink::MachO_arm64_Edges::TLVPageOffset12
@ TLVPageOffset12
Definition:
MachO_arm64.h:33
llvm::jitlink::MachO_arm64_Edges::PairedAddend
@ PairedAddend
Definition:
MachO_arm64.h:35
JITLink.h
llvm::jitlink::MachO_arm64_Edges::LDRLiteral19
@ LDRLiteral19
Definition:
MachO_arm64.h:36
llvm::jitlink::MachO_arm64_Edges::Pointer32
@ Pointer32
Definition:
MachO_arm64.h:25
llvm::jitlink::MachO_arm64_Edges::Delta32
@ Delta32
Definition:
MachO_arm64.h:37
llvm::Expected
Tagged union holding either a T or a Error.
Definition:
APFloat.h:41
llvm::jitlink::MachO_arm64_Edges::PageOffset12
@ PageOffset12
Definition:
MachO_arm64.h:29
llvm::MemoryBufferRef
Definition:
MemoryBufferRef.h:22
llvm::jitlink::getMachOARM64RelocationKindName
const char * getMachOARM64RelocationKindName(Edge::Kind R)
Return the string name of the given MachO arm64 edge kind.
Definition:
MachO_arm64.cpp:737
llvm::jitlink::MachO_arm64_Edges::PointerToGOT
@ PointerToGOT
Definition:
MachO_arm64.h:34
llvm::jitlink::link_MachO_arm64
void link_MachO_arm64(std::unique_ptr< LinkGraph > G, std::unique_ptr< JITLinkContext > Ctx)
jit-link the given object buffer, which must be a MachO arm64 object file.
Definition:
MachO_arm64.cpp:700
llvm::jitlink::Edge::FirstRelocation
@ FirstRelocation
Definition:
JITLink.h:67
llvm::jitlink::MachO_arm64_Edges::GOTPage21
@ GOTPage21
Definition:
MachO_arm64.h:30
G
const DataFlowGraph & G
Definition:
RDFGraph.cpp:200
llvm::jitlink::MachO_arm64_Edges::NegDelta32
@ NegDelta32
Definition:
MachO_arm64.h:39
llvm::jitlink::MachO_arm64_Edges::GOTPageOffset12
@ GOTPageOffset12
Definition:
MachO_arm64.h:31
llvm::jitlink::createLinkGraphFromMachOObject_arm64
Expected< std::unique_ptr< LinkGraph > > createLinkGraphFromMachOObject_arm64(MemoryBufferRef ObjectBuffer)
Create a LinkGraph from a MachO/arm64 relocatable object.
Definition:
MachO_arm64.cpp:693
llvm::jitlink::MachO_arm64_Edges::Delta64
@ Delta64
Definition:
MachO_arm64.h:38
llvm::jitlink::MachO_arm64_Edges::Page21
@ Page21
Definition:
MachO_arm64.h:28
llvm::jitlink::MachO_arm64_Edges::MachOARM64RelocationKind
MachOARM64RelocationKind
Definition:
MachO_arm64.h:23
llvm::jitlink::MachO_arm64_Edges::Pointer64
@ Pointer64
Definition:
MachO_arm64.h:26
llvm::jitlink::MachO_arm64_Edges::Pointer64Anon
@ Pointer64Anon
Definition:
MachO_arm64.h:27
llvm::jitlink::MachO_arm64_Edges::NegDelta64
@ NegDelta64
Definition:
MachO_arm64.h:40
llvm::jitlink::Edge::Kind
uint8_t Kind
Definition:
JITLink.h:61
Generated on Sun May 15 2022 16:33:09 for LLVM by
1.8.17