UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
syms_mach.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3#ifndef SYMS_MACH_H
4#define SYMS_MACH_H
5
6/*
7** Reference materials:
8** machine.h https://opensource.apple.com/source/xnu/xnu-4570.41.2/osfmk/mach/machine.h.auto.html
9** loader.h https://opensource.apple.com/source/xnu/xnu-4570.71.2/EXTERNAL_HEADERS/mach-o/loader.h.auto.html
10** nlist.h https://opensource.apple.com/source/xnu/xnu-201/EXTERNAL_HEADERS/mach-o/nlist.h.auto.html
11** stab.h https://opensource.apple.com/source/xnu/xnu-4903.241.1/EXTERNAL_HEADERS/mach-o/stab.h.auto.html
12*/
13
15//~ NOTE(allen): Constants from machine.h
16
17#define SYMS_MACH_CPU_ABI64 0x01000000
18#define SYMS_MACH_CPU_ABI64_MAS 0xff000000
19
20#define SYMS_MACH_CPU_SUBTYPE_MASK 0xff000000
21#define SYMS_MACH_CPU_SUBTYPE_LIB64 0x80000000
22
24//~ NOTE(allen): Types & Constants from loader.h
25
27
28//- magic numbers
29#define SYMS_MACH_MAGIC_32 0xFEEDFACE
30#define SYMS_MACH_CIGAM_32 0xCEFAEDFE
31
32#define SYMS_MACH_MAGIC_64 0xFEEDFACF
33#define SYMS_MACH_CIGAM_64 0xCFFAEDFE
34
35#define SYMS_MACH_FAT_MAGIC 0xCAFEBABE
36#define SYMS_MACH_FAT_CIGAM 0xBEBAFECA
37
38#define SYMS_MACH_IS_HEADER_32(x) ((x) == SYMS_MACH_MAGIC_32 || (x) == SYMS_MACH_CIGAM_32)
39#define SYMS_MACH_IS_HEADER_64(x) ((x) == SYMS_MACH_MAGIC_64 || (x) == SYMS_MACH_CIGAM_64)
40#define SYMS_MACH_HEADER_IS_SWAPPED(x) ((x) == SYMS_MACH_CIGAM_64 || (x) == SYMS_MACH_CIGAM_32)
41#define SYMS_MACH_IS_FAT(x) ((x) == SYMS_MACH_FAT_MAGIC || (x) == SYMS_MACH_FAT_CIGAM)
42#define SYMS_MACH_FAT_IS_SWAPPED(x) ((x) == SYMS_MACH_FAT_CIGAM)
43
44//- types
45
46#define SYMS_MACH_VERSION_NIBBLE_A(x) (((x) & 0xFFFF0000) >> 16)
47#define SYMS_MACH_VERSION_NIBBLE_B(x) (((x) & 0x0000FF00) >> 8)
48#define SYMS_MACH_VERSION_NIBBLE_C(x) (((x) & 0x000000FF) >> 0)
49
51//~ NOTE(allen): Generated
52
54
56//~ NOTE(allen): Types & Constants from nlist.h
57
58#define SYMS_MACH_NLIST_STAB(x) ((x) & 0xE0)
59#define SYMS_MACH_NLIST_PEXT(x) ((x) & 0x10)
60#define SYMS_MACH_NLIST_TYPE(x) ((x) & 0x0E)
61#define SYMS_MACH_NLIST_EXT(x) ((x) & 0x01)
62
64//~ NOTE(allen): MACH Format Functions
65
67
72
74
75#endif // SYMS_MACH_H
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
char * dst
Definition lz4.h:735
Definition syms_meta_mach.h:463
Definition syms_meta_mach.h:472
Definition syms_meta_mach.h:566
Definition syms_meta_mach.h:573
Definition syms_meta_mach.h:506
Definition syms_meta_mach.h:519
Definition syms_meta_mach.h:482
Definition syms_meta_mach.h:494
#define SYMS_API
Definition syms_base.h:29
#define SYMS_C_LINKAGE_BEGIN
Definition syms_base.h:37
#define SYMS_C_LINKAGE_END
Definition syms_base.h:38
int32_t SYMS_S32
Definition syms_crt_overrides.h:34
SYMS_C_LINKAGE_BEGIN SYMS_API void syms_mach_header64_from_header32(SYMS_MachHeader64 *dst, SYMS_MachHeader32 *header32)
Definition syms_mach.c:15
SYMS_S32 SYMS_MachVMProt
Definition syms_mach.h:26
SYMS_API void syms_mach_segment64_from_segment32(SYMS_MachSegmentCommand64 *dst, SYMS_MachSegmentCommand32 *seg32)
Definition syms_mach.c:36
SYMS_API void syms_mach_nlist64_from_nlist32(SYMS_MachNList64 *dst, SYMS_MachNList32 *nlist32)
Definition syms_mach.c:27
SYMS_API void syms_mach_section64_from_section32(SYMS_MachSection64 *dst, SYMS_MachSection32 *sect32)
Definition syms_mach.c:51