LLVM  16.0.0git
MachOYAML.h
Go to the documentation of this file.
1 //===- MachOYAML.h - Mach-O YAMLIO implementation ---------------*- 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 /// \file
10 /// This file declares classes for handling the YAML representation
11 /// of Mach-O.
12 ///
13 //===----------------------------------------------------------------------===//
14 
15 #ifndef LLVM_OBJECTYAML_MACHOYAML_H
16 #define LLVM_OBJECTYAML_MACHOYAML_H
17 
18 #include "llvm/ADT/StringRef.h"
21 #include "llvm/ObjectYAML/YAML.h"
23 #include <cstdint>
24 #include <string>
25 #include <vector>
26 
27 namespace llvm {
28 namespace MachOYAML {
29 
30 struct Relocation {
31  // Offset in the section to what is being relocated.
32  llvm::yaml::Hex32 address;
33  // Symbol index if r_extern == 1 else section index.
35  bool is_pcrel;
36  // Real length = 2 ^ length.
37  uint8_t length;
38  bool is_extern;
39  uint8_t type;
41  int32_t value;
42 };
43 
44 struct Section {
45  char sectname[16];
46  char segname[16];
47  llvm::yaml::Hex64 addr;
49  llvm::yaml::Hex32 offset;
51  llvm::yaml::Hex32 reloff;
53  llvm::yaml::Hex32 flags;
54  llvm::yaml::Hex32 reserved1;
55  llvm::yaml::Hex32 reserved2;
56  llvm::yaml::Hex32 reserved3;
58  std::vector<Relocation> relocations;
59 };
60 
61 struct FileHeader {
62  llvm::yaml::Hex32 magic;
63  llvm::yaml::Hex32 cputype;
64  llvm::yaml::Hex32 cpusubtype;
65  llvm::yaml::Hex32 filetype;
68  llvm::yaml::Hex32 flags;
69  llvm::yaml::Hex32 reserved;
70 };
71 
72 struct LoadCommand {
73  virtual ~LoadCommand();
74 
76  std::vector<Section> Sections;
77  std::vector<MachO::build_tool_version> Tools;
78  std::vector<llvm::yaml::Hex8> PayloadBytes;
79  std::string Content;
81 };
82 
83 struct NListEntry {
85  llvm::yaml::Hex8 n_type;
86  uint8_t n_sect;
89 };
90 
91 struct RebaseOpcode {
93  uint8_t Imm;
94  std::vector<yaml::Hex64> ExtraData;
95 };
96 
97 struct BindOpcode {
99  uint8_t Imm;
100  std::vector<yaml::Hex64> ULEBExtraData;
101  std::vector<int64_t> SLEBExtraData;
103 };
104 
105 struct ExportEntry {
108  std::string Name;
109  llvm::yaml::Hex64 Flags = 0;
110  llvm::yaml::Hex64 Address = 0;
111  llvm::yaml::Hex64 Other = 0;
112  std::string ImportName;
113  std::vector<MachOYAML::ExportEntry> Children;
114 };
115 
117  llvm::yaml::Hex32 Offset;
119  llvm::yaml::Hex16 Kind;
120 };
121 
122 struct LinkEditData {
123  std::vector<MachOYAML::RebaseOpcode> RebaseOpcodes;
124  std::vector<MachOYAML::BindOpcode> BindOpcodes;
125  std::vector<MachOYAML::BindOpcode> WeakBindOpcodes;
126  std::vector<MachOYAML::BindOpcode> LazyBindOpcodes;
128  std::vector<NListEntry> NameList;
129  std::vector<StringRef> StringTable;
130  std::vector<yaml::Hex32> IndirectSymbols;
131  std::vector<yaml::Hex64> FunctionStarts;
132  std::vector<DataInCodeEntry> DataInCode;
133  std::vector<yaml::Hex8> ChainedFixups;
134 
135  bool isEmpty() const;
136 };
137 
138 struct Object {
141  std::vector<LoadCommand> LoadCommands;
142  std::vector<Section> Sections;
146 };
147 
148 struct FatHeader {
149  llvm::yaml::Hex32 magic;
151 };
152 
153 struct FatArch {
154  llvm::yaml::Hex32 cputype;
155  llvm::yaml::Hex32 cpusubtype;
156  llvm::yaml::Hex64 offset;
159  llvm::yaml::Hex32 reserved;
160 };
161 
164  std::vector<FatArch> FatArchs;
165  std::vector<Object> Slices;
166 };
167 
168 } // end namespace MachOYAML
169 } // end namespace llvm
170 
182 
183 namespace llvm {
184 
185 class raw_ostream;
186 
187 namespace yaml {
188 
189 template <> struct MappingTraits<MachOYAML::FileHeader> {
190  static void mapping(IO &IO, MachOYAML::FileHeader &FileHeader);
191 };
192 
193 template <> struct MappingTraits<MachOYAML::Object> {
194  static void mapping(IO &IO, MachOYAML::Object &Object);
195 };
196 
197 template <> struct MappingTraits<MachOYAML::FatHeader> {
198  static void mapping(IO &IO, MachOYAML::FatHeader &FatHeader);
199 };
200 
201 template <> struct MappingTraits<MachOYAML::FatArch> {
202  static void mapping(IO &IO, MachOYAML::FatArch &FatArch);
203 };
204 
205 template <> struct MappingTraits<MachOYAML::UniversalBinary> {
206  static void mapping(IO &IO, MachOYAML::UniversalBinary &UniversalBinary);
207 };
208 
209 template <> struct MappingTraits<MachOYAML::LoadCommand> {
210  static void mapping(IO &IO, MachOYAML::LoadCommand &LoadCommand);
211 };
212 
213 template <> struct MappingTraits<MachOYAML::LinkEditData> {
214  static void mapping(IO &IO, MachOYAML::LinkEditData &LinkEditData);
215 };
216 
217 template <> struct MappingTraits<MachOYAML::RebaseOpcode> {
218  static void mapping(IO &IO, MachOYAML::RebaseOpcode &RebaseOpcode);
219 };
220 
221 template <> struct MappingTraits<MachOYAML::BindOpcode> {
222  static void mapping(IO &IO, MachOYAML::BindOpcode &BindOpcode);
223 };
224 
225 template <> struct MappingTraits<MachOYAML::ExportEntry> {
226  static void mapping(IO &IO, MachOYAML::ExportEntry &ExportEntry);
227 };
228 
229 template <> struct MappingTraits<MachOYAML::Relocation> {
230  static void mapping(IO &IO, MachOYAML::Relocation &R);
231 };
232 
233 template <> struct MappingTraits<MachOYAML::Section> {
234  static void mapping(IO &IO, MachOYAML::Section &Section);
235  static std::string validate(IO &io, MachOYAML::Section &Section);
236 };
237 
238 template <> struct MappingTraits<MachOYAML::NListEntry> {
239  static void mapping(IO &IO, MachOYAML::NListEntry &NListEntry);
240 };
241 
242 template <> struct MappingTraits<MachO::build_tool_version> {
243  static void mapping(IO &IO, MachO::build_tool_version &tool);
244 };
245 
246 template <> struct MappingTraits<MachOYAML::DataInCodeEntry> {
247  static void mapping(IO &IO, MachOYAML::DataInCodeEntry &DataInCodeEntry);
248 };
249 
250 #define HANDLE_LOAD_COMMAND(LCName, LCValue, LCStruct) \
251  io.enumCase(value, #LCName, MachO::LCName);
252 
253 template <> struct ScalarEnumerationTraits<MachO::LoadCommandType> {
254  static void enumeration(IO &io, MachO::LoadCommandType &value) {
255 #include "llvm/BinaryFormat/MachO.def"
256  io.enumFallback<Hex32>(value);
257  }
258 };
259 
260 #define ENUM_CASE(Enum) io.enumCase(value, #Enum, MachO::Enum);
261 
262 template <> struct ScalarEnumerationTraits<MachO::RebaseOpcode> {
263  static void enumeration(IO &io, MachO::RebaseOpcode &value) {
273  io.enumFallback<Hex8>(value);
274  }
275 };
276 
277 template <> struct ScalarEnumerationTraits<MachO::BindOpcode> {
278  static void enumeration(IO &io, MachO::BindOpcode &value) {
292  io.enumFallback<Hex8>(value);
293  }
294 };
295 
296 // This trait is used for 16-byte chars in Mach structures used for strings
297 using char_16 = char[16];
298 
299 template <> struct ScalarTraits<char_16> {
300  static void output(const char_16 &Val, void *, raw_ostream &Out);
301  static StringRef input(StringRef Scalar, void *, char_16 &Val);
302  static QuotingType mustQuote(StringRef S);
303 };
304 
305 // This trait is used for UUIDs. It reads and writes them matching otool's
306 // formatting style.
308 
309 template <> struct ScalarTraits<uuid_t> {
310  static void output(const uuid_t &Val, void *, raw_ostream &Out);
311  static StringRef input(StringRef Scalar, void *, uuid_t &Val);
312  static QuotingType mustQuote(StringRef S);
313 };
314 
315 // Load Command struct mapping traits
316 
317 #define LOAD_COMMAND_STRUCT(LCStruct) \
318  template <> struct MappingTraits<MachO::LCStruct> { \
319  static void mapping(IO &IO, MachO::LCStruct &LoadCommand); \
320  };
321 
322 #include "llvm/BinaryFormat/MachO.def"
323 
324 // Extra structures used by load commands
325 template <> struct MappingTraits<MachO::dylib> {
326  static void mapping(IO &IO, MachO::dylib &LoadCommand);
327 };
328 
329 template <> struct MappingTraits<MachO::fvmlib> {
330  static void mapping(IO &IO, MachO::fvmlib &LoadCommand);
331 };
332 
333 template <> struct MappingTraits<MachO::section> {
334  static void mapping(IO &IO, MachO::section &LoadCommand);
335 };
336 
337 template <> struct MappingTraits<MachO::section_64> {
338  static void mapping(IO &IO, MachO::section_64 &LoadCommand);
339 };
340 
341 } // end namespace yaml
342 
343 } // end namespace llvm
344 
345 #endif // LLVM_OBJECTYAML_MACHOYAML_H
llvm::MachO::dylib
Definition: MachO.h:617
llvm::MachOYAML::ExportEntry
Definition: MachOYAML.h:105
llvm::MachOYAML::FatArch::offset
llvm::yaml::Hex64 offset
Definition: MachOYAML.h:156
llvm::MachO::BIND_OPCODE_SET_DYLIB_ORDINAL_IMM
@ BIND_OPCODE_SET_DYLIB_ORDINAL_IMM
Definition: MachO.h:277
llvm::MachOYAML::LoadCommand::Sections
std::vector< Section > Sections
Definition: MachOYAML.h:76
llvm::MachO::section
Definition: MachO.h:570
llvm::MachOYAML::NListEntry::n_desc
uint16_t n_desc
Definition: MachOYAML.h:87
llvm::MachOYAML::DataInCodeEntry::Length
uint16_t Length
Definition: MachOYAML.h:118
llvm::MachOYAML::RebaseOpcode::Imm
uint8_t Imm
Definition: MachOYAML.h:93
llvm
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18
llvm::MachOYAML::Object::Sections
std::vector< Section > Sections
Definition: MachOYAML.h:142
llvm::MachO::BIND_OPCODE_DO_BIND_ADD_ADDR_IMM_SCALED
@ BIND_OPCODE_DO_BIND_ADD_ADDR_IMM_SCALED
Definition: MachO.h:287
llvm::MachOYAML::BindOpcode::ULEBExtraData
std::vector< yaml::Hex64 > ULEBExtraData
Definition: MachOYAML.h:100
llvm::MachOYAML::Object
Definition: MachOYAML.h:138
llvm::MachOYAML::Relocation::is_scattered
bool is_scattered
Definition: MachOYAML.h:40
llvm::MachOYAML::Section
Definition: MachOYAML.h:44
llvm::MachOYAML::Section::segname
char segname[16]
Definition: MachOYAML.h:46
llvm::MachOYAML::LinkEditData::DataInCode
std::vector< DataInCodeEntry > DataInCode
Definition: MachOYAML.h:132
llvm::MachOYAML::Relocation::is_pcrel
bool is_pcrel
Definition: MachOYAML.h:35
llvm::yaml::char_16
char[16] char_16
Definition: MachOYAML.h:297
StringRef.h
llvm::MachO::BIND_OPCODE_SET_SEGMENT_AND_OFFSET_ULEB
@ BIND_OPCODE_SET_SEGMENT_AND_OFFSET_ULEB
Definition: MachO.h:283
llvm::MachOYAML::BindOpcode::Opcode
MachO::BindOpcode Opcode
Definition: MachOYAML.h:98
llvm::MachOYAML::ExportEntry::Address
llvm::yaml::Hex64 Address
Definition: MachOYAML.h:110
llvm::MachOYAML::LinkEditData::ExportTrie
MachOYAML::ExportEntry ExportTrie
Definition: MachOYAML.h:127
llvm::MachO::REBASE_OPCODE_SET_TYPE_IMM
@ REBASE_OPCODE_SET_TYPE_IMM
Definition: MachO.h:244
output
Current output
Definition: README.txt:1350
llvm::MachOYAML::LoadCommand::ZeroPadBytes
uint64_t ZeroPadBytes
Definition: MachOYAML.h:80
llvm::MachOYAML::Section::nreloc
uint32_t nreloc
Definition: MachOYAML.h:52
LLVM_YAML_IS_SEQUENCE_VECTOR
#define LLVM_YAML_IS_SEQUENCE_VECTOR(type)
llvm::MachOYAML::FatHeader::nfat_arch
uint32_t nfat_arch
Definition: MachOYAML.h:150
llvm::MachO::REBASE_OPCODE_ADD_ADDR_ULEB
@ REBASE_OPCODE_ADD_ADDR_ULEB
Definition: MachO.h:246
llvm::MachO::fvmlib
Definition: MachO.h:604
llvm::MachOYAML::UniversalBinary::FatArchs
std::vector< FatArch > FatArchs
Definition: MachOYAML.h:164
llvm::MachO::REBASE_OPCODE_SET_SEGMENT_AND_OFFSET_ULEB
@ REBASE_OPCODE_SET_SEGMENT_AND_OFFSET_ULEB
Definition: MachO.h:245
llvm::MachOYAML::ExportEntry::Flags
llvm::yaml::Hex64 Flags
Definition: MachOYAML.h:109
llvm::MachOYAML::LinkEditData::LazyBindOpcodes
std::vector< MachOYAML::BindOpcode > LazyBindOpcodes
Definition: MachOYAML.h:126
llvm::MachOYAML::NListEntry
Definition: MachOYAML.h:83
llvm::MachOYAML::LoadCommand::PayloadBytes
std::vector< llvm::yaml::Hex8 > PayloadBytes
Definition: MachOYAML.h:78
llvm::Optional< llvm::yaml::BinaryRef >
llvm::MachO::LoadCommandType
LoadCommandType
Definition: MachO.h:98
llvm::MachOYAML::Object::DWARF
DWARFYAML::Data DWARF
Definition: MachOYAML.h:145
llvm::MachOYAML::Section::addr
llvm::yaml::Hex64 addr
Definition: MachOYAML.h:47
llvm::MachOYAML::ExportEntry::NodeOffset
uint64_t NodeOffset
Definition: MachOYAML.h:107
llvm::MachOYAML::DataInCodeEntry::Offset
llvm::yaml::Hex32 Offset
Definition: MachOYAML.h:117
llvm::MachOYAML::LinkEditData::FunctionStarts
std::vector< yaml::Hex64 > FunctionStarts
Definition: MachOYAML.h:131
llvm::yaml::MappingTraits
Definition: ModuleSummaryIndex.h:53
llvm::RISCVFeatures::validate
void validate(const Triple &TT, const FeatureBitset &FeatureBits)
Definition: RISCVBaseInfo.cpp:97
llvm::MachOYAML::LinkEditData::RebaseOpcodes
std::vector< MachOYAML::RebaseOpcode > RebaseOpcodes
Definition: MachOYAML.h:123
llvm::MachO::BIND_OPCODE_DO_BIND_ADD_ADDR_ULEB
@ BIND_OPCODE_DO_BIND_ADD_ADDR_ULEB
Definition: MachO.h:286
llvm::yaml::uuid_t
raw_ostream::uuid_t uuid_t
Definition: MachOYAML.h:307
llvm::MachOYAML::Relocation::address
llvm::yaml::Hex32 address
Definition: MachOYAML.h:32
llvm::MachOYAML::RebaseOpcode
Definition: MachOYAML.h:91
llvm::DWARFYAML::Data
Definition: DWARFYAML.h:210
llvm::MachOYAML::LoadCommand::Content
std::string Content
Definition: MachOYAML.h:79
llvm::MachOYAML::FileHeader::sizeofcmds
uint32_t sizeofcmds
Definition: MachOYAML.h:67
llvm::MachOYAML::BindOpcode::Symbol
StringRef Symbol
Definition: MachOYAML.h:102
llvm::MachOYAML::ExportEntry::Other
llvm::yaml::Hex64 Other
Definition: MachOYAML.h:111
llvm::ARMBuildAttrs::Section
@ Section
Legacy Tags.
Definition: ARMBuildAttributes.h:82
llvm::MachOYAML::LinkEditData::IndirectSymbols
std::vector< yaml::Hex32 > IndirectSymbols
Definition: MachOYAML.h:130
llvm::MachOYAML::DataInCodeEntry::Kind
llvm::yaml::Hex16 Kind
Definition: MachOYAML.h:119
llvm::MachOYAML::Section::size
uint64_t size
Definition: MachOYAML.h:48
llvm::MachOYAML::Section::sectname
char sectname[16]
Definition: MachOYAML.h:45
llvm::MachOYAML::LinkEditData::isEmpty
bool isEmpty() const
Definition: MachOYAML.cpp:28
llvm::MachOYAML::Relocation::is_extern
bool is_extern
Definition: MachOYAML.h:38
llvm::MachOYAML::BindOpcode
Definition: MachOYAML.h:97
llvm::MachOYAML::ExportEntry::Name
std::string Name
Definition: MachOYAML.h:108
llvm::MachOYAML::FatArch::align
uint32_t align
Definition: MachOYAML.h:158
llvm::MachOYAML::NListEntry::n_value
uint64_t n_value
Definition: MachOYAML.h:88
llvm::MachOYAML::FatArch::cputype
llvm::yaml::Hex32 cputype
Definition: MachOYAML.h:154
YAML.h
llvm::MachO::BIND_OPCODE_SET_TYPE_IMM
@ BIND_OPCODE_SET_TYPE_IMM
Definition: MachO.h:281
llvm::MachOYAML::UniversalBinary
Definition: MachOYAML.h:162
llvm::MachO::REBASE_OPCODE_DO_REBASE_ULEB_TIMES_SKIPPING_ULEB
@ REBASE_OPCODE_DO_REBASE_ULEB_TIMES_SKIPPING_ULEB
Definition: MachO.h:251
llvm::MachOYAML::UniversalBinary::Slices
std::vector< Object > Slices
Definition: MachOYAML.h:165
llvm::MachOYAML::FileHeader::filetype
llvm::yaml::Hex32 filetype
Definition: MachOYAML.h:65
llvm::raw_ostream
This class implements an extremely fast bulk output stream that can only output to a stream.
Definition: raw_ostream.h:52
llvm::MachOYAML::LoadCommand::Data
llvm::MachO::macho_load_command Data
Definition: MachOYAML.h:75
llvm::MachOYAML::Section::relocations
std::vector< Relocation > relocations
Definition: MachOYAML.h:58
llvm::MachOYAML::BindOpcode::Imm
uint8_t Imm
Definition: MachOYAML.h:99
input
The initial backend is deliberately restricted to z10 We should add support for later architectures at some point If an asm ties an i32 r result to an i64 input
Definition: README.txt:10
llvm::MachOYAML::LoadCommand
Definition: MachOYAML.h:72
llvm::MachO::BIND_OPCODE_ADD_ADDR_ULEB
@ BIND_OPCODE_ADD_ADDR_ULEB
Definition: MachO.h:284
llvm::MachO::REBASE_OPCODE_DO_REBASE_IMM_TIMES
@ REBASE_OPCODE_DO_REBASE_IMM_TIMES
Definition: MachO.h:248
llvm::MachOYAML::Object::LinkEdit
LinkEditData LinkEdit
Definition: MachOYAML.h:143
llvm::MachOYAML::BindOpcode::SLEBExtraData
std::vector< int64_t > SLEBExtraData
Definition: MachOYAML.h:101
llvm::MachOYAML::LinkEditData::NameList
std::vector< NListEntry > NameList
Definition: MachOYAML.h:128
llvm::MachOYAML::Object::LoadCommands
std::vector< LoadCommand > LoadCommands
Definition: MachOYAML.h:141
llvm::OutputFileType::Object
@ Object
llvm::MachOYAML::RebaseOpcode::Opcode
MachO::RebaseOpcode Opcode
Definition: MachOYAML.h:92
DWARFYAML.h
llvm::MachOYAML::FatArch::cpusubtype
llvm::yaml::Hex32 cpusubtype
Definition: MachOYAML.h:155
llvm::MachOYAML::FileHeader::reserved
llvm::yaml::Hex32 reserved
Definition: MachOYAML.h:69
llvm::MachOYAML::RebaseOpcode::ExtraData
std::vector< yaml::Hex64 > ExtraData
Definition: MachOYAML.h:94
llvm::MachOYAML::UniversalBinary::Header
FatHeader Header
Definition: MachOYAML.h:163
uint64_t
llvm::MachOYAML::ExportEntry::ImportName
std::string ImportName
Definition: MachOYAML.h:112
llvm::MachOYAML::Section::offset
llvm::yaml::Hex32 offset
Definition: MachOYAML.h:49
llvm::MachOYAML::FileHeader::flags
llvm::yaml::Hex32 flags
Definition: MachOYAML.h:68
llvm::MachO::build_tool_version
Definition: MachO.h:857
llvm::MachOYAML::Relocation::value
int32_t value
Definition: MachOYAML.h:41
llvm::MachO::REBASE_OPCODE_ADD_ADDR_IMM_SCALED
@ REBASE_OPCODE_ADD_ADDR_IMM_SCALED
Definition: MachO.h:247
llvm::MachOYAML::Relocation::type
uint8_t type
Definition: MachOYAML.h:39
llvm::MachOYAML::NListEntry::n_sect
uint8_t n_sect
Definition: MachOYAML.h:86
llvm::MachOYAML::FatArch::size
uint64_t size
Definition: MachOYAML.h:157
llvm::MachO::REBASE_OPCODE_DO_REBASE_ULEB_TIMES
@ REBASE_OPCODE_DO_REBASE_ULEB_TIMES
Definition: MachO.h:249
llvm::MachOYAML::LinkEditData::ChainedFixups
std::vector< yaml::Hex8 > ChainedFixups
Definition: MachOYAML.h:133
llvm::yaml::ScalarEnumerationTraits< MachO::BindOpcode >::enumeration
static void enumeration(IO &io, MachO::BindOpcode &value)
Definition: MachOYAML.h:278
llvm::MachOYAML::FileHeader
Definition: MachOYAML.h:61
llvm::MachOYAML::NListEntry::n_type
llvm::yaml::Hex8 n_type
Definition: MachOYAML.h:85
llvm::MachOYAML::Object::IsLittleEndian
bool IsLittleEndian
Definition: MachOYAML.h:139
llvm::MachO::RebaseOpcode
RebaseOpcode
Definition: MachO.h:242
llvm::MachOYAML::Section::content
Optional< llvm::yaml::BinaryRef > content
Definition: MachOYAML.h:57
llvm::MachOYAML::NListEntry::n_strx
uint32_t n_strx
Definition: MachOYAML.h:84
YAMLTraits.h
llvm::MachO::REBASE_OPCODE_DONE
@ REBASE_OPCODE_DONE
Definition: MachO.h:243
llvm::MachOYAML::LinkEditData
Definition: MachOYAML.h:122
llvm::MachO::BIND_OPCODE_SET_DYLIB_ORDINAL_ULEB
@ BIND_OPCODE_SET_DYLIB_ORDINAL_ULEB
Definition: MachO.h:278
llvm::MachOYAML::LoadCommand::~LoadCommand
virtual ~LoadCommand()
llvm::StringRef
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:50
llvm::MachOYAML::ExportEntry::TerminalSize
uint64_t TerminalSize
Definition: MachOYAML.h:106
llvm::MachO::BIND_OPCODE_SET_ADDEND_SLEB
@ BIND_OPCODE_SET_ADDEND_SLEB
Definition: MachO.h:282
llvm::MachOYAML::FileHeader::cputype
llvm::yaml::Hex32 cputype
Definition: MachOYAML.h:63
uint32_t
llvm::MachOYAML::LinkEditData::WeakBindOpcodes
std::vector< MachOYAML::BindOpcode > WeakBindOpcodes
Definition: MachOYAML.h:125
llvm::MachOYAML::FileHeader::magic
llvm::yaml::Hex32 magic
Definition: MachOYAML.h:62
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
llvm::MachO::REBASE_OPCODE_DO_REBASE_ADD_ADDR_ULEB
@ REBASE_OPCODE_DO_REBASE_ADD_ADDR_ULEB
Definition: MachO.h:250
llvm::MachOYAML::Object::Header
FileHeader Header
Definition: MachOYAML.h:140
llvm::MachOYAML::LinkEditData::BindOpcodes
std::vector< MachOYAML::BindOpcode > BindOpcodes
Definition: MachOYAML.h:124
llvm::MachO::BIND_OPCODE_DO_BIND_ULEB_TIMES_SKIPPING_ULEB
@ BIND_OPCODE_DO_BIND_ULEB_TIMES_SKIPPING_ULEB
Definition: MachO.h:288
llvm::MachOYAML::LoadCommand::Tools
std::vector< MachO::build_tool_version > Tools
Definition: MachOYAML.h:77
llvm::MachO::section_64
Definition: MachO.h:584
llvm::MachOYAML::FileHeader::cpusubtype
llvm::yaml::Hex32 cpusubtype
Definition: MachOYAML.h:64
uint16_t
llvm::MachOYAML::Section::reserved3
llvm::yaml::Hex32 reserved3
Definition: MachOYAML.h:56
llvm::MachOYAML::Object::RawLinkEditSegment
Optional< llvm::yaml::BinaryRef > RawLinkEditSegment
Definition: MachOYAML.h:144
llvm::MachOYAML::FatArch
Definition: MachOYAML.h:153
llvm::MachOYAML::Relocation::symbolnum
uint32_t symbolnum
Definition: MachOYAML.h:34
llvm::MachOYAML::FatArch::reserved
llvm::yaml::Hex32 reserved
Definition: MachOYAML.h:159
llvm::MachOYAML::Section::reserved1
llvm::yaml::Hex32 reserved1
Definition: MachOYAML.h:54
llvm::yaml::ScalarEnumerationTraits< MachO::LoadCommandType >::enumeration
static void enumeration(IO &io, MachO::LoadCommandType &value)
Definition: MachOYAML.h:254
llvm::MachOYAML::LinkEditData::StringTable
std::vector< StringRef > StringTable
Definition: MachOYAML.h:129
llvm::MachOYAML::Section::reserved2
llvm::yaml::Hex32 reserved2
Definition: MachOYAML.h:55
llvm::MachOYAML::FileHeader::ncmds
uint32_t ncmds
Definition: MachOYAML.h:66
llvm::MachO::BIND_OPCODE_SET_SYMBOL_TRAILING_FLAGS_IMM
@ BIND_OPCODE_SET_SYMBOL_TRAILING_FLAGS_IMM
Definition: MachO.h:280
llvm::MachOYAML::FatHeader::magic
llvm::yaml::Hex32 magic
Definition: MachOYAML.h:149
llvm::MachOYAML::ExportEntry::Children
std::vector< MachOYAML::ExportEntry > Children
Definition: MachOYAML.h:113
llvm::MachO::BIND_OPCODE_DONE
@ BIND_OPCODE_DONE
Definition: MachO.h:276
ENUM_CASE
#define ENUM_CASE(Enum)
Definition: MachOYAML.h:260
llvm::raw_ostream::uuid_t
uint8_t[16] uuid_t
Output a formatted UUID with dash separators.
Definition: raw_ostream.h:269
MachO.h
llvm::yaml::ScalarEnumerationTraits< MachO::RebaseOpcode >::enumeration
static void enumeration(IO &io, MachO::RebaseOpcode &value)
Definition: MachOYAML.h:263
llvm::MachOYAML::DataInCodeEntry
Definition: MachOYAML.h:116
llvm::MachOYAML::Section::reloff
llvm::yaml::Hex32 reloff
Definition: MachOYAML.h:51
llvm::MachOYAML::Section::flags
llvm::yaml::Hex32 flags
Definition: MachOYAML.h:53
llvm::MachO::BIND_OPCODE_SET_DYLIB_SPECIAL_IMM
@ BIND_OPCODE_SET_DYLIB_SPECIAL_IMM
Definition: MachO.h:279
llvm::MachO::BIND_OPCODE_DO_BIND
@ BIND_OPCODE_DO_BIND
Definition: MachO.h:285
llvm::MachOYAML::Relocation
Definition: MachOYAML.h:30
llvm::MachOYAML::Section::align
uint32_t align
Definition: MachOYAML.h:50
llvm::MachOYAML::Relocation::length
uint8_t length
Definition: MachOYAML.h:37
llvm::MachO::macho_load_command
Definition: MachO.h:2147
llvm::MachO::BindOpcode
BindOpcode
Definition: MachO.h:275
llvm::MachOYAML::FatHeader
Definition: MachOYAML.h:148