macho

Imports

Imports #

"debug/macho"
"encoding/binary"
"io"
"unsafe"

Constants & Variables

LC_BUILD_VERSION const #

const LC_BUILD_VERSION = 0x32

LC_CODE_SIGNATURE const #

const LC_CODE_SIGNATURE = 0x1d

LC_DATA_IN_CODE const #

const LC_DATA_IN_CODE = 0x29

LC_DYLD_CHAINED_FIXUPS const #

const LC_DYLD_CHAINED_FIXUPS = 0x80000034

LC_DYLD_ENVIRONMENT const #

const LC_DYLD_ENVIRONMENT = 0x27

LC_DYLD_EXPORTS_TRIE const #

const LC_DYLD_EXPORTS_TRIE = 0x80000033

LC_DYLD_INFO const #

const LC_DYLD_INFO = 0x22

LC_DYLD_INFO_ONLY const #

const LC_DYLD_INFO_ONLY = 0x80000022

LC_DYLIB_CODE_SIGN_DRS const #

const LC_DYLIB_CODE_SIGN_DRS = 0x2B

LC_DYSYMTAB const #

const LC_DYSYMTAB = 0xb

LC_ENCRYPTION_INFO const #

const LC_ENCRYPTION_INFO = 0x21

LC_ENCRYPTION_INFO_64 const #

const LC_ENCRYPTION_INFO_64 = 0x2C

LC_FUNCTION_STARTS const #

const LC_FUNCTION_STARTS = 0x26

LC_FVMFILE const #

const LC_FVMFILE = 0x9

LC_IDENT const #

const LC_IDENT = 0x8

LC_IDFVMLIB const #

const LC_IDFVMLIB = 0x7

LC_ID_DYLIB const #

const LC_ID_DYLIB = 0xd

LC_ID_DYLINKER const #

const LC_ID_DYLINKER = 0xf

LC_LAZY_LOAD_DYLIB const #

const LC_LAZY_LOAD_DYLIB = 0x20

LC_LINKER_OPTIMIZATION_HINT const #

const LC_LINKER_OPTIMIZATION_HINT = 0x2E

LC_LINKER_OPTION const #

const LC_LINKER_OPTION = 0x2D

LC_LOADFVMLIB const #

const LC_LOADFVMLIB = 0x6

LC_LOAD_DYLIB const #

const LC_LOAD_DYLIB = 0xc

LC_LOAD_DYLINKER const #

const LC_LOAD_DYLINKER = 0xe

LC_LOAD_UPWARD_DYLIB const #

const LC_LOAD_UPWARD_DYLIB = 0x80000023

LC_LOAD_WEAK_DYLIB const #

const LC_LOAD_WEAK_DYLIB = 0x80000018

LC_MAIN const #

const LC_MAIN = 0x80000028

LC_PREBIND_CKSUM const #

const LC_PREBIND_CKSUM = 0x17

LC_PREBOUND_DYLIB const #

const LC_PREBOUND_DYLIB = 0x10

LC_PREPAGE const #

const LC_PREPAGE = 0xa

LC_REEXPORT_DYLIB const #

const LC_REEXPORT_DYLIB = 0x8000001f

LC_ROUTINES const #

const LC_ROUTINES = 0x11

LC_ROUTINES_64 const #

const LC_ROUTINES_64 = 0x1a

LC_RPATH const #

const LC_RPATH = 0x8000001c

LC_SEGMENT const #

const LC_SEGMENT = 0x1

LC_SEGMENT_64 const #

const LC_SEGMENT_64 = 0x19

LC_SEGMENT_SPLIT_INFO const #

const LC_SEGMENT_SPLIT_INFO = 0x1e

LC_SOURCE_VERSION const #

const LC_SOURCE_VERSION = 0x2A

LC_SUB_CLIENT const #

const LC_SUB_CLIENT = 0x14

LC_SUB_FRAMEWORK const #

const LC_SUB_FRAMEWORK = 0x12

LC_SUB_LIBRARY const #

const LC_SUB_LIBRARY = 0x15

LC_SUB_UMBRELLA const #

const LC_SUB_UMBRELLA = 0x13

LC_SYMSEG const #

const LC_SYMSEG = 0x3

LC_SYMTAB const #

const LC_SYMTAB = 0x2

LC_THREAD const #

const LC_THREAD = 0x4

LC_TWOLEVEL_HINTS const #

const LC_TWOLEVEL_HINTS = 0x16

LC_UNIXTHREAD const #

const LC_UNIXTHREAD = 0x5

LC_UUID const #

const LC_UUID = 0x1b

LC_VERSION_MIN_IPHONEOS const #

const LC_VERSION_MIN_IPHONEOS = 0x25

LC_VERSION_MIN_MACOSX const #

const LC_VERSION_MIN_MACOSX = 0x24

LC_VERSION_MIN_TVOS const #

const LC_VERSION_MIN_TVOS = 0x2F

LC_VERSION_MIN_WATCHOS const #

const LC_VERSION_MIN_WATCHOS = 0x30

LC_VERSION_NOTE const #

const LC_VERSION_NOTE = 0x31

Structs

LoadCmd struct #

LoadCmd is macho.LoadCmd with its length, which is also the load command header in the Mach-O file.

type LoadCmd struct {
Cmd macho.LoadCmd
Len uint32
}

LoadCmdReader struct #

type LoadCmdReader struct {
offset int64
next int64
f io.ReadSeeker
order binary.ByteOrder
}

LoadCmdUpdater struct #

type LoadCmdUpdater struct {
LoadCmdReader
}

Functions

FileHeaderSize function #

func FileHeaderSize(f *macho.File) int64

NewLoadCmdReader function #

func NewLoadCmdReader(f io.ReadSeeker, order binary.ByteOrder, nextOffset int64) LoadCmdReader

NewLoadCmdUpdater function #

func NewLoadCmdUpdater(f io.ReadWriteSeeker, order binary.ByteOrder, nextOffset int64) LoadCmdUpdater

Next method #

func (r *LoadCmdReader) Next() (LoadCmd, error)

Offset method #

func (r LoadCmdReader) Offset() int64

ReadAt method #

func (r LoadCmdReader) ReadAt(offset int64, data interface{}) error

WriteAt method #

func (u LoadCmdUpdater) WriteAt(offset int64, data interface{}) error

Generated with Arrow