1 | //,,,-- llvm/Support/MachO.def - The MachO file definitions -----*- 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 | // Definitions for MachO files |
10 | // |
11 | //,,,----------------------------------------------------------------------,,,// |
12 | |
13 | #ifdef HANDLE_LOAD_COMMAND |
14 | |
15 | HANDLE_LOAD_COMMAND(LC_SEGMENT, 0x00000001u, segment_command) |
16 | HANDLE_LOAD_COMMAND(LC_SYMTAB, 0x00000002u, symtab_command) |
17 | // LC_SYMSEG is obsolete and no longer supported. |
18 | HANDLE_LOAD_COMMAND(LC_SYMSEG, 0x00000003u, symseg_command) |
19 | HANDLE_LOAD_COMMAND(LC_THREAD, 0x00000004u, thread_command) |
20 | HANDLE_LOAD_COMMAND(LC_UNIXTHREAD, 0x00000005u, thread_command) |
21 | // LC_LOADFVMLIB is obsolete and no longer supported. |
22 | HANDLE_LOAD_COMMAND(LC_LOADFVMLIB, 0x00000006u, fvmlib_command) |
23 | // LC_IDFVMLIB is obsolete and no longer supported. |
24 | HANDLE_LOAD_COMMAND(LC_IDFVMLIB, 0x00000007u, fvmlib_command) |
25 | // LC_IDENT is obsolete and no longer supported. |
26 | HANDLE_LOAD_COMMAND(LC_IDENT, 0x00000008u, ident_command) |
27 | // LC_FVMFILE is obsolete and no longer supported. |
28 | HANDLE_LOAD_COMMAND(LC_FVMFILE, 0x00000009u, fvmfile_command) |
29 | // LC_PREPAGE is obsolete and no longer supported. |
30 | HANDLE_LOAD_COMMAND(LC_PREPAGE, 0x0000000Au, load_command) |
31 | HANDLE_LOAD_COMMAND(LC_DYSYMTAB, 0x0000000Bu, dysymtab_command) |
32 | HANDLE_LOAD_COMMAND(LC_LOAD_DYLIB, 0x0000000Cu, dylib_command) |
33 | HANDLE_LOAD_COMMAND(LC_ID_DYLIB, 0x0000000Du, dylib_command) |
34 | HANDLE_LOAD_COMMAND(LC_LOAD_DYLINKER, 0x0000000Eu, dylinker_command) |
35 | HANDLE_LOAD_COMMAND(LC_ID_DYLINKER, 0x0000000Fu, dylinker_command) |
36 | // LC_PREBOUND_DYLIB is obsolete and no longer supported. |
37 | HANDLE_LOAD_COMMAND(LC_PREBOUND_DYLIB, 0x00000010u, prebound_dylib_command) |
38 | HANDLE_LOAD_COMMAND(LC_ROUTINES, 0x00000011u, routines_command) |
39 | HANDLE_LOAD_COMMAND(LC_SUB_FRAMEWORK, 0x00000012u, sub_framework_command) |
40 | HANDLE_LOAD_COMMAND(LC_SUB_UMBRELLA, 0x00000013u, sub_umbrella_command) |
41 | HANDLE_LOAD_COMMAND(LC_SUB_CLIENT, 0x00000014u, sub_client_command) |
42 | HANDLE_LOAD_COMMAND(LC_SUB_LIBRARY, 0x00000015u, sub_library_command) |
43 | // LC_TWOLEVEL_HINTS is obsolete and no longer supported. |
44 | HANDLE_LOAD_COMMAND(LC_TWOLEVEL_HINTS, 0x00000016u, twolevel_hints_command) |
45 | // LC_PREBIND_CKSUM is obsolete and no longer supported. |
46 | HANDLE_LOAD_COMMAND(LC_PREBIND_CKSUM, 0x00000017u, prebind_cksum_command) |
47 | // LC_LOAD_WEAK_DYLIB is obsolete and no longer supported. |
48 | HANDLE_LOAD_COMMAND(LC_LOAD_WEAK_DYLIB, 0x80000018u, dylib_command) |
49 | HANDLE_LOAD_COMMAND(LC_SEGMENT_64, 0x00000019u, segment_command_64) |
50 | HANDLE_LOAD_COMMAND(LC_ROUTINES_64, 0x0000001Au, routines_command_64) |
51 | HANDLE_LOAD_COMMAND(LC_UUID, 0x0000001Bu, uuid_command) |
52 | HANDLE_LOAD_COMMAND(LC_RPATH, 0x8000001Cu, rpath_command) |
53 | HANDLE_LOAD_COMMAND(LC_CODE_SIGNATURE, 0x0000001Du, linkedit_data_command) |
54 | HANDLE_LOAD_COMMAND(LC_SEGMENT_SPLIT_INFO, 0x0000001Eu, linkedit_data_command) |
55 | HANDLE_LOAD_COMMAND(LC_REEXPORT_DYLIB, 0x8000001Fu, dylib_command) |
56 | HANDLE_LOAD_COMMAND(LC_LAZY_LOAD_DYLIB, 0x00000020u, dylib_command) |
57 | HANDLE_LOAD_COMMAND(LC_ENCRYPTION_INFO, 0x00000021u, encryption_info_command) |
58 | HANDLE_LOAD_COMMAND(LC_DYLD_INFO, 0x00000022u, dyld_info_command) |
59 | HANDLE_LOAD_COMMAND(LC_DYLD_INFO_ONLY, 0x80000022u, dyld_info_command) |
60 | HANDLE_LOAD_COMMAND(LC_LOAD_UPWARD_DYLIB, 0x80000023u, dylib_command) |
61 | HANDLE_LOAD_COMMAND(LC_VERSION_MIN_MACOSX, 0x00000024u, version_min_command) |
62 | HANDLE_LOAD_COMMAND(LC_VERSION_MIN_IPHONEOS, 0x00000025u, version_min_command) |
63 | HANDLE_LOAD_COMMAND(LC_FUNCTION_STARTS, 0x00000026u, linkedit_data_command) |
64 | HANDLE_LOAD_COMMAND(LC_DYLD_ENVIRONMENT, 0x00000027u, dylinker_command) |
65 | HANDLE_LOAD_COMMAND(LC_MAIN, 0x80000028u, entry_point_command) |
66 | HANDLE_LOAD_COMMAND(LC_DATA_IN_CODE, 0x00000029u, linkedit_data_command) |
67 | HANDLE_LOAD_COMMAND(LC_SOURCE_VERSION, 0x0000002Au, source_version_command) |
68 | HANDLE_LOAD_COMMAND(LC_DYLIB_CODE_SIGN_DRS, 0x0000002Bu, linkedit_data_command) |
69 | HANDLE_LOAD_COMMAND(LC_ENCRYPTION_INFO_64, 0x0000002Cu, |
70 | encryption_info_command_64) |
71 | HANDLE_LOAD_COMMAND(LC_LINKER_OPTION, 0x0000002Du, linker_option_command) |
72 | HANDLE_LOAD_COMMAND(LC_LINKER_OPTIMIZATION_HINT, 0x0000002Eu, linkedit_data_command) |
73 | HANDLE_LOAD_COMMAND(LC_VERSION_MIN_TVOS, 0x0000002Fu, version_min_command) |
74 | HANDLE_LOAD_COMMAND(LC_VERSION_MIN_WATCHOS, 0x00000030u, version_min_command) |
75 | HANDLE_LOAD_COMMAND(LC_NOTE, 0x00000031u, note_command) |
76 | HANDLE_LOAD_COMMAND(LC_BUILD_VERSION, 0x00000032u, build_version_command) |
77 | HANDLE_LOAD_COMMAND(LC_DYLD_EXPORTS_TRIE, 0x80000033u, linkedit_data_command) |
78 | HANDLE_LOAD_COMMAND(LC_DYLD_CHAINED_FIXUPS, 0x80000034u, linkedit_data_command) |
79 | HANDLE_LOAD_COMMAND(LC_FILESET_ENTRY, 0x80000035u, fileset_entry_command) |
80 | HANDLE_LOAD_COMMAND(LC_ATOM_INFO, 0x00000036u, linkedit_data_command) |
81 | |
82 | #endif |
83 | |
84 | #ifdef LOAD_COMMAND_STRUCT |
85 | |
86 | LOAD_COMMAND_STRUCT(dyld_info_command) |
87 | LOAD_COMMAND_STRUCT(dylib_command) |
88 | LOAD_COMMAND_STRUCT(dylinker_command) |
89 | LOAD_COMMAND_STRUCT(dysymtab_command) |
90 | LOAD_COMMAND_STRUCT(encryption_info_command) |
91 | LOAD_COMMAND_STRUCT(encryption_info_command_64) |
92 | LOAD_COMMAND_STRUCT(entry_point_command) |
93 | LOAD_COMMAND_STRUCT(fvmfile_command) |
94 | LOAD_COMMAND_STRUCT(fvmlib_command) |
95 | LOAD_COMMAND_STRUCT(ident_command) |
96 | LOAD_COMMAND_STRUCT(linkedit_data_command) |
97 | LOAD_COMMAND_STRUCT(linker_option_command) |
98 | LOAD_COMMAND_STRUCT(load_command) |
99 | LOAD_COMMAND_STRUCT(prebind_cksum_command) |
100 | LOAD_COMMAND_STRUCT(prebound_dylib_command) |
101 | LOAD_COMMAND_STRUCT(routines_command) |
102 | LOAD_COMMAND_STRUCT(routines_command_64) |
103 | LOAD_COMMAND_STRUCT(rpath_command) |
104 | LOAD_COMMAND_STRUCT(segment_command) |
105 | LOAD_COMMAND_STRUCT(segment_command_64) |
106 | LOAD_COMMAND_STRUCT(source_version_command) |
107 | LOAD_COMMAND_STRUCT(sub_client_command) |
108 | LOAD_COMMAND_STRUCT(sub_framework_command) |
109 | LOAD_COMMAND_STRUCT(sub_library_command) |
110 | LOAD_COMMAND_STRUCT(sub_umbrella_command) |
111 | LOAD_COMMAND_STRUCT(symseg_command) |
112 | LOAD_COMMAND_STRUCT(symtab_command) |
113 | LOAD_COMMAND_STRUCT(thread_command) |
114 | LOAD_COMMAND_STRUCT(twolevel_hints_command) |
115 | LOAD_COMMAND_STRUCT(uuid_command) |
116 | LOAD_COMMAND_STRUCT(version_min_command) |
117 | LOAD_COMMAND_STRUCT(note_command) |
118 | LOAD_COMMAND_STRUCT(build_version_command) |
119 | LOAD_COMMAND_STRUCT(fileset_entry_command) |
120 | |
121 | #endif |
122 | |
123 | #ifdef PLATFORM |
124 | // PLATFORM(platform, id, name, build_name, target, tapi_target, marketing) |
125 | PLATFORM(UNKNOWN, 0, unknown, unknown, unknown, unknown, unknown) |
126 | PLATFORM(MACOS, 1, macos, macos, macos, macos, macOS) |
127 | PLATFORM(IOS, 2, ios, ios, ios, ios, iOS) |
128 | PLATFORM(TVOS, 3, tvos, tvos, tvos, tvos, tvOS) |
129 | PLATFORM(WATCHOS, 4, watchos, watchos, watchos, watchos, watchOS) |
130 | PLATFORM(BRIDGEOS, 5, bridgeos, bridgeos, bridgeos, bridgeos, bridgeOS) |
131 | PLATFORM(MACCATALYST, 6, macCatalyst, macCatalyst, ios-macabi, maccatalyst, macCatalyst) |
132 | PLATFORM(IOSSIMULATOR, 7, iossimulator, iossimulator, ios-simulator, ios-simulator, iOS Simulator) |
133 | PLATFORM(TVOSSIMULATOR, 8, tvossimulator, tvossimulator, tvos-simulator, tvos-simulator, tvOS Simulator) |
134 | PLATFORM(WATCHOSSIMULATOR, 9, watchossimulator, watchossimulator, watchos-simulator, watchos-simulator, watchOS Simulator) |
135 | PLATFORM(DRIVERKIT, 10, driverkit, driverkit, driverkit, driverkit, DriverKit) |
136 | PLATFORM(XROS, 11, xros, xros, xros, xros, xrOS) |
137 | PLATFORM(XROS_SIMULATOR, 12, xrsimulator, xrsimulator, xrsimulator, xros-simulator, xrOS Simulator) |
138 | #endif |
139 | |
140 | #undef HANDLE_LOAD_COMMAND |
141 | #undef LOAD_COMMAND_STRUCT |
142 | #undef PLATFORM |
143 | |