LIEF: Library to Instrument Executable Formats Version 0.15.1
Loading...
Searching...
No Matches
MachO/undef.h
Go to the documentation of this file.
1/* Copyright 2017 - 2024 R. Thomas
2 * Copyright 2017 - 2024 Quarkslab
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16#ifndef LIEF_MACHO_UNDEF_H
17#define LIEF_MACHO_UNDEF_H
18
19#ifdef MH_MAGIC
20#pragma message("LIEF will disable #define enums. Please use LIEF_MACHO_XXXX or LIEF::MACHO::XXXX instead!")
21#endif
22
23#undef MH_MAGIC
24#undef MH_CIGAM
25#undef MH_MAGIC_64
26#undef MH_CIGAM_64
27#undef FAT_MAGIC
28#undef FAT_CIGAM
29
30#undef MH_OBJECT
31#undef MH_EXECUTE
32#undef MH_FVMLIB
33#undef MH_CORE
34#undef MH_PRELOAD
35#undef MH_DYLIB
36#undef MH_DYLINKER
37#undef MH_BUNDLE
38#undef MH_DYLIB_STUB
39#undef MH_DSYM
40#undef MH_KEXT_BUNDLE
41
42
43#undef MH_NOUNDEFS
44#undef MH_INCRLINK
45#undef MH_DYLDLINK
46#undef MH_BINDATLOAD
47#undef MH_PREBOUND
48#undef MH_SPLIT_SEGS
49#undef MH_LAZY_INIT
50#undef MH_TWOLEVEL
51#undef MH_FORCE_FLAT
52#undef MH_NOMULTIDEFS
53#undef MH_NOFIXPREBINDING
54#undef MH_PREBINDABLE
55#undef MH_ALLMODSBOUND
56#undef MH_SUBSECTIONS_VIA_SYMBOLS
57#undef MH_CANONICAL
58#undef MH_WEAK_DEFINES
59#undef MH_BINDS_TO_WEAK
60#undef MH_ALLOW_STACK_EXECUTION
61#undef MH_ROOT_SAFE
62#undef MH_SETUID_SAFE
63#undef MH_NO_REEXPORTED_DYLIBS
64#undef MH_PIE
65#undef MH_DEAD_STRIPPABLE_DYLIB
66#undef MH_HAS_TLV_DESCRIPTORS
67#undef MH_NO_HEAP_EXECUTION
68#undef MH_APP_EXTENSION_SAFE
69
70
71#undef LC_SEGMENT
72#undef LC_SYMTAB
73#undef LC_SYMSEG
74#undef LC_THREAD
75#undef LC_UNIXTHREAD
76#undef LC_LOADFVMLIB
77#undef LC_IDFVMLIB
78#undef LC_IDENT
79#undef LC_FVMFILE
80#undef LC_PREPAGE
81#undef LC_DYSYMTAB
82#undef LC_LOAD_DYLIB
83#undef LC_ID_DYLIB
84#undef LC_LOAD_DYLINKER
85#undef LC_ID_DYLINKER
86#undef LC_PREBOUND_DYLIB
87#undef LC_ROUTINES
88#undef LC_SUB_FRAMEWORK
89#undef LC_SUB_UMBRELLA
90#undef LC_SUB_CLIENT
91#undef LC_SUB_LIBRARY
92#undef LC_TWOLEVEL_HINTS
93#undef LC_PREBIND_CKSUM
94#undef LC_LOAD_WEAK_DYLIB
95#undef LC_SEGMENT_64
96#undef LC_ROUTINES_64
97#undef LC_UUID
98#undef LC_RPATH
99#undef LC_CODE_SIGNATURE
100#undef LC_SEGMENT_SPLIT_INFO
101#undef LC_REEXPORT_DYLIB
102#undef LC_LAZY_LOAD_DYLIB
103#undef LC_ENCRYPTION_INFO
104#undef LC_DYLD_INFO
105#undef LC_DYLD_INFO_ONLY
106#undef LC_LOAD_UPWARD_DYLIB
107#undef LC_VERSION_MIN_MACOSX
108#undef LC_VERSION_MIN_IPHONEOS
109#undef LC_FUNCTION_STARTS
110#undef LC_DYLD_ENVIRONMENT
111#undef LC_MAIN
112#undef LC_DATA_IN_CODE
113#undef LC_SOURCE_VERSION
114#undef LC_DYLIB_CODE_SIGN_DRS
115#undef LC_ENCRYPTION_INFO_64
116#undef LC_LINKER_OPTION
117#undef LC_LINKER_OPTIMIZATION_HINT
118#undef LC_VERSION_MIN_TVOS
119#undef LC_VERSION_MIN_WATCHOS
120
121
122#undef SG_HIGHVM
123#undef SG_FVMLIB
124#undef SG_NORELOC
125#undef SG_PROTECTED_VERSION_1
126
127
128#undef SECTION_TYPE_MASK
129#undef SECTION_FLAGS_MASK
130#undef SECTION_FLAGS_USR_MASK
131#undef SECTION_FLAGS_SYS_MASK
132
133
134#undef S_REGULAR
135#undef S_ZEROFILL
136#undef S_CSTRING_LITERALS
137#undef S_4BYTE_LITERALS
138#undef S_8BYTE_LITERALS
139#undef S_LITERAL_POINTERS
140#undef S_NON_LAZY_SYMBOL_POINTERS
141#undef S_LAZY_SYMBOL_POINTERS
142#undef S_SYMBOL_STUBS
143#undef S_MOD_INIT_FUNC_POINTERS
144#undef S_MOD_TERM_FUNC_POINTERS
145#undef S_COALESCED
146#undef S_GB_ZEROFILL
147#undef S_INTERPOSING
148#undef S_16BYTE_LITERALS
149#undef S_DTRACE_DOF
150#undef S_LAZY_DYLIB_SYMBOL_POINTERS
151#undef S_THREAD_LOCAL_REGULAR
152#undef S_THREAD_LOCAL_ZEROFILL
153#undef S_THREAD_LOCAL_VARIABLES
154#undef S_THREAD_LOCAL_VARIABLE_POINTERS
155#undef S_THREAD_LOCAL_INIT_FUNCTION_POINTERS
156
157#undef LAST_KNOWN_SECTION_TYPE
158
159
160#undef S_ATTR_PURE_INSTRUCTIONS
161#undef S_ATTR_NO_TOC
162#undef S_ATTR_STRIP_STATIC_SYMS
163#undef S_ATTR_NO_DEAD_STRIP
164#undef S_ATTR_LIVE_SUPPORT
165#undef S_ATTR_SELF_MODIFYING_CODE
166#undef S_ATTR_DEBUG
167
168#undef S_ATTR_SOME_INSTRUCTIONS
169#undef S_ATTR_EXT_RELOC
170#undef S_ATTR_LOC_RELOC
171
172#undef INDIRECT_SYMBOL_LOCAL
173#undef INDIRECT_SYMBOL_ABS
174
175
176#undef DICE_KIND_DATA
177#undef DICE_KIND_JUMP_TABLE8
178#undef DICE_KIND_JUMP_TABLE16
179#undef DICE_KIND_JUMP_TABLE32
180#undef DICE_KIND_ABS_JUMP_TABLE32
181
182
183#undef REBASE_TYPE_POINTER
184#undef REBASE_TYPE_TEXT_ABSOLUTE32
185#undef REBASE_TYPE_TEXT_PCREL32
186
187
188#undef REBASE_OPCODE_MASK
189#undef REBASE_IMMEDIATE_MASK
190
191
192#undef REBASE_OPCODE_DONE
193#undef REBASE_OPCODE_SET_TYPE_IMM
194#undef REBASE_OPCODE_SET_SEGMENT_AND_OFFSET_ULEB
195#undef REBASE_OPCODE_ADD_ADDR_ULEB
196#undef REBASE_OPCODE_ADD_ADDR_IMM_SCALED
197#undef REBASE_OPCODE_DO_REBASE_IMM_TIMES
198#undef REBASE_OPCODE_DO_REBASE_ULEB_TIMES
199#undef REBASE_OPCODE_DO_REBASE_ADD_ADDR_ULEB
200#undef REBASE_OPCODE_DO_REBASE_ULEB_TIMES_SKIPPING_ULEB
201
202
203#undef BIND_CLASS_WEAK
204#undef BIND_CLASS_LAZY
205#undef BIND_CLASS_STANDARD
206
207
208#undef BIND_TYPE_POINTER
209#undef BIND_TYPE_TEXT_ABSOLUTE32
210#undef BIND_TYPE_TEXT_PCREL32
211
212
213#undef BIND_SPECIAL_DYLIB_SELF
214#undef BIND_SPECIAL_DYLIB_MAIN_EXECUTABLE
215#undef BIND_SPECIAL_DYLIB_FLAT_LOOKUP
216
217
218#undef BIND_SYMBOL_FLAGS_WEAK_IMPORT
219#undef BIND_SYMBOL_FLAGS_NON_WEAK_DEFINITION
220
221#undef BIND_OPCODE_MASK
222#undef BIND_IMMEDIATE_MASK
223
224
225#undef BIND_OPCODE_DONE
226#undef BIND_OPCODE_SET_DYLIB_ORDINAL_IMM
227#undef BIND_OPCODE_SET_DYLIB_ORDINAL_ULEB
228#undef BIND_OPCODE_SET_DYLIB_SPECIAL_IMM
229#undef BIND_OPCODE_SET_SYMBOL_TRAILING_FLAGS_IMM
230#undef BIND_OPCODE_SET_TYPE_IMM
231#undef BIND_OPCODE_SET_ADDEND_SLEB
232#undef BIND_OPCODE_SET_SEGMENT_AND_OFFSET_ULEB
233#undef BIND_OPCODE_ADD_ADDR_ULEB
234#undef BIND_OPCODE_DO_BIND
235#undef BIND_OPCODE_DO_BIND_ADD_ADDR_ULEB
236#undef BIND_OPCODE_DO_BIND_ADD_ADDR_IMM_SCALED
237#undef BIND_OPCODE_DO_BIND_ULEB_TIMES_SKIPPING_ULEB
238
239
240#undef EXPORT_SYMBOL_FLAGS_KIND_MASK
241#undef EXPORT_SYMBOL_FLAGS_WEAK_DEFINITION
242#undef EXPORT_SYMBOL_FLAGS_REEXPORT
243#undef EXPORT_SYMBOL_FLAGS_STUB_AND_RESOLVER
244
245
246#undef EXPORT_SYMBOL_FLAGS_KIND_REGULAR
247#undef EXPORT_SYMBOL_FLAGS_KIND_THREAD_LOCAL
248#undef EXPORT_SYMBOL_FLAGS_KIND_ABSOLUTE
249
250
251#undef N_STAB
252#undef N_PEXT
253#undef N_TYPE
254#undef N_EXT
255
256
257#undef N_UNDF
258#undef N_ABS
259#undef N_SECT
260#undef N_PBUD
261#undef N_INDR
262
263
264#undef NO_SECT
265#undef MAX_SECT
266
267
268#undef REFERENCE_TYPE
269#undef REFERENCE_FLAG_UNDEFINED_NON_LAZY
270#undef REFERENCE_FLAG_UNDEFINED_LAZY
271#undef REFERENCE_FLAG_DEFINED
272#undef REFERENCE_FLAG_PRIVATE_DEFINED
273#undef REFERENCE_FLAG_PRIVATE_UNDEFINED_NON_LAZY
274#undef REFERENCE_FLAG_PRIVATE_UNDEFINED_LAZY
275
276#undef N_ARM_THUMB_DEF
277#undef REFERENCED_DYNAMICALLY
278#undef N_NO_DEAD_STRIP
279#undef N_WEAK_REF
280#undef N_WEAK_DEF
281#undef N_SYMBOL_RESOLVER
282#undef N_ALT_ENTRY
283
284#undef SELF_LIBRARY_ORDINAL
285#undef MAX_LIBRARY_ORDINAL
286#undef DYNAMIC_LOOKUP_ORDINAL
287#undef EXECUTABLE_ORDINAL
288
289
290#undef N_GSYM
291#undef N_FNAME
292#undef N_FUN
293#undef N_STSYM
294#undef N_LCSYM
295#undef N_BNSYM
296#undef N_PC
297#undef N_AST
298#undef N_OPT
299#undef N_RSYM
300#undef N_SLINE
301#undef N_ENSYM
302#undef N_SSYM
303#undef N_SO
304#undef N_OSO
305#undef N_LSYM
306#undef N_BINCL
307#undef N_SOL
308#undef N_PARAMS
309#undef N_VERSION
310#undef N_OLEVEL
311#undef N_PSYM
312#undef N_EINCL
313#undef N_ENTRY
314#undef N_LBRAC
315#undef N_EXCL
316#undef N_RBRAC
317#undef N_BCOMM
318#undef N_ECOMM
319#undef N_ECOML
320#undef N_LENG
321
322
323#undef R_ABS
324
325#undef R_SCATTERED
326
327
328#undef GENERIC_RELOC_VANILLA
329#undef GENERIC_RELOC_PAIR
330#undef GENERIC_RELOC_SECTDIFF
331#undef GENERIC_RELOC_PB_LA_PTR
332#undef GENERIC_RELOC_LOCAL_SECTDIFF
333#undef GENERIC_RELOC_TLV
334
335
336#undef X86_64_RELOC_UNSIGNED
337#undef X86_64_RELOC_SIGNED
338#undef X86_64_RELOC_BRANCH
339#undef X86_64_RELOC_GOT_LOAD
340#undef X86_64_RELOC_GOT
341#undef X86_64_RELOC_SUBTRACTOR
342#undef X86_64_RELOC_SIGNED_1
343#undef X86_64_RELOC_SIGNED_2
344#undef X86_64_RELOC_SIGNED_4
345#undef X86_64_RELOC_TLV
346
347
348#undef PPC_RELOC_VANILLA
349#undef PPC_RELOC_PAIR
350#undef PPC_RELOC_BR14
351#undef PPC_RELOC_BR24
352#undef PPC_RELOC_HI16
353#undef PPC_RELOC_LO16
354#undef PPC_RELOC_HA16
355#undef PPC_RELOC_LO14
356#undef PPC_RELOC_SECTDIFF
357#undef PPC_RELOC_PB_LA_PTR
358#undef PPC_RELOC_HI16_SECTDIFF
359#undef PPC_RELOC_LO16_SECTDIFF
360#undef PPC_RELOC_HA16_SECTDIFF
361#undef PPC_RELOC_JBSR
362#undef PPC_RELOC_LO14_SECTDIFF
363#undef PPC_RELOC_LOCAL_SECTDIFF
364
365#undef ARM_RELOC_VANILLA
366#undef ARM_RELOC_PAIR
367#undef ARM_RELOC_SECTDIFF
368#undef ARM_RELOC_LOCAL_SECTDIFF
369#undef ARM_RELOC_PB_LA_PTR
370#undef ARM_RELOC_BR24
371#undef ARM_THUMB_RELOC_BR22
372#undef ARM_THUMB_32BIT_BRANCH
373#undef ARM_RELOC_HALF
374#undef ARM_RELOC_HALF_SECTDIFF
375
376#undef ARM64_RELOC_UNSIGNED
377#undef ARM64_RELOC_SUBTRACTOR
378#undef ARM64_RELOC_BRANCH26
379#undef ARM64_RELOC_PAGE21
380#undef ARM64_RELOC_PAGEOFF12
381#undef ARM64_RELOC_GOT_LOAD_PAGE21
382#undef ARM64_RELOC_GOT_LOAD_PAGEOFF12
383#undef ARM64_RELOC_POINTER_TO_GOT
384#undef ARM64_RELOC_TLVP_LOAD_PAGE21
385#undef ARM64_RELOC_TLVP_LOAD_PAGEOFF12
386#undef ARM64_RELOC_ADDEND
387
388
389#undef VM_PROT_READ
390#undef VM_PROT_WRITE
391#undef VM_PROT_EXECUTE
392
393#undef CPU_ARCH_MASK
394#undef CPU_ARCH_ABI64
395
396
397#undef CPU_TYPE_ANY
398#undef CPU_TYPE_X86
399#undef CPU_TYPE_I386
400#undef CPU_TYPE_X86_64
401#undef CPU_TYPE_MC98000
402#undef CPU_TYPE_ARM
403#undef CPU_TYPE_ARM64
404#undef CPU_TYPE_SPARC
405#undef CPU_TYPE_POWERPC
406#undef CPU_TYPE_POWERPC64
407
408
409#undef CPU_SUBTYPE_MASK
410#undef CPU_SUBTYPE_LIB64
411
412#undef CPU_SUBTYPE_MULTIPLE
413
414
415#undef CPU_SUBTYPE_I386_ALL
416#undef CPU_SUBTYPE_386
417#undef CPU_SUBTYPE_486
418#undef CPU_SUBTYPE_486SX
419#undef CPU_SUBTYPE_586
420#undef CPU_SUBTYPE_PENT
421#undef CPU_SUBTYPE_PENTPRO
422#undef CPU_SUBTYPE_PENTII_M3
423#undef CPU_SUBTYPE_PENTII_M5
424#undef CPU_SUBTYPE_CELERON
425#undef CPU_SUBTYPE_CELERON_MOBILE
426#undef CPU_SUBTYPE_PENTIUM_3
427#undef CPU_SUBTYPE_PENTIUM_3_M
428#undef CPU_SUBTYPE_PENTIUM_3_XEON
429#undef CPU_SUBTYPE_PENTIUM_M
430#undef CPU_SUBTYPE_PENTIUM_4
431#undef CPU_SUBTYPE_PENTIUM_4_M
432#undef CPU_SUBTYPE_ITANIUM
433#undef CPU_SUBTYPE_ITANIUM_2
434#undef CPU_SUBTYPE_XEON
435#undef CPU_SUBTYPE_XEON_MP
436
437#undef CPU_SUBTYPE_X86_ALL
438#undef CPU_SUBTYPE_X86_64_ALL
439#undef CPU_SUBTYPE_X86_ARCH1
440#undef CPU_SUBTYPE_X86_64_H
441
442#undef CPU_SUBTYPE_INTEL_FAMILY_MAX
443#undef CPU_SUBTYPE_INTEL_MODEL_ALL
444
445
446#undef CPU_SUBTYPE_ARM_ALL
447#undef CPU_SUBTYPE_ARM_V4T
448#undef CPU_SUBTYPE_ARM_V6
449#undef CPU_SUBTYPE_ARM_V5
450#undef CPU_SUBTYPE_ARM_V5TEJ
451#undef CPU_SUBTYPE_ARM_XSCALE
452#undef CPU_SUBTYPE_ARM_V7
453#undef CPU_SUBTYPE_ARM_V7S
454#undef CPU_SUBTYPE_ARM_V7K
455#undef CPU_SUBTYPE_ARM_V6M
456#undef CPU_SUBTYPE_ARM_V7M
457#undef CPU_SUBTYPE_ARM_V7EM
458
459#undef CPU_SUBTYPE_ARM64_ALL
460
461#undef CPU_SUBTYPE_SPARC_ALL
462
463#undef CPU_SUBTYPE_POWERPC_ALL
464#undef CPU_SUBTYPE_POWERPC_601
465#undef CPU_SUBTYPE_POWERPC_602
466#undef CPU_SUBTYPE_POWERPC_603
467#undef CPU_SUBTYPE_POWERPC_603e
468#undef CPU_SUBTYPE_POWERPC_603ev
469#undef CPU_SUBTYPE_POWERPC_604
470#undef CPU_SUBTYPE_POWERPC_604e
471#undef CPU_SUBTYPE_POWERPC_620
472#undef CPU_SUBTYPE_POWERPC_750
473#undef CPU_SUBTYPE_POWERPC_7400
474#undef CPU_SUBTYPE_POWERPC_7450
475#undef CPU_SUBTYPE_POWERPC_970
476
477#undef CPU_SUBTYPE_MC980000_ALL
478#undef CPU_SUBTYPE_MC98601
479
480
481#endif