LLVM  14.0.0git
MachO_x86_64.cpp
Go to the documentation of this file.
1 //===---- MachO_x86_64.cpp -JIT linker implementation for MachO/x86-64 ----===//
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 // MachO/x86-64 jit-link implementation.
10 //
11 //===----------------------------------------------------------------------===//
12 
15 
16 #include "MachOLinkGraphBuilder.h"
18 
19 #define DEBUG_TYPE "jitlink"
20 
21 using namespace llvm;
22 using namespace llvm::jitlink;
23 
24 namespace {
25 
26 class MachOLinkGraphBuilder_x86_64 : public MachOLinkGraphBuilder {
27 public:
28  MachOLinkGraphBuilder_x86_64(const object::MachOObjectFile &Obj)
29  : MachOLinkGraphBuilder(Obj, Triple("x86_64-apple-darwin"),
31 
32 private:
33  enum MachONormalizedRelocationType : unsigned {
34  MachOBranch32,
35  MachOPointer32,
36  MachOPointer64,
37  MachOPointer64Anon,
38  MachOPCRel32,
39  MachOPCRel32Minus1,
40  MachOPCRel32Minus2,
41  MachOPCRel32Minus4,
42  MachOPCRel32Anon,
43  MachOPCRel32Minus1Anon,
44  MachOPCRel32Minus2Anon,
45  MachOPCRel32Minus4Anon,
46  MachOPCRel32GOTLoad,
47  MachOPCRel32GOT,
48  MachOPCRel32TLV,
49  MachOSubtractor32,
50  MachOSubtractor64,
51  };
52 
54  getRelocKind(const MachO::relocation_info &RI) {
55  switch (RI.r_type) {
57  if (!RI.r_pcrel) {
58  if (RI.r_length == 3)
59  return RI.r_extern ? MachOPointer64 : MachOPointer64Anon;
60  else if (RI.r_extern && RI.r_length == 2)
61  return MachOPointer32;
62  }
63  break;
65  if (RI.r_pcrel && RI.r_length == 2)
66  return RI.r_extern ? MachOPCRel32 : MachOPCRel32Anon;
67  break;
69  if (RI.r_pcrel && RI.r_extern && RI.r_length == 2)
70  return MachOBranch32;
71  break;
73  if (RI.r_pcrel && RI.r_extern && RI.r_length == 2)
74  return MachOPCRel32GOTLoad;
75  break;
77  if (RI.r_pcrel && RI.r_extern && RI.r_length == 2)
78  return MachOPCRel32GOT;
79  break;
81  if (!RI.r_pcrel && RI.r_extern) {
82  if (RI.r_length == 2)
83  return MachOSubtractor32;
84  else if (RI.r_length == 3)
85  return MachOSubtractor64;
86  }
87  break;
89  if (RI.r_pcrel && RI.r_length == 2)
90  return RI.r_extern ? MachOPCRel32Minus1 : MachOPCRel32Minus1Anon;
91  break;
93  if (RI.r_pcrel && RI.r_length == 2)
94  return RI.r_extern ? MachOPCRel32Minus2 : MachOPCRel32Minus2Anon;
95  break;
97  if (RI.r_pcrel && RI.r_length == 2)
98  return RI.r_extern ? MachOPCRel32Minus4 : MachOPCRel32Minus4Anon;
99  break;
101  if (RI.r_pcrel && RI.r_extern && RI.r_length == 2)
102  return MachOPCRel32TLV;
103  break;
104  }
105 
106  return make_error<JITLinkError>(
107  "Unsupported x86-64 relocation: address=" +
108  formatv("{0:x8}", RI.r_address) +
109  ", symbolnum=" + formatv("{0:x6}", RI.r_symbolnum) +
110  ", kind=" + formatv("{0:x1}", RI.r_type) +
111  ", pc_rel=" + (RI.r_pcrel ? "true" : "false") +
112  ", extern=" + (RI.r_extern ? "true" : "false") +
113  ", length=" + formatv("{0:d}", RI.r_length));
114  }
115 
116  using PairRelocInfo = std::tuple<Edge::Kind, Symbol *, uint64_t>;
117 
118  // Parses paired SUBTRACTOR/UNSIGNED relocations and, on success,
119  // returns the edge kind and addend to be used.
120  Expected<PairRelocInfo> parsePairRelocation(
121  Block &BlockToFix, MachONormalizedRelocationType SubtractorKind,
122  const MachO::relocation_info &SubRI, orc::ExecutorAddr FixupAddress,
123  const char *FixupContent, object::relocation_iterator &UnsignedRelItr,
124  object::relocation_iterator &RelEnd) {
125  using namespace support;
126 
127  assert(((SubtractorKind == MachOSubtractor32 && SubRI.r_length == 2) ||
128  (SubtractorKind == MachOSubtractor64 && SubRI.r_length == 3)) &&
129  "Subtractor kind should match length");
130  assert(SubRI.r_extern && "SUBTRACTOR reloc symbol should be extern");
131  assert(!SubRI.r_pcrel && "SUBTRACTOR reloc should not be PCRel");
132 
133  if (UnsignedRelItr == RelEnd)
134  return make_error<JITLinkError>("x86_64 SUBTRACTOR without paired "
135  "UNSIGNED relocation");
136 
137  auto UnsignedRI = getRelocationInfo(UnsignedRelItr);
138 
139  if (SubRI.r_address != UnsignedRI.r_address)
140  return make_error<JITLinkError>("x86_64 SUBTRACTOR and paired UNSIGNED "
141  "point to different addresses");
142 
143  if (SubRI.r_length != UnsignedRI.r_length)
144  return make_error<JITLinkError>("length of x86_64 SUBTRACTOR and paired "
145  "UNSIGNED reloc must match");
146 
147  Symbol *FromSymbol;
148  if (auto FromSymbolOrErr = findSymbolByIndex(SubRI.r_symbolnum))
149  FromSymbol = FromSymbolOrErr->GraphSymbol;
150  else
151  return FromSymbolOrErr.takeError();
152 
153  // Read the current fixup value.
154  uint64_t FixupValue = 0;
155  if (SubRI.r_length == 3)
156  FixupValue = *(const little64_t *)FixupContent;
157  else
158  FixupValue = *(const little32_t *)FixupContent;
159 
160  // Find 'ToSymbol' using symbol number or address, depending on whether the
161  // paired UNSIGNED relocation is extern.
162  Symbol *ToSymbol = nullptr;
163  if (UnsignedRI.r_extern) {
164  // Find target symbol by symbol index.
165  if (auto ToSymbolOrErr = findSymbolByIndex(UnsignedRI.r_symbolnum))
166  ToSymbol = ToSymbolOrErr->GraphSymbol;
167  else
168  return ToSymbolOrErr.takeError();
169  } else {
170  auto ToSymbolSec = findSectionByIndex(UnsignedRI.r_symbolnum - 1);
171  if (!ToSymbolSec)
172  return ToSymbolSec.takeError();
173  ToSymbol = getSymbolByAddress(*ToSymbolSec, ToSymbolSec->Address);
174  assert(ToSymbol && "No symbol for section");
175  FixupValue -= ToSymbol->getAddress().getValue();
176  }
177 
178  Edge::Kind DeltaKind;
179  Symbol *TargetSymbol;
180  uint64_t Addend;
181  if (&BlockToFix == &FromSymbol->getAddressable()) {
182  TargetSymbol = ToSymbol;
183  DeltaKind = (SubRI.r_length == 3) ? x86_64::Delta64 : x86_64::Delta32;
184  Addend = FixupValue + (FixupAddress - FromSymbol->getAddress());
185  // FIXME: handle extern 'from'.
186  } else if (&BlockToFix == &ToSymbol->getAddressable()) {
187  TargetSymbol = FromSymbol;
188  DeltaKind =
190  Addend = FixupValue - (FixupAddress - ToSymbol->getAddress());
191  } else {
192  // BlockToFix was neither FromSymbol nor ToSymbol.
193  return make_error<JITLinkError>("SUBTRACTOR relocation must fix up "
194  "either 'A' or 'B' (or a symbol in one "
195  "of their alt-entry chains)");
196  }
197 
198  return PairRelocInfo(DeltaKind, TargetSymbol, Addend);
199  }
200 
201  Error addRelocations() override {
202  using namespace support;
203  auto &Obj = getObject();
204 
205  LLVM_DEBUG(dbgs() << "Processing relocations:\n");
206 
207  for (auto &S : Obj.sections()) {
208 
209  orc::ExecutorAddr SectionAddress(S.getAddress());
210 
211  // Skip relocations virtual sections.
212  if (S.isVirtual()) {
213  if (S.relocation_begin() != S.relocation_end())
214  return make_error<JITLinkError>("Virtual section contains "
215  "relocations");
216  continue;
217  }
218 
219  auto NSec =
220  findSectionByIndex(Obj.getSectionIndex(S.getRawDataRefImpl()));
221  if (!NSec)
222  return NSec.takeError();
223 
224  // Skip relocations for MachO sections without corresponding graph
225  // sections.
226  {
227  if (!NSec->GraphSection) {
228  LLVM_DEBUG({
229  dbgs() << " Skipping relocations for MachO section "
230  << NSec->SegName << "/" << NSec->SectName
231  << " which has no associated graph section\n";
232  });
233  continue;
234  }
235  }
236 
237  // Add relocations for section.
238  for (auto RelItr = S.relocation_begin(), RelEnd = S.relocation_end();
239  RelItr != RelEnd; ++RelItr) {
240 
241  MachO::relocation_info RI = getRelocationInfo(RelItr);
242 
243  // Find the address of the value to fix up.
244  auto FixupAddress = SectionAddress + (uint32_t)RI.r_address;
245 
246  LLVM_DEBUG({
247  dbgs() << " " << NSec->SectName << " + "
248  << formatv("{0:x8}", RI.r_address) << ":\n";
249  });
250 
251  // Find the block that the fixup points to.
252  Block *BlockToFix = nullptr;
253  {
254  auto SymbolToFixOrErr = findSymbolByAddress(*NSec, FixupAddress);
255  if (!SymbolToFixOrErr)
256  return SymbolToFixOrErr.takeError();
257  BlockToFix = &SymbolToFixOrErr->getBlock();
258  }
259 
260  if (FixupAddress + orc::ExecutorAddrDiff(1ULL << RI.r_length) >
261  BlockToFix->getAddress() + BlockToFix->getContent().size())
262  return make_error<JITLinkError>(
263  "Relocation extends past end of fixup block");
264 
265  // Get a pointer to the fixup content.
266  const char *FixupContent = BlockToFix->getContent().data() +
267  (FixupAddress - BlockToFix->getAddress());
268 
269  size_t FixupOffset = FixupAddress - BlockToFix->getAddress();
270 
271  // The target symbol and addend will be populated by the switch below.
272  Symbol *TargetSymbol = nullptr;
273  uint64_t Addend = 0;
274 
275  // Validate the relocation kind.
276  auto MachORelocKind = getRelocKind(RI);
277  if (!MachORelocKind)
278  return MachORelocKind.takeError();
279 
281 
282  switch (*MachORelocKind) {
283  case MachOBranch32:
284  if (auto TargetSymbolOrErr = findSymbolByIndex(RI.r_symbolnum))
285  TargetSymbol = TargetSymbolOrErr->GraphSymbol;
286  else
287  return TargetSymbolOrErr.takeError();
288  Addend = *(const little32_t *)FixupContent;
290  break;
291  case MachOPCRel32:
292  if (auto TargetSymbolOrErr = findSymbolByIndex(RI.r_symbolnum))
293  TargetSymbol = TargetSymbolOrErr->GraphSymbol;
294  else
295  return TargetSymbolOrErr.takeError();
296  Addend = *(const little32_t *)FixupContent - 4;
298  break;
299  case MachOPCRel32GOTLoad:
300  if (auto TargetSymbolOrErr = findSymbolByIndex(RI.r_symbolnum))
301  TargetSymbol = TargetSymbolOrErr->GraphSymbol;
302  else
303  return TargetSymbolOrErr.takeError();
304  Addend = *(const little32_t *)FixupContent;
306  if (FixupOffset < 3)
307  return make_error<JITLinkError>("GOTLD at invalid offset " +
308  formatv("{0}", FixupOffset));
309  break;
310  case MachOPCRel32GOT:
311  if (auto TargetSymbolOrErr = findSymbolByIndex(RI.r_symbolnum))
312  TargetSymbol = TargetSymbolOrErr->GraphSymbol;
313  else
314  return TargetSymbolOrErr.takeError();
315  Addend = *(const little32_t *)FixupContent - 4;
317  break;
318  case MachOPCRel32TLV:
319  if (auto TargetSymbolOrErr = findSymbolByIndex(RI.r_symbolnum))
320  TargetSymbol = TargetSymbolOrErr->GraphSymbol;
321  else
322  return TargetSymbolOrErr.takeError();
323  Addend = *(const little32_t *)FixupContent;
325  if (FixupOffset < 3)
326  return make_error<JITLinkError>("TLV at invalid offset " +
327  formatv("{0}", FixupOffset));
328  break;
329  case MachOPointer32:
330  if (auto TargetSymbolOrErr = findSymbolByIndex(RI.r_symbolnum))
331  TargetSymbol = TargetSymbolOrErr->GraphSymbol;
332  else
333  return TargetSymbolOrErr.takeError();
334  Addend = *(const ulittle32_t *)FixupContent;
336  break;
337  case MachOPointer64:
338  if (auto TargetSymbolOrErr = findSymbolByIndex(RI.r_symbolnum))
339  TargetSymbol = TargetSymbolOrErr->GraphSymbol;
340  else
341  return TargetSymbolOrErr.takeError();
342  Addend = *(const ulittle64_t *)FixupContent;
344  break;
345  case MachOPointer64Anon: {
346  orc::ExecutorAddr TargetAddress(*(const ulittle64_t *)FixupContent);
347  auto TargetNSec = findSectionByIndex(RI.r_symbolnum - 1);
348  if (!TargetNSec)
349  return TargetNSec.takeError();
350  if (auto TargetSymbolOrErr =
351  findSymbolByAddress(*TargetNSec, TargetAddress))
352  TargetSymbol = &*TargetSymbolOrErr;
353  else
354  return TargetSymbolOrErr.takeError();
355  Addend = TargetAddress - TargetSymbol->getAddress();
357  break;
358  }
359  case MachOPCRel32Minus1:
360  case MachOPCRel32Minus2:
361  case MachOPCRel32Minus4:
362  if (auto TargetSymbolOrErr = findSymbolByIndex(RI.r_symbolnum))
363  TargetSymbol = TargetSymbolOrErr->GraphSymbol;
364  else
365  return TargetSymbolOrErr.takeError();
366  Addend = *(const little32_t *)FixupContent - 4;
368  break;
369  case MachOPCRel32Anon: {
370  orc::ExecutorAddr TargetAddress(FixupAddress + 4 +
371  *(const little32_t *)FixupContent);
372  auto TargetNSec = findSectionByIndex(RI.r_symbolnum - 1);
373  if (!TargetNSec)
374  return TargetNSec.takeError();
375  if (auto TargetSymbolOrErr =
376  findSymbolByAddress(*TargetNSec, TargetAddress))
377  TargetSymbol = &*TargetSymbolOrErr;
378  else
379  return TargetSymbolOrErr.takeError();
380  Addend = TargetAddress - TargetSymbol->getAddress() - 4;
382  break;
383  }
384  case MachOPCRel32Minus1Anon:
385  case MachOPCRel32Minus2Anon:
386  case MachOPCRel32Minus4Anon: {
387  orc::ExecutorAddrDiff Delta =
389  1ULL << (*MachORelocKind - MachOPCRel32Minus1Anon));
390  orc::ExecutorAddr TargetAddress =
391  FixupAddress + Delta + *(const little32_t *)FixupContent;
392  auto TargetNSec = findSectionByIndex(RI.r_symbolnum - 1);
393  if (!TargetNSec)
394  return TargetNSec.takeError();
395  if (auto TargetSymbolOrErr =
396  findSymbolByAddress(*TargetNSec, TargetAddress))
397  TargetSymbol = &*TargetSymbolOrErr;
398  else
399  return TargetSymbolOrErr.takeError();
400  Addend = TargetAddress - TargetSymbol->getAddress() - Delta;
402  break;
403  }
404  case MachOSubtractor32:
405  case MachOSubtractor64: {
406  // We use Delta32/Delta64 to represent SUBTRACTOR relocations.
407  // parsePairRelocation handles the paired reloc, and returns the
408  // edge kind to be used (either Delta32/Delta64, or
409  // NegDelta32/NegDelta64, depending on the direction of the
410  // subtraction) along with the addend.
411  auto PairInfo =
412  parsePairRelocation(*BlockToFix, *MachORelocKind, RI,
413  FixupAddress, FixupContent, ++RelItr, RelEnd);
414  if (!PairInfo)
415  return PairInfo.takeError();
416  std::tie(Kind, TargetSymbol, Addend) = *PairInfo;
417  assert(TargetSymbol && "No target symbol from parsePairRelocation?");
418  break;
419  }
420  }
421 
422  LLVM_DEBUG({
423  dbgs() << " ";
424  Edge GE(Kind, FixupAddress - BlockToFix->getAddress(), *TargetSymbol,
425  Addend);
426  printEdge(dbgs(), *BlockToFix, GE, x86_64::getEdgeKindName(Kind));
427  dbgs() << "\n";
428  });
429  BlockToFix->addEdge(Kind, FixupAddress - BlockToFix->getAddress(),
430  *TargetSymbol, Addend);
431  }
432  }
433  return Error::success();
434  }
435 };
436 
437 Error buildGOTAndStubs_MachO_x86_64(LinkGraph &G) {
440  visitExistingEdges(G, GOT, PLT);
441  return Error::success();
442 }
443 
444 } // namespace
445 
446 namespace llvm {
447 namespace jitlink {
448 
449 class MachOJITLinker_x86_64 : public JITLinker<MachOJITLinker_x86_64> {
451 
452 public:
453  MachOJITLinker_x86_64(std::unique_ptr<JITLinkContext> Ctx,
454  std::unique_ptr<LinkGraph> G,
455  PassConfiguration PassConfig)
456  : JITLinker(std::move(Ctx), std::move(G), std::move(PassConfig)) {}
457 
458 private:
459  Error applyFixup(LinkGraph &G, Block &B, const Edge &E) const {
460  return x86_64::applyFixup(G, B, E, nullptr);
461  }
462 };
463 
466  auto MachOObj = object::ObjectFile::createMachOObjectFile(ObjectBuffer);
467  if (!MachOObj)
468  return MachOObj.takeError();
469  return MachOLinkGraphBuilder_x86_64(**MachOObj).buildGraph();
470 }
471 
472 void link_MachO_x86_64(std::unique_ptr<LinkGraph> G,
473  std::unique_ptr<JITLinkContext> Ctx) {
474 
475  PassConfiguration Config;
476 
477  if (Ctx->shouldAddDefaultTargetPasses(G->getTargetTriple())) {
478  // Add eh-frame passses.
481 
482  // Add compact unwind splitter pass.
483  Config.PrePrunePasses.push_back(
484  CompactUnwindSplitter("__LD,__compact_unwind"));
485 
486  // Add a mark-live pass.
487  if (auto MarkLive = Ctx->getMarkLivePass(G->getTargetTriple()))
488  Config.PrePrunePasses.push_back(std::move(MarkLive));
489  else
490  Config.PrePrunePasses.push_back(markAllSymbolsLive);
491 
492  // Add an in-place GOT/Stubs pass.
493  Config.PostPrunePasses.push_back(buildGOTAndStubs_MachO_x86_64);
494 
495  // Add GOT/Stubs optimizer pass.
497  }
498 
499  if (auto Err = Ctx->modifyPassConfig(*G, Config))
500  return Ctx->notifyFailed(std::move(Err));
501 
502  // Construct a JITLinker and run the link function.
504 }
505 
507  return EHFrameSplitter("__TEXT,__eh_frame");
508 }
509 
511  return EHFrameEdgeFixer("__TEXT,__eh_frame", x86_64::PointerSize,
513 }
514 
515 } // end namespace jitlink
516 } // end namespace llvm
llvm::orc::ExecutorAddr
Represents an address in the executor process.
Definition: ExecutorAddress.h:30
llvm::CSKYCP::PLT
@ PLT
Definition: CSKYConstantPoolValue.h:39
llvm
This is an optimization pass for GlobalISel generic memory operations.
Definition: AllocatorList.h:23
llvm::MachO::relocation_info::r_length
uint32_t r_length
Definition: MachO.h:960
llvm::object::MachOObjectFile::getSectionIndex
uint64_t getSectionIndex(DataRefImpl Sec) const override
Definition: MachOObjectFile.cpp:1926
llvm::MachO::X86_64_RELOC_SIGNED_4
@ X86_64_RELOC_SIGNED_4
Definition: MachO.h:482
llvm::object::ObjectFile::createMachOObjectFile
static Expected< std::unique_ptr< MachOObjectFile > > createMachOObjectFile(MemoryBufferRef Object, uint32_t UniversalCputype=0, uint32_t UniversalIndex=0)
Definition: MachOObjectFile.cpp:4700
llvm::Error::success
static ErrorSuccess success()
Create a success value.
Definition: Error.h:331
llvm::MachO::relocation_info::r_address
int32_t r_address
Definition: MachO.h:959
llvm::Triple
Triple - Helper class for working with autoconf configuration names.
Definition: Triple.h:44
llvm::orc::ExecutorAddr::getValue
uint64_t getValue() const
Definition: ExecutorAddress.h:53
llvm::Expected
Tagged union holding either a T or a Error.
Definition: APFloat.h:42
llvm::MachO::X86_64_RELOC_SIGNED_2
@ X86_64_RELOC_SIGNED_2
Definition: MachO.h:481
llvm::MemoryBufferRef
Definition: MemoryBufferRef.h:22
LLVM_DEBUG
#define LLVM_DEBUG(X)
Definition: Debug.h:101
llvm::ArrayRef::data
const T * data() const
Definition: ArrayRef.h:160
llvm::MachO::X86_64_RELOC_BRANCH
@ X86_64_RELOC_BRANCH
Definition: MachO.h:476
llvm::dbgs
raw_ostream & dbgs()
dbgs() - This returns a reference to a raw_ostream for debugging messages.
Definition: Debug.cpp:163
llvm::formatv
auto formatv(const char *Fmt, Ts &&... Vals) -> formatv_object< decltype(std::make_tuple(detail::build_format_adapter(std::forward< Ts >(Vals))...))>
Definition: FormatVariadic.h:250
llvm::support::little64_t
detail::packed_endian_specific_integral< int64_t, little, unaligned > little64_t
Definition: Endian.h:281
E
static GCRegistry::Add< CoreCLRGC > E("coreclr", "CoreCLR-compatible GC")
B
static GCRegistry::Add< OcamlGC > B("ocaml", "ocaml 3.10-compatible GC")
llvm::orc::ExecutorAddrDiff
uint64_t ExecutorAddrDiff
Definition: ExecutorAddress.h:27
MachO_x86_64.h
llvm::lltok::Kind
Kind
Definition: LLToken.h:18
llvm::object::MachOObjectFile
Definition: MachO.h:262
llvm::support::ulittle32_t
detail::packed_endian_specific_integral< uint32_t, little, unaligned > ulittle32_t
Definition: Endian.h:272
G
const DataFlowGraph & G
Definition: RDFGraph.cpp:202
llvm::MachO::X86_64_RELOC_UNSIGNED
@ X86_64_RELOC_UNSIGNED
Definition: MachO.h:474
llvm::MachO::relocation_info
Definition: MachO.h:958
uint64_t
llvm::MachO::relocation_info::r_type
uint32_t r_type
Definition: MachO.h:961
llvm::MachO::relocation_info::r_extern
uint32_t r_extern
Definition: MachO.h:960
move
compiles ldr LCPI1_0 ldr ldr mov lsr tst moveq r1 ldr LCPI1_1 and r0 bx lr It would be better to do something like to fold the shift into the conditional move
Definition: README.txt:546
llvm::MachO::X86_64_RELOC_GOT
@ X86_64_RELOC_GOT
Definition: MachO.h:478
llvm::MachO::X86_64_RELOC_GOT_LOAD
@ X86_64_RELOC_GOT_LOAD
Definition: MachO.h:477
G
#define G(x, y, z)
Definition: MD5.cpp:56
assert
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
llvm::move
OutputIt move(R &&Range, OutputIt Out)
Provide wrappers to std::move which take ranges instead of having to pass begin/end explicitly.
Definition: STLExtras.h:1707
llvm::object::content_iterator
Definition: SymbolicFile.h:67
llvm::MachO::X86_64_RELOC_SUBTRACTOR
@ X86_64_RELOC_SUBTRACTOR
Definition: MachO.h:479
llvm::AArch64CC::GE
@ GE
Definition: AArch64BaseInfo.h:265
uint32_t
S
add sub stmia L5 ldr r0 bl L_printf $stub Instead of a and a wouldn t it be better to do three moves *Return an aggregate type is even return S
Definition: README.txt:210
x86_64.h
llvm::MachO::X86_64_RELOC_SIGNED
@ X86_64_RELOC_SIGNED
Definition: MachO.h:475
PerGraphGOTAndPLTStubsBuilder.h
llvm::MachO::X86_64_RELOC_TLV
@ X86_64_RELOC_TLV
Definition: MachO.h:483
std
Definition: BitVector.h:838
llvm::Error
Lightweight error class with error context and mandatory checking.
Definition: Error.h:157
llvm::support::little32_t
detail::packed_endian_specific_integral< int32_t, little, unaligned > little32_t
Definition: Endian.h:279
getObject
static Error getObject(const T *&Obj, MemoryBufferRef M, const void *Ptr, const uint64_t Size=sizeof(T))
Definition: COFFObjectFile.cpp:58
llvm::support::ulittle64_t
detail::packed_endian_specific_integral< uint64_t, little, unaligned > ulittle64_t
Definition: Endian.h:274
llvm::ArrayRef::size
size_t size() const
size - Get the array size.
Definition: ArrayRef.h:163
support
Reimplement select in terms of SEL *We would really like to support but we need to prove that the add doesn t need to overflow between the two bit chunks *Implement pre post increment support(e.g. PR935) *Implement smarter const ant generation for binops with large immediates. A few ARMv6T2 ops should be pattern matched
Definition: README.txt:10
llvm::object::ObjectFile::sections
section_iterator_range sections() const
Definition: ObjectFile.h:321
llvm::MachO::relocation_info::r_pcrel
uint32_t r_pcrel
Definition: MachO.h:960
MachOLinkGraphBuilder.h
llvm::MachO::X86_64_RELOC_SIGNED_1
@ X86_64_RELOC_SIGNED_1
Definition: MachO.h:480
llvm::MachO::relocation_info::r_symbolnum
uint32_t r_symbolnum
Definition: MachO.h:960