# Functions
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
NewCustomSectionReader returns a CustomSectionReader that reads from r starting at offset off and stops with EOF after n bytes.
NewWriteAtBuffer creates a WriteAtBuffer with an internal buffer provided by buf.
******
HELPERS
*******
*/.
No description provided by the author
No description provided by the author
No description provided by the author
# Constants
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
* The N_ALT_ENTRY bit of the n_desc field indicates that the
* symbol is pinned to the previous content.
PLATFORM_ANY.
No description provided by the author
No description provided by the author
pre-armv8 */.
API */.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
arm flavors
.
No description provided by the author
ARM_THREAD_STATE_LAST 8 /* legacy */.
No description provided by the author
No description provided by the author
symbol is a Thumb function (ARM) */.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
The following are used to encode binding information */.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
section with only 16 byte literals */.
section with only 4 byte literals */.
section with only 8 byte literals */.
No description provided by the author
section contains symbols that are to be coalesced */.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
compatibility */.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
* When selecting a slice, ANY will pick the slice with the best
* grading for the selected cpu_type_t, unlike the "ALL" subtypes,
* which are the slices that can run on any hardware for that cpu type.
ARM64_32 subtypes.
ARM64_32 subtypes.
ARM64 subtypes.
ARM64 subtypes.
No description provided by the author
No description provided by the author
CPU subtype capability flags for ptrauth on arm64e platforms, take 2 */.
CPU subtype capability flags for ptrauth on arm64e platforms */.
ARM64 subtypes.
ARM subtypes.
ARM subtypes.
ARM subtypes.
ARM subtypes.
ARM subtypes.
ARM subtypes.
ARM subtypes.
ARM subtypes.
ARM subtypes.
ARM subtypes.
ARM subtypes.
ARM subtypes.
ARM subtypes.
ARM subtypes.
mask for feature flags */.
compat.
HPPA subtypes for Hewlett-Packard HP-PA family of risc processors.
HPPA subtypes for Hewlett-Packard HP-PA family of risc processors.
I386 subtypes.
I386 subtypes.
I386 subtypes.
I386 subtypes.
I386 subtypes.
I386 subtypes.
I386 subtypes.
I386 subtypes.
I386 subtypes.
I386 subtypes.
I386 subtypes.
I386 subtypes.
I386 subtypes.
I386 subtypes.
I386 subtypes.
I386 subtypes.
I386 subtypes.
I386 subtypes.
I386 subtypes.
I386 subtypes.
I386 subtypes.
I860 subtypes.
I860 subtypes.
64 bit libraries */.
mask for cpu subtype */.
680x0 subtypes.
680x0 subtypes.
680x0 subtypes.
680x0 subtypes.
MC88000 subtypes.
MC88000 subtypes.
MC88000 subtypes.
MC98000 (PowerPC) subtypes.
MC98000 (PowerPC) subtypes.
Mips subtypes.
Mips subtypes.
pmax.
Mips subtypes.
Mips subtypes.
Mips subtypes.
Mips subtypes.
3max.
PowerPC subtypes.
PowerPC subtypes.
PowerPC subtypes.
PowerPC subtypes.
PowerPC subtypes.
PowerPC subtypes.
PowerPC subtypes.
PowerPC subtypes.
PowerPC subtypes.
PowerPC subtypes.
PowerPC subtypes.
PowerPC subtypes.
PowerPC subtypes.
SPARC subtypes.
VAX subtypes.
VAX subtypes.
VAX subtypes.
VAX subtypes.
VAX subtypes.
VAX subtypes.
VAX subtypes.
VAX subtypes.
VAX subtypes.
VAX subtypes.
VAX subtypes.
VAX subtypes.
VAX subtypes.
X86 subtypes.
X86 subtypes.
X86 subtypes.
X86 subtypes.
No description provided by the author
No description provided by the author
section with only literal C strings*/.
No description provided by the author
a debug section */.
symbol is discarded */.
section contains DTrace Object Format */.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
* The following are used on the flags byte of a terminal node
* in the export information.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
section has external relocation entries */.
No description provided by the author
No description provided by the author
No description provided by the author
this segment is the VM that is allocated by
a fixed VM library, for overlap checking in
the link editor */.
zero fill on demand section (that can be larger than 4 gigabytes) */.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
the file contents for this segment is for
the high part of the VM space, the low part
is zero filled (for stacks in core files) */.
No description provided by the author
No description provided by the author
No description provided by the author
TODO: use this ?.
32-bit offsets to initializers */.
section with only pairs of function pointers for interposing */.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
section with only lazy symbol pointers to lazy loaded dylibs */.
No description provided by the author
section with only lazy symbol pointers */.
used with linkedit_data_command */.
build for platform min OS version.
local of code signature.
table of non-instructions in __text.
used with linkedit_data_command.
string for dyld to treat like environment variable.
used with linkedit_data_command, payload is trie.
compressed dyld information.
compressed dyld information only.
Code signing DRs copied from linked dylibs.
dynamic link-edit symbol table info.
encrypted segment information.
64-bit encrypted segment information.
used with fileset_entry_command */.
compressed table of function start addresses.
used with linkedit_data_command */.
used with linkedit_data_command */.
fixed VM file inclusion (internal use).
id dylib command.
id dylinker command (not load dylinker command).
object identification info (obsolete).
fixed VM shared library identification.
delay load of dylib until first use.
optimization hints in MH_OBJECT files.
linker options in MH_OBJECT files.
load dylib command.
load a dynamic linker.
load upward dylib.
* load a dynamically linked shared library that is allowed to be missing
* (all symbols are weak imported).
load a specified fixed VM shared library.
replacement for LC_UNIXTHREAD.
arbitrary data included within a Mach-O file.
prebind checksum.
modules prebound for a dynamically linked shared library.
prepage command (internal use).
load and re-export dylib.
No description provided by the author
image routines.
64-bit image routines.
runpath additions.
segment of this file to be mapped.
64-bit segment of this file to be mapped.
local of info to split segments.
No description provided by the author
* sep load commands
*/.
No description provided by the author
No description provided by the author
source version used to build binary.
sub client.
sub framework.
sub library.
sub umbrella.
link-edit gdb symbol table info (obsolete).
link-edit stab symbol table info.
target triple used to compile */.
thread.
two-level namespace lookup hints.
thread+stack.
the uuid.
build for iPhoneOS min OS version.
build for MacOSX min OS version.
build for AppleTV min OS version.
build for Watch min OS version.
section with only pointers to literals */.
blocks are live if they reference live blocks */.
section has local relocation entries */.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
1 thru 255 inclusive */.
values for gpu tools (1024 to 1048) */.
No description provided by the author
dynamically bound bundle file */.
core file */.
companion file with only debug sections */.
dynamically bound shared library */.
shared library stub for static linking only, no section contents */.
dynamic link editor */.
demand paged executable file */.
a file composed of other Mach-Os to be run in the same userspace sharing a single linkedit.
fixed VM shared library file */.
gpu support functions */.
gpu program */.
x86_64 kexts */.
relocatable object file */.
preloaded executable file */.
section with only function pointers for initialization*/.
section with only function pointers for termination */.
absolute, n_sect == NO_SECT */.
AST file path: name,,NO_SECT,0,0 */.
begin common: name,,NO_SECT,0,0 */.
include file beginning: name,,NO_SECT,0,sum */.
begin nsect sym: 0,,n_sect,0,address */.
* The N_COLD_FUNC bit of the n_desc field indicates that the symbol is used
* infrequently and the linker should order it towards the end of the section.
end common (local name): 0,,n_sect,0,address */.
end common: name,,n_sect,0,0 */.
include file end: name,,NO_SECT,0,0 */.
end nsect sym: 0,,n_sect,0,address */.
alternate entry: name,,n_sect,linenumber,address */.
deleted include file: name,,NO_SECT,0,sum */.
external symbol bit, set for external symbols */.
procedure name (f77 kludge): name,,NO_SECT,0,0 */.
procedure: name,,n_sect,linenumber,address */.
global symbol: name,,NO_SECT,type,0 */.
indirect */.
left bracket: 0,,NO_SECT,nesting level,address */.
.lcomm symbol: name,,n_sect,type,address */.
second stab entry with length information */.
dynamic library file name: name,,NO_SECT,0,0 */.
local sym: name,,NO_SECT,type,offset */.
compiler -O level: name,,NO_SECT,0,0 */.
emitted with gcc2_compiled and in gcc source */.
object file name: name,,(see below),1,st_mtime */.
compiler parameters: name,,NO_SECT,0,0 */.
prebound undefined (defined in a dylib) */.
global pascal symbol: name,,NO_SECT,subtype,line */.
private external symbol bit */.
parameter: name,,NO_SECT,type,offset */.
right bracket: 0,,NO_SECT,nesting level,address */.
register sym: name,,NO_SECT,type,register */.
defined in section number n_sect */.
src line: 0,,n_sect,linenumber,address */.
source file name: name,,n_sect,0,address */.
#included file name: name,,n_sect,0,address */.
structure elt: name,,NO_SECT,type,struct_offset */.
if any of these bits set, a symbolic debugging entry */.
static symbol: name,,n_sect,type,address */.
mask for the type bits */.
undefined, n_sect == NO_SECT */.
compiler version: name,,NO_SECT,0,0 */.
No description provided by the author
symbol is not to be dead stripped */.
symbol is not in any section */.
section contains coalesced symbols that are not to be in a ranlib table of contents */.
no dead stripping */.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
section with only non-lazy symbol pointers */.
No description provided by the author
this segment has nothing that was relocated
in it and nothing relocated to it, that is
it maybe safely replaced without relocation*/.
No description provided by the author
No description provided by the author
No description provided by the author
PLATFORM_BRIDGEOS.
PLATFORM_DRIVERKIT.
PLATFORM_FIRMWARE.
PLATFORM_IOS.
PLATFORM_IOS_EXCLAVECORE.
PLATFORM_IOS_EXCLAVEKIT.
PLATFORM_IOSSIMULATOR.
PLATFORM_MACCATALYST.
PLATFORM_MACOS.
PLATFORM_MACOS_EXCLAVECORE.
PLATFORM_MACOS_EXCLAVEKIT.
PLATFORM_SEPOS.
PLATFORM_TVOS.
PLATFORM_TVOS_EXCLAVECORE.
PLATFORM_TVOS_EXCLAVEKIT.
PLATFORM_TVOSSIMULATOR.
PLATFORM_UNKNOWN.
PLATFORM_VISIONOS.
PLATFORM_WATCHOS_EXCLAVEKIT.
PLATFORM_WATCHOS_EXCLAVEKIT.
PLATFORM_VISIONOSSIMULATOR.
PLATFORM_WATCHOS.
PLATFORM_WATCHOS_EXCLAVECORE.
PLATFORM_WATCHOS_EXCLAVEKIT.
PLATFORM_WATCHOSSIMULATOR.
No description provided by the author
No description provided by the author
This segment is protected.
section contains only true machine instructions */.
This segment is made read-only after fixups */.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
The following are used to encode rebasing information */.
No description provided by the author
No description provided by the author
reference to a weak symbol */.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
types of references */.
No description provided by the author
* To simplify stripping of objects that use are used with the dynamic link
* editor, the static link editor marks the symbols defined an object that are
* referenced by a dynamicly bound object (dynamic shared libraries, bundles).
regular section */.
No description provided by the author
system setable attributes */.
User setable attributes */.
24 section attributes */.
256 section types */.
No description provided by the author
Used with i386 code stubs written on by dyld */.
No description provided by the author
No description provided by the author
section contains some machine instructions */.
No description provided by the author
ok to strip static symbols in this section in files with the MH_DYLDLINK flag */.
No description provided by the author
* The N_SYMBOL_RESOLVER bit of the n_desc field indicates that the
* that the function is actually a resolver function and should
* be called to get the address of the real function to use.
section with only symbol stubs, byte size of stub in the reserved2 field */.
functions to call to initialize TLV values */.
template of initial values for TLVs */.
pointers to TLV descriptors */.
TLV descriptors */.
template of initial values for TLVs */.
No description provided by the author
coalesed symbol is a weak definition */.
No description provided by the author
symbol is weak referenced */.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
14 and 15 are used for the internal X86_SAVED_STATE flavours */ Arrange for flavors to take sequential values, 32-bit, 64-bit, non-specific */.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
x86 flavors
.
No description provided by the author
zero fill on demand section */.
# Structs
No description provided by the author
* BuildVersionCmd contains the min OS version on which this
* binary was built to run for its platform.
No description provided by the author
CustomSectionReader implements Read, Seek, and ReadAt on a section of an underlying ReaderAt.
No description provided by the author
* DyldInfoCmd contains the file offsets and sizes of
* the new compressed form of the information dyld needs to
* load the image.
* DylibCmd a dynamically linked shared library (filetype == MH_DYLIB in the mach header)
* contains a dylib_command (cmd == LC_ID_DYLIB) to identify the library.
a module table entry */.
a 64-bit module table entry */.
a table of contents entry */.
* DylibUseCmd is an alternate encoding for: LC_LOAD_DYLIB.
* DylinkerCmd a program that uses a dynamic linker contains a dylinker_command to identify
* the name of the dynamic linker (LC_LOAD_DYLINKER).
* DysymtabCmd is the second set of the symbolic information which is used to support
* the data structures for the dynamically link editor.
* EncryptionInfo64Cmd contains the file offset and size of an
* of an encrypted segment (for use in x86_64 targets).
* EncryptionInfoCmd contains the file offset and size of an
* of an encrypted segment.
* EntryPointCmd is a replacement for thread_command.
A FileHeader represents a Mach-O file header.
No description provided by the author
FilesetEntryCmd commands describe constituent Mach-O files that are part of a fileset.
No description provided by the author
* FvmFileCmdcontains a reference to a file to be loaded at the
* specified virtual address.
* IdentCmd contains a free format string table following the
* ident_command structure.
No description provided by the author
No description provided by the author
* LinkEditDataCmd contains the offsets and sizes of a blob
* of data in the __LINKEDIT segment.
* LinkerOptionCmd contains linker options embedded in object files.
* LoadFvmLibCmd a fixed virtual shared library (filetype == MH_FVMLIB in the mach header)
* contains a fvmlib_command (cmd == LC_IDFVMLIB) to identify the library.
An Nlist is a Mach-O generic symbol table entry.
An Nlist32 is a Mach-O 32-bit symbol table entry.
An Nlist64 is a Mach-O 64-bit symbol table entry.
Note commands DataOwner = "addrable bits" */.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
* NoteCmd describe a region of arbitrary data included in a Mach-O
* file.
* PrebindCksumCmd contains the value of the original check sum for
* prebound files or zero.
* PreboundDylibCmd a program (filetype == MH_EXECUTE) that is
* prebound to its dynamic libraries has one of these for each library that
* the static linker used in prebinding.
A PrePageCmd is a fixed VM file inclusion (internal use).
No description provided by the author
A Reloc represents a Mach-O relocation.
No description provided by the author
A Routines64Cmd is a Mach-O 64-bit version of RoutinesCmd.
* RoutinesCmd contains the address of the dynamic shared library
* initialization routine and an index into the module table for the module
* that defines the routine.
* RpathCmd contains a path which at runtime should be added to
* the current run path used to find @rpath prefixed dylibs.
No description provided by the author
A Section32 is a 32-bit Mach-O section header.
A Section64 is a 64-bit Mach-O section header.
No description provided by the author
* Segment32 is a 32-bit segment load command indicates that a part of this file is to be
* mapped into the task's address space.
* Segment64 is a 64-bit segment load command indicates that a part of this file is to be
* mapped into a 64-bit task's address space.
No description provided by the author
No description provided by the author
* SourceVersionCmd is an optional load command containing
* the version of the sources used to build the binary.
* SubClientCmd for dynamically linked shared libraries that are subframework of an umbrella
* framework they can allow clients other than the umbrella framework or other
* subframeworks in the same umbrella framework.
* SubFrameworkCmd a dynamically linked shared library may be a subframework of an umbrella
* framework.
* SubLibraryCmd a dynamically linked shared library may be a sub_library of another shared
* library.
* SubUmbrellaCmd a dynamically linked shared library may be a sub_umbrella of an umbrella
* framework.
* SymsegCmd contains the offset and size of the GNU style
* symbol table information as described in the header file <symseg.h>.
* SymtabCmd contains the offsets and sizes of the link-edit 4.3BSD
* "stab" style symbol table information as described in the header files
* <nlist.h> and <stab.h>.
* TargetTripleCmd contains a string which specifies the
* target triple (e.g.
* ThreadCmd contain machine-specific data structures suitable for
* use in the thread state primitives.
No description provided by the author
* Sections of type S_THREAD_LOCAL_VARIABLES contain an array
* of tlv_descriptor structures.
* TwolevelHintsCmd contains the offset and number of hints in the
* two-level namespace lookup hints table.
* UUIDCmd contains a single 128-bit unique random number that
* identifies an object produced by the static link editor.
* VersionMinCmd contains the min OS version on which this
* binary was built to run.
No description provided by the author
A WriteAtBuffer provides a in memory buffer supporting the io.WriterAt interface Can be used with the s3manager.Downloader to download content to a buffer in memory.
# Interfaces
MachoReader is a custom io.SectionReader interface with virtual address support.
# Type aliases
No description provided by the author
No description provided by the author
No description provided by the author
A CodeSignatureCmd is a Mach-O code signature command.
A CPU is a Mach-O cpu type.
No description provided by the author
A DataInCodeCmd is a Mach-O data in code command.
No description provided by the author
A DyldChainedFixupsCmd is used with linkedit_data_command command.
A DyldEnvironmentCmd is a Mach-O string for dyld to treat like environment variable command.
A DyldExportsTrieCmd is used with linkedit_data_command, payload is trie command.
A DyldInfoOnlyCmd is a Mach-O compressed dyld information only command.
A DylibCodeSignDrsCmd is a Mach-O code signing DRs copied from linked dylibs command.
* The entries in the reference symbol table are used when loading the module
* (both by the static and dynamic link editors) and if the module is unloaded
* or replaced.
No description provided by the author
No description provided by the author
No description provided by the author
A FunctionStartsCmd is a Mach-O compressed table of function start addresses command.
A FunctionVariantFixupsCmd is used with linkedit_data_command command.
A FunctionVariantsCmd is used with linkedit_data_command command.
A HeaderFileType is the Mach-O file type, e.g.
No description provided by the author
A IDDylibCmd represents a Mach-O load dynamic library ident command.
A IDDylinkerCmd is a Mach-O dynamic linker identification command.
A IDFvmLibCmd is a Mach-O fixed VM shared library identification command.
A LazyLoadDylibCmd is a Mach-O delay load of dylib until first use command.
A LinkerOptimizationHintCmd is a Mach-O optimization hints command.
A LoadCmd is a Mach-O load command.
A LoadDylibCmd load a dynamically linked shared library.
A LoadUpwardDylibCmd is a Mach-O load upward dylibcommand.
A LoadWeakDylibCmd is a Mach-O load a dynamically linked shared library that is allowed to be missing (all symbols are weak imported) command.
No description provided by the author
No description provided by the author
No description provided by the author
Platform is a macho platform object.
A ReExportDylibCmd is a Mach-O load and re-export dylib command.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
A SegmentSplitInfoCmd is a Mach-O code info to split segments command.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
* TwolevelHint provide hints to the dynamic link editor where to start
* looking for an undefined symbol in a two-level namespace image.
A UnixThreadCmd is a Mach-O unix thread command.
UUID is a macho uuid object.
No description provided by the author
A VersionMinIPhoneOSCmd is a Mach-O build for iPhoneOS min OS version command.
A VersionMinMacOSCmd is a Mach-O build for macOS min OS version command.
A VersionMinTvOSCmd is a Mach-O build for tvOS min OS version command.
A VersionMinWatchOSCmd is a Mach-O build for watchOS min OS version command.
No description provided by the author
No description provided by the author