LLVM  14.0.0git
AArch64MachObjectWriter.cpp
Go to the documentation of this file.
1 //===-- AArch64MachObjectWriter.cpp - ARM Mach Object Writer --------------===//
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 
11 #include "llvm/ADT/Twine.h"
13 #include "llvm/MC/MCAsmInfo.h"
14 #include "llvm/MC/MCAsmLayout.h"
15 #include "llvm/MC/MCAssembler.h"
16 #include "llvm/MC/MCContext.h"
17 #include "llvm/MC/MCExpr.h"
18 #include "llvm/MC/MCFixup.h"
19 #include "llvm/MC/MCFragment.h"
21 #include "llvm/MC/MCSection.h"
22 #include "llvm/MC/MCSectionMachO.h"
23 #include "llvm/MC/MCSymbol.h"
24 #include "llvm/MC/MCValue.h"
25 #include "llvm/Support/Casting.h"
27 #include <cassert>
28 #include <cstdint>
29 
30 using namespace llvm;
31 
32 namespace {
33 
34 class AArch64MachObjectWriter : public MCMachObjectTargetWriter {
35  bool getAArch64FixupKindMachOInfo(const MCFixup &Fixup, unsigned &RelocType,
36  const MCSymbolRefExpr *Sym,
37  unsigned &Log2Size, const MCAssembler &Asm);
38 
39 public:
40  AArch64MachObjectWriter(uint32_t CPUType, uint32_t CPUSubtype, bool IsILP32)
41  : MCMachObjectTargetWriter(!IsILP32 /* is64Bit */, CPUType, CPUSubtype) {}
42 
43  void recordRelocation(MachObjectWriter *Writer, MCAssembler &Asm,
44  const MCAsmLayout &Layout, const MCFragment *Fragment,
45  const MCFixup &Fixup, MCValue Target,
46  uint64_t &FixedValue) override;
47 };
48 
49 } // end anonymous namespace
50 
51 bool AArch64MachObjectWriter::getAArch64FixupKindMachOInfo(
52  const MCFixup &Fixup, unsigned &RelocType, const MCSymbolRefExpr *Sym,
53  unsigned &Log2Size, const MCAssembler &Asm) {
54  RelocType = unsigned(MachO::ARM64_RELOC_UNSIGNED);
55  Log2Size = ~0U;
56 
57  switch (Fixup.getTargetKind()) {
58  default:
59  return false;
60 
61  case FK_Data_1:
62  Log2Size = Log2_32(1);
63  return true;
64  case FK_Data_2:
65  Log2Size = Log2_32(2);
66  return true;
67  case FK_Data_4:
68  Log2Size = Log2_32(4);
69  if (Sym->getKind() == MCSymbolRefExpr::VK_GOT)
70  RelocType = unsigned(MachO::ARM64_RELOC_POINTER_TO_GOT);
71  return true;
72  case FK_Data_8:
73  Log2Size = Log2_32(8);
74  if (Sym->getKind() == MCSymbolRefExpr::VK_GOT)
75  RelocType = unsigned(MachO::ARM64_RELOC_POINTER_TO_GOT);
76  return true;
83  Log2Size = Log2_32(4);
84  switch (Sym->getKind()) {
85  default:
86  return false;
88  RelocType = unsigned(MachO::ARM64_RELOC_PAGEOFF12);
89  return true;
91  RelocType = unsigned(MachO::ARM64_RELOC_GOT_LOAD_PAGEOFF12);
92  return true;
94  RelocType = unsigned(MachO::ARM64_RELOC_TLVP_LOAD_PAGEOFF12);
95  return true;
96  }
98  Log2Size = Log2_32(4);
99  // This encompasses the relocation for the whole 21-bit value.
100  switch (Sym->getKind()) {
101  default:
102  Asm.getContext().reportError(Fixup.getLoc(),
103  "ADR/ADRP relocations must be GOT relative");
104  return false;
106  RelocType = unsigned(MachO::ARM64_RELOC_PAGE21);
107  return true;
109  RelocType = unsigned(MachO::ARM64_RELOC_GOT_LOAD_PAGE21);
110  return true;
112  RelocType = unsigned(MachO::ARM64_RELOC_TLVP_LOAD_PAGE21);
113  return true;
114  }
115  return true;
118  Log2Size = Log2_32(4);
119  RelocType = unsigned(MachO::ARM64_RELOC_BRANCH26);
120  return true;
121  }
122 }
123 
125  const MCSymbol &Symbol, unsigned Log2Size) {
126  // Debug info sections can use local relocations.
127  if (Section.hasAttribute(MachO::S_ATTR_DEBUG))
128  return true;
129 
130  // Otherwise, only pointer sized relocations are supported.
131  if (Log2Size != 3)
132  return false;
133 
134  // But only if they don't point to a few forbidden sections.
135  if (!Symbol.isInSection())
136  return true;
137  const MCSectionMachO &RefSec = cast<MCSectionMachO>(Symbol.getSection());
138  if (RefSec.getType() == MachO::S_CSTRING_LITERALS)
139  return false;
140 
141  if (RefSec.getSegmentName() == "__DATA" &&
142  RefSec.getName() == "__objc_classrefs")
143  return false;
144 
145  // FIXME: ld64 currently handles internal pointer-sized relocations
146  // incorrectly (applying the addend twice). We should be able to return true
147  // unconditionally by this point when that's fixed.
148  return false;
149 }
150 
151 void AArch64MachObjectWriter::recordRelocation(
152  MachObjectWriter *Writer, MCAssembler &Asm, const MCAsmLayout &Layout,
153  const MCFragment *Fragment, const MCFixup &Fixup, MCValue Target,
154  uint64_t &FixedValue) {
155  unsigned IsPCRel = Writer->isFixupKindPCRel(Asm, Fixup.getKind());
156 
157  // See <reloc.h>.
158  uint32_t FixupOffset = Layout.getFragmentOffset(Fragment);
159  unsigned Log2Size = 0;
160  int64_t Value = 0;
161  unsigned Index = 0;
162  unsigned Type = 0;
163  unsigned Kind = Fixup.getKind();
164  const MCSymbol *RelSymbol = nullptr;
165 
166  FixupOffset += Fixup.getOffset();
167 
168  // AArch64 pcrel relocation addends do not include the section offset.
169  if (IsPCRel)
170  FixedValue += FixupOffset;
171 
172  // ADRP fixups use relocations for the whole symbol value and only
173  // put the addend in the instruction itself. Clear out any value the
174  // generic code figured out from the sybmol definition.
176  FixedValue = 0;
177 
178  // imm19 relocations are for conditional branches, which require
179  // assembler local symbols. If we got here, that's not what we have,
180  // so complain loudly.
182  Asm.getContext().reportError(Fixup.getLoc(),
183  "conditional branch requires assembler-local"
184  " label. '" +
185  Target.getSymA()->getSymbol().getName() +
186  "' is external.");
187  return;
188  }
189 
190  // 14-bit branch relocations should only target internal labels, and so
191  // should never get here.
193  Asm.getContext().reportError(Fixup.getLoc(),
194  "Invalid relocation on conditional branch!");
195  return;
196  }
197 
198  if (!getAArch64FixupKindMachOInfo(Fixup, Type, Target.getSymA(), Log2Size,
199  Asm)) {
200  Asm.getContext().reportError(Fixup.getLoc(), "unknown AArch64 fixup kind!");
201  return;
202  }
203 
204  Value = Target.getConstant();
205 
206  if (Target.isAbsolute()) { // constant
207  // FIXME: Should this always be extern?
208  // SymbolNum of 0 indicates the absolute section.
210 
211  if (IsPCRel) {
212  Asm.getContext().reportError(Fixup.getLoc(),
213  "PC relative absolute relocation!");
214  return;
215 
216  // FIXME: x86_64 sets the type to a branch reloc here. Should we do
217  // something similar?
218  }
219  } else if (Target.getSymB()) { // A - B + constant
220  const MCSymbol *A = &Target.getSymA()->getSymbol();
221  const MCSymbol *A_Base = Asm.getAtom(*A);
222 
223  const MCSymbol *B = &Target.getSymB()->getSymbol();
224  const MCSymbol *B_Base = Asm.getAtom(*B);
225 
226  // Check for "_foo@got - .", which comes through here as:
227  // Ltmp0:
228  // ... _foo@got - Ltmp0
229  if (Target.getSymA()->getKind() == MCSymbolRefExpr::VK_GOT &&
230  Target.getSymB()->getKind() == MCSymbolRefExpr::VK_None &&
231  Layout.getSymbolOffset(*B) ==
232  Layout.getFragmentOffset(Fragment) + Fixup.getOffset()) {
233  // SymB is the PC, so use a PC-rel pointer-to-GOT relocation.
235  IsPCRel = 1;
237  MRE.r_word0 = FixupOffset;
238  MRE.r_word1 = (IsPCRel << 24) | (Log2Size << 25) | (Type << 28);
239  Writer->addRelocation(A_Base, Fragment->getParent(), MRE);
240  return;
241  } else if (Target.getSymA()->getKind() != MCSymbolRefExpr::VK_None ||
242  Target.getSymB()->getKind() != MCSymbolRefExpr::VK_None) {
243  // Otherwise, neither symbol can be modified.
244  Asm.getContext().reportError(Fixup.getLoc(),
245  "unsupported relocation of modified symbol");
246  return;
247  }
248 
249  // We don't support PCrel relocations of differences.
250  if (IsPCRel) {
251  Asm.getContext().reportError(Fixup.getLoc(),
252  "unsupported pc-relative relocation of "
253  "difference");
254  return;
255  }
256 
257  // AArch64 always uses external relocations. If there is no symbol to use as
258  // a base address (a local symbol with no preceding non-local symbol),
259  // error out.
260  //
261  // FIXME: We should probably just synthesize an external symbol and use
262  // that.
263  if (!A_Base) {
264  Asm.getContext().reportError(
265  Fixup.getLoc(),
266  "unsupported relocation of local symbol '" + A->getName() +
267  "'. Must have non-local symbol earlier in section.");
268  return;
269  }
270  if (!B_Base) {
271  Asm.getContext().reportError(
272  Fixup.getLoc(),
273  "unsupported relocation of local symbol '" + B->getName() +
274  "'. Must have non-local symbol earlier in section.");
275  return;
276  }
277 
278  if (A_Base == B_Base && A_Base) {
279  Asm.getContext().reportError(
280  Fixup.getLoc(), "unsupported relocation with identical base");
281  return;
282  }
283 
284  Value += (!A->getFragment() ? 0 : Writer->getSymbolAddress(*A, Layout)) -
285  (!A_Base || !A_Base->getFragment() ? 0 : Writer->getSymbolAddress(
286  *A_Base, Layout));
287  Value -= (!B->getFragment() ? 0 : Writer->getSymbolAddress(*B, Layout)) -
288  (!B_Base || !B_Base->getFragment() ? 0 : Writer->getSymbolAddress(
289  *B_Base, Layout));
290 
292 
294  MRE.r_word0 = FixupOffset;
295  MRE.r_word1 = (IsPCRel << 24) | (Log2Size << 25) | (Type << 28);
296  Writer->addRelocation(A_Base, Fragment->getParent(), MRE);
297 
298  RelSymbol = B_Base;
300  } else { // A + constant
301  const MCSymbol *Symbol = &Target.getSymA()->getSymbol();
302  const MCSectionMachO &Section =
303  static_cast<const MCSectionMachO &>(*Fragment->getParent());
304 
305  bool CanUseLocalRelocation =
306  canUseLocalRelocation(Section, *Symbol, Log2Size);
307  if (Symbol->isTemporary() && (Value || !CanUseLocalRelocation)) {
308  // Make sure that the symbol is actually in a section here. If it isn't,
309  // emit an error and exit.
310  if (!Symbol->isInSection()) {
311  Asm.getContext().reportError(
312  Fixup.getLoc(),
313  "unsupported relocation of local symbol '" + Symbol->getName() +
314  "'. Must have non-local symbol earlier in section.");
315  return;
316  }
317  const MCSection &Sec = Symbol->getSection();
318  if (!Asm.getContext().getAsmInfo()->isSectionAtomizableBySymbols(Sec))
319  Symbol->setUsedInReloc();
320  }
321 
322  const MCSymbol *Base = Asm.getAtom(*Symbol);
323  // If the symbol is a variable it can either be in a section and
324  // we have a base or it is absolute and should have been expanded.
325  assert(!Symbol->isVariable() || Base);
326 
327  // Relocations inside debug sections always use local relocations when
328  // possible. This seems to be done because the debugger doesn't fully
329  // understand relocation entries and expects to find values that
330  // have already been fixed up.
331  if (Symbol->isInSection()) {
332  if (Section.hasAttribute(MachO::S_ATTR_DEBUG))
333  Base = nullptr;
334  }
335 
336  // AArch64 uses external relocations as much as possible. For debug
337  // sections, and for pointer-sized relocations (.quad), we allow section
338  // relocations. It's code sections that run into trouble.
339  if (Base) {
340  RelSymbol = Base;
341 
342  // Add the local offset, if needed.
343  if (Base != Symbol)
344  Value +=
345  Layout.getSymbolOffset(*Symbol) - Layout.getSymbolOffset(*Base);
346  } else if (Symbol->isInSection()) {
347  if (!CanUseLocalRelocation) {
348  Asm.getContext().reportError(
349  Fixup.getLoc(),
350  "unsupported relocation of local symbol '" + Symbol->getName() +
351  "'. Must have non-local symbol earlier in section.");
352  return;
353  }
354  // Adjust the relocation to be section-relative.
355  // The index is the section ordinal (1-based).
356  const MCSection &Sec = Symbol->getSection();
357  Index = Sec.getOrdinal() + 1;
358  Value += Writer->getSymbolAddress(*Symbol, Layout);
359 
360  if (IsPCRel)
361  Value -= Writer->getFragmentAddress(Fragment, Layout) +
362  Fixup.getOffset() + (1ULL << Log2Size);
363  } else {
365  "This constant variable should have been expanded during evaluation");
366  }
367  }
368 
369  // If the relocation kind is Branch26, Page21, or Pageoff12, any addend
370  // is represented via an Addend relocation, not encoded directly into
371  // the instruction.
375  Value) {
376  if (!isInt<24>(Value)) {
377  Asm.getContext().reportError(Fixup.getLoc(),
378  "addend too big for relocation");
379  return;
380  }
381 
383  MRE.r_word0 = FixupOffset;
384  MRE.r_word1 =
385  (Index << 0) | (IsPCRel << 24) | (Log2Size << 25) | (Type << 28);
386  Writer->addRelocation(RelSymbol, Fragment->getParent(), MRE);
387 
388  // Now set up the Addend relocation.
390  Index = Value;
391  RelSymbol = nullptr;
392  IsPCRel = 0;
393  Log2Size = 2;
394 
395  // Put zero into the instruction itself. The addend is in the relocation.
396  Value = 0;
397  }
398 
399  // If there's any addend left to handle, encode it in the instruction.
400  FixedValue = Value;
401 
402  // struct relocation_info (8 bytes)
404  MRE.r_word0 = FixupOffset;
405  MRE.r_word1 =
406  (Index << 0) | (IsPCRel << 24) | (Log2Size << 25) | (Type << 28);
407  Writer->addRelocation(RelSymbol, Fragment->getParent(), MRE);
408 }
409 
410 std::unique_ptr<MCObjectTargetWriter>
412  bool IsILP32) {
413  return std::make_unique<AArch64MachObjectWriter>(CPUType, CPUSubtype,
414  IsILP32);
415 }
llvm::MachO::S_CSTRING_LITERALS
@ S_CSTRING_LITERALS
S_CSTRING_LITERALS - Section with literal C strings.
Definition: MachO.h:129
llvm::MCSymbolRefExpr::getKind
VariantKind getKind() const
Definition: MCExpr.h:400
llvm::MachO::ARM64_RELOC_TLVP_LOAD_PAGEOFF12
@ ARM64_RELOC_TLVP_LOAD_PAGEOFF12
Definition: MachO.h:467
llvm::MachO::ARM64_RELOC_UNSIGNED
@ ARM64_RELOC_UNSIGNED
Definition: MachO.h:449
MathExtras.h
llvm
---------------------— PointerInfo ------------------------------------—
Definition: AllocatorList.h:23
llvm::MachO::any_relocation_info
Definition: MachO.h:975
llvm::MCSymbol
MCSymbol - Instances of this class represent a symbol name in the MC file, and MCSymbols are created ...
Definition: MCSymbol.h:41
llvm::MCSymbolRefExpr::VK_PAGEOFF
@ VK_PAGEOFF
Definition: MCExpr.h:219
llvm::MCSymbolRefExpr::VK_GOT
@ VK_GOT
Definition: MCExpr.h:198
llvm::AArch64::fixup_aarch64_pcrel_branch26
@ fixup_aarch64_pcrel_branch26
Definition: AArch64FixupKinds.h:52
llvm::AArch64::fixup_aarch64_add_imm12
@ fixup_aarch64_add_imm12
Definition: AArch64FixupKinds.h:26
llvm::Target
Target - Wrapper for Target specific information.
Definition: TargetRegistry.h:137
llvm::MachO::ARM64_RELOC_BRANCH26
@ ARM64_RELOC_BRANCH26
Definition: MachO.h:453
llvm::AArch64::fixup_aarch64_ldst_imm12_scale2
@ fixup_aarch64_ldst_imm12_scale2
Definition: AArch64FixupKinds.h:30
MCFragment.h
llvm::MachO::ARM64_RELOC_ADDEND
@ ARM64_RELOC_ADDEND
Definition: MachO.h:469
MCAssembler.h
llvm::MCSymbol::getFragment
MCFragment * getFragment(bool SetUsed=true) const
Definition: MCSymbol.h:392
llvm::Type
The instances of the Type class are immutable: once they are created, they are never changed.
Definition: Type.h:45
llvm::MachO::CPUType
CPUType
Definition: MachO.h:1418
llvm::MCFragment::getParent
MCSection * getParent() const
Definition: MCFragment.h:96
llvm::MachO::ARM64_RELOC_SUBTRACTOR
@ ARM64_RELOC_SUBTRACTOR
Definition: MachO.h:451
llvm::ARMBuildAttrs::Section
@ Section
Legacy Tags.
Definition: ARMBuildAttributes.h:78
canUseLocalRelocation
static bool canUseLocalRelocation(const MCSectionMachO &Section, const MCSymbol &Symbol, unsigned Log2Size)
Definition: AArch64MachObjectWriter.cpp:124
llvm::MCFragment
Definition: MCFragment.h:31
llvm::FK_Data_4
@ FK_Data_4
A four-byte fixup.
Definition: MCFixup.h:25
llvm::createAArch64MachObjectWriter
std::unique_ptr< MCObjectTargetWriter > createAArch64MachObjectWriter(uint32_t CPUType, uint32_t CPUSubtype, bool IsILP32)
Definition: AArch64MachObjectWriter.cpp:411
llvm::MCSectionMachO::getType
MachO::SectionType getType() const
Definition: MCSectionMachO.h:50
llvm::MachO::any_relocation_info::r_word1
uint32_t r_word1
Definition: MachO.h:976
llvm::MachObjectWriter
Definition: MCMachObjectWriter.h:84
llvm::MCSymbolRefExpr::VK_GOTPAGEOFF
@ VK_GOTPAGEOFF
Definition: MCExpr.h:221
llvm::ARM_PROC::A
@ A
Definition: ARMBaseInfo.h:34
Twine.h
MCContext.h
MCSectionMachO.h
MCSymbol.h
llvm::Log2_32
unsigned Log2_32(uint32_t Value)
Return the floor log base 2 of the specified value, -1 if the value is zero.
Definition: MathExtras.h:596
B
static GCRegistry::Add< OcamlGC > B("ocaml", "ocaml 3.10-compatible GC")
AArch64FixupKinds.h
llvm::AArch64::fixup_aarch64_pcrel_branch19
@ fixup_aarch64_pcrel_branch19
Definition: AArch64FixupKinds.h:49
MCMachObjectWriter.h
llvm::MachObjectWriter::isFixupKindPCRel
bool isFixupKindPCRel(const MCAssembler &Asm, unsigned Kind)
Definition: MachObjectWriter.cpp:74
llvm::lltok::Kind
Kind
Definition: LLToken.h:18
llvm::AArch64::fixup_aarch64_ldst_imm12_scale8
@ fixup_aarch64_ldst_imm12_scale8
Definition: AArch64FixupKinds.h:32
llvm::MCAssembler
Definition: MCAssembler.h:60
Index
uint32_t Index
Definition: ELFObjHandler.cpp:84
uint64_t
llvm::MachObjectWriter::getFragmentAddress
uint64_t getFragmentAddress(const MCFragment *Fragment, const MCAsmLayout &Layout) const
Definition: MachObjectWriter.cpp:81
llvm::MachO::ARM64_RELOC_PAGE21
@ ARM64_RELOC_PAGE21
Definition: MachO.h:455
llvm::MachO::any_relocation_info::r_word0
uint32_t r_word0
Definition: MachO.h:976
llvm::MCMachObjectTargetWriter
Definition: MCMachObjectWriter.h:29
llvm::Target::getName
const char * getName() const
getName - Get the target name.
Definition: TargetRegistry.h:347
llvm::AArch64::fixup_aarch64_ldst_imm12_scale4
@ fixup_aarch64_ldst_imm12_scale4
Definition: AArch64FixupKinds.h:31
llvm::AArch64::fixup_aarch64_pcrel_call26
@ fixup_aarch64_pcrel_call26
Definition: AArch64FixupKinds.h:56
assert
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
llvm::MachO::ARM64_RELOC_POINTER_TO_GOT
@ ARM64_RELOC_POINTER_TO_GOT
Definition: MachO.h:463
llvm::FK_Data_1
@ FK_Data_1
A one-byte fixup.
Definition: MCFixup.h:23
llvm::MCSymbolRefExpr
Represent a reference to a symbol from inside an expression.
Definition: MCExpr.h:192
MCSection.h
llvm::AArch64::fixup_aarch64_ldst_imm12_scale1
@ fixup_aarch64_ldst_imm12_scale1
Definition: AArch64FixupKinds.h:29
MCAsmInfo.h
Fixup
PowerPC TLS Dynamic Call Fixup
Definition: PPCTLSDynamicCall.cpp:235
llvm_unreachable
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
Definition: ErrorHandling.h:136
uint32_t
MCFixup.h
llvm::MCSection
Instances of this class represent a uniqued identifier for a section in the current translation unit.
Definition: MCSection.h:39
llvm::MachObjectWriter::getSymbolAddress
uint64_t getSymbolAddress(const MCSymbol &S, const MCAsmLayout &Layout) const
Definition: MachObjectWriter.cpp:87
llvm::AArch64::fixup_aarch64_pcrel_branch14
@ fixup_aarch64_pcrel_branch14
Definition: AArch64FixupKinds.h:44
llvm::MCAsmLayout::getFragmentOffset
uint64_t getFragmentOffset(const MCFragment *F) const
Get the offset of the given fragment inside its containing section.
Definition: MCFragment.cpp:96
MCAsmLayout.h
llvm::MCSection::getName
StringRef getName() const
Definition: MCSection.h:122
llvm::MCAsmLayout
Encapsulates the layout of an assembly file at a particular point in time.
Definition: MCAsmLayout.h:28
llvm::AArch64::fixup_aarch64_ldst_imm12_scale16
@ fixup_aarch64_ldst_imm12_scale16
Definition: AArch64FixupKinds.h:33
llvm::MCSymbolRefExpr::VK_TLVPPAGE
@ VK_TLVPPAGE
Definition: MCExpr.h:216
llvm::MCSectionMachO
This represents a section on a Mach-O system (used by Mac OS X).
Definition: MCSectionMachO.h:24
Casting.h
llvm::TargetStackID::Value
Value
Definition: TargetFrameLowering.h:27
llvm::MCAsmLayout::getSymbolOffset
bool getSymbolOffset(const MCSymbol &S, uint64_t &Val) const
Get the offset of the given symbol, as computed in the current layout.
Definition: MCFragment.cpp:148
AArch64MCTargetDesc.h
llvm::MCSectionMachO::getSegmentName
StringRef getSegmentName() const
Definition: MCSectionMachO.h:40
MCValue.h
llvm::MachObjectWriter::addRelocation
void addRelocation(const MCSymbol *RelSymbol, const MCSection *Sec, MachO::any_relocation_info &MRE)
Definition: MCMachObjectWriter.h:232
llvm::MachO::ARM64_RELOC_PAGEOFF12
@ ARM64_RELOC_PAGEOFF12
Definition: MachO.h:457
llvm::ARMBuildAttrs::Symbol
@ Symbol
Definition: ARMBuildAttributes.h:79
llvm::FK_Data_8
@ FK_Data_8
A eight-byte fixup.
Definition: MCFixup.h:26
llvm::MachO::ARM64_RELOC_GOT_LOAD_PAGE21
@ ARM64_RELOC_GOT_LOAD_PAGE21
Definition: MachO.h:459
llvm::AArch64::fixup_aarch64_pcrel_adrp_imm21
@ fixup_aarch64_pcrel_adrp_imm21
Definition: AArch64FixupKinds.h:22
llvm::MachO::ARM64_RELOC_GOT_LOAD_PAGEOFF12
@ ARM64_RELOC_GOT_LOAD_PAGEOFF12
Definition: MachO.h:461
llvm::HexStyle::Asm
@ Asm
0ffh
Definition: MCInstPrinter.h:34
llvm::MCValue
This represents an "assembler immediate".
Definition: MCValue.h:37
llvm::MCSymbolRefExpr::VK_None
@ VK_None
Definition: MCExpr.h:195
MachO.h
llvm::MCSymbolRefExpr::VK_GOTPAGE
@ VK_GOTPAGE
Definition: MCExpr.h:220
llvm::MachO::S_ATTR_DEBUG
@ S_ATTR_DEBUG
S_ATTR_DEBUG - A debug section.
Definition: MachO.h:202
llvm::FK_Data_2
@ FK_Data_2
A two-byte fixup.
Definition: MCFixup.h:24
llvm::MCSymbolRefExpr::VK_PAGE
@ VK_PAGE
Definition: MCExpr.h:218
llvm::MCSection::getOrdinal
unsigned getOrdinal() const
Definition: MCSection.h:141
MCExpr.h
llvm::MCFixup
Encode information on a single operation to perform on a byte sequence (e.g., an encoded instruction)...
Definition: MCFixup.h:71
llvm::MCSymbolRefExpr::VK_TLVPPAGEOFF
@ VK_TLVPPAGEOFF
Definition: MCExpr.h:217
llvm::Value
LLVM Value Representation.
Definition: Value.h:75
llvm::MachO::ARM64_RELOC_TLVP_LOAD_PAGE21
@ ARM64_RELOC_TLVP_LOAD_PAGE21
Definition: MachO.h:465
llvm::sampleprof::Base
@ Base
Definition: Discriminator.h:58