Versions in this module Expand all Collapse all v0 v0.5.7 Dec 5, 2020 Changes in this version + const Magic32 + const Magic64 + const MagicFat + func RoundUp(x, align uint64) uint64 + type Cpu uint32 + const Cpu386 + const CpuAmd64 + const CpuArm + const CpuArm64 + const CpuPpc + const CpuPpc64 + func (i Cpu) GoString() string + func (i Cpu) String() string + type DyldInfo struct + func (s *DyldInfo) Copy() *DyldInfo + func (s *DyldInfo) LoadSize(t *FileTOC) uint32 + func (s *DyldInfo) String() string + type DyldInfoCmd struct + BindLen uint32 + BindOff uint32 + ExportLen uint32 + ExportOff uint32 + LazyBindLen uint32 + LazyBindOff uint32 + Len uint32 + RebaseLen uint32 + RebaseOff uint32 + WeakBindLen uint32 + WeakBindOff uint32 + type Dylib struct + CompatVersion uint32 + CurrentVersion uint32 + Name string + Time uint32 + func (s *Dylib) Copy() *Dylib + func (s *Dylib) LoadSize(t *FileTOC) uint32 + func (s *Dylib) String() string + type DylibCmd struct + CompatVersion uint32 + CurrentVersion uint32 + Len uint32 + Name uint32 + Time uint32 + type Dylinker struct + Name string + func (s *Dylinker) Copy() *Dylinker + func (s *Dylinker) LoadSize(t *FileTOC) uint32 + func (s *Dylinker) String() string + type DylinkerCmd struct + Len uint32 + Name uint32 + type Dysymtab struct + IndirectSyms []uint32 + func (s *Dysymtab) Copy() *Dysymtab + func (s *Dysymtab) LoadSize(t *FileTOC) uint32 + func (s *Dysymtab) String() string + type DysymtabCmd struct + Extrefsymoff uint32 + Extreloff uint32 + Iextdefsym uint32 + Ilocalsym uint32 + Indirectsymoff uint32 + Iundefsym uint32 + Len uint32 + Locreloff uint32 + Modtaboff uint32 + Nextdefsym uint32 + Nextrefsyms uint32 + Nextrel uint32 + Nindirectsyms uint32 + Nlocalsym uint32 + Nlocrel uint32 + Nmodtab uint32 + Ntoc uint32 + Nundefsym uint32 + Tocoffset uint32 + type EncryptionInfo struct + func (s *EncryptionInfo) Copy() *EncryptionInfo + func (s *EncryptionInfo) LoadSize(t *FileTOC) uint32 + func (s *EncryptionInfo) String() string + type EncryptionInfoCmd struct + CryptId uint32 + CryptLen uint32 + CryptOff uint32 + Len uint32 + type EntryPointCmd struct + EntryOff uint64 + Len uint32 + StackSize uint64 + type FatArch struct + type FatArchHeader struct + Align uint32 + Cpu Cpu + Offset uint32 + Size uint32 + SubCpu uint32 + type FatFile struct + Arches []FatArch + Magic uint32 + func NewFatFile(r io.ReaderAt) (*FatFile, error) + func OpenFat(name string) (*FatFile, error) + func (ff *FatFile) Close() error + type File struct + Dysymtab *Dysymtab + Symtab *Symtab + func NewFile(r io.ReaderAt) (*File, error) + func Open(name string) (*File, error) + func (f *File) Close() error + func (f *File) DWARF() (*dwarf.Data, error) + func (f *File) ImportedLibraries() ([]string, error) + func (f *File) ImportedSymbols() ([]string, error) + func (f *File) Section(name string) *Section + func (f *File) Segment(name string) *Segment + type FileHeader struct + Cpu Cpu + Flags HdrFlags + Magic uint32 + NCommands uint32 + SizeCommands uint32 + SubCpu uint32 + Type HdrType + func (h *FileHeader) Put(b []byte, o binary.ByteOrder) int + type FileTOC struct + ByteOrder binary.ByteOrder + Loads []Load + Sections []*Section + func (t *FileTOC) AddLoad(l Load) + func (t *FileTOC) AddSection(s *Section) + func (t *FileTOC) AddSegment(s *Segment) + func (t *FileTOC) DerivedCopy(Type HdrType, Flags HdrFlags) *FileTOC + func (t *FileTOC) FileSize() uint64 + func (t *FileTOC) HdrSize() uint32 + func (t *FileTOC) LoadAlign() uint64 + func (t *FileTOC) LoadSize() uint32 + func (t *FileTOC) Put(buffer []byte) int + func (t *FileTOC) SymbolSize() uint32 + func (t *FileTOC) TOCSize() uint32 + type FormatError struct + func (e *FormatError) Error() string + func (e *FormatError) String() string + type HdrFlags uint32 + const FlagAllModsBound + const FlagAllowStackExecution + const FlagAppExtensionSafe + const FlagBindAtLoad + const FlagBindsToWeak + const FlagCanonical + const FlagDeadStrippableDylib + const FlagDyldLink + const FlagForceFlat + const FlagHasTLVDescriptors + const FlagIncrLink + const FlagLazyInit + const FlagNoFixPrebinding + const FlagNoHeapExecution + const FlagNoMultiDefs + const FlagNoReexportedDylibs + const FlagNoUndefs + const FlagPIE + const FlagPrebindable + const FlagPrebound + const FlagRootSafe + const FlagSetuidSafe + const FlagSplitSegs + const FlagSubsectionsViaSymbols + const FlagTwoLevel + const FlagWeakDefines + type HdrType uint32 + const MhBundle + const MhCore + const MhDsym + const MhDylib + const MhExecute + const MhObject + func (t HdrType) GoString() string + func (t HdrType) String() string + type LinkEditData struct + func (s *LinkEditData) Copy() *LinkEditData + func (s *LinkEditData) LoadSize(t *FileTOC) uint32 + func (s *LinkEditData) String() string + type LinkEditDataCmd struct + DataLen uint32 + DataOff uint32 + Len uint32 + type Load interface + Command func() LoadCmd + LoadSize func(*FileTOC) uint32 + Put func([]byte, binary.ByteOrder) int + String func() string + type LoadBytes []byte + func (b LoadBytes) Copy() LoadBytes + func (b LoadBytes) LoadSize(t *FileTOC) uint32 + func (b LoadBytes) Raw() []byte + func (b LoadBytes) String() string + type LoadCmd uint32 + const LcCodeSignature + const LcDataInCode + const LcDyldEnvironment + const LcDyldInfo + const LcDyldInfoOnly + const LcDylib + const LcDylibCodeSignDrs + const LcDysymtab + const LcEncryptionInfo + const LcEncryptionInfo64 + const LcFunctionStarts + const LcIdDylib + const LcIdDylinker + const LcLoadDylinker + const LcMain + const LcRpath + const LcSegment + const LcSegment64 + const LcSegmentSplitInfo + const LcSourceVersion + const LcSymtab + const LcThread + const LcUnixthread + const LcUuid + const LcVersionMinIphoneos + const LcVersionMinMacosx + const LcVersionMinTvos + const LcVersionMinWatchos + func (c LoadCmd) Command() LoadCmd + func (i LoadCmd) GoString() string + func (i LoadCmd) String() string + func (lc LoadCmd) Put(b []byte, o binary.ByteOrder) int + type LoadCmdBytes struct + func (s LoadCmdBytes) Copy() LoadCmdBytes + func (s LoadCmdBytes) String() string + type Nlist32 struct + Desc uint16 + Name uint32 + Sect uint8 + Type uint8 + Value uint32 + type Nlist64 struct + Desc uint16 + Name uint32 + Sect uint8 + Type uint8 + Value uint64 + func (n *Nlist64) Put32(b []byte, o binary.ByteOrder) uint32 + func (n *Nlist64) Put64(b []byte, o binary.ByteOrder) uint32 + type NoteCmd struct + Filesz uint64 + Len uint32 + Name [16]byte + Offset uint64 + type Regs386 struct + AX uint32 + BP uint32 + BX uint32 + CS uint32 + CX uint32 + DI uint32 + DS uint32 + DX uint32 + ES uint32 + FLAGS uint32 + FS uint32 + GS uint32 + IP uint32 + SI uint32 + SP uint32 + SS uint32 + type RegsAMD64 struct + AX uint64 + BP uint64 + BX uint64 + CS uint64 + CX uint64 + DI uint64 + DX uint64 + FLAGS uint64 + FS uint64 + GS uint64 + IP uint64 + R10 uint64 + R11 uint64 + R12 uint64 + R13 uint64 + R14 uint64 + R15 uint64 + R8 uint64 + R9 uint64 + SI uint64 + SP uint64 + type Reloc struct + Addr uint32 + Extern bool + Len uint8 + Pcrel bool + Scattered bool + Type uint8 + Value uint32 + type RelocTypeARM int + const ARM_RELOC_BR24 + const ARM_RELOC_HALF + const ARM_RELOC_HALF_SECTDIFF + const ARM_RELOC_LOCAL_SECTDIFF + const ARM_RELOC_PAIR + const ARM_RELOC_PB_LA_PTR + const ARM_RELOC_SECTDIFF + const ARM_RELOC_VANILLA + const ARM_THUMB_32BIT_BRANCH + const ARM_THUMB_RELOC_BR22 + func (i RelocTypeARM) String() string + func (r RelocTypeARM) GoString() string + type RelocTypeARM64 int + const ARM64_RELOC_ADDEND + const ARM64_RELOC_BRANCH26 + const ARM64_RELOC_GOT_LOAD_PAGE21 + const ARM64_RELOC_GOT_LOAD_PAGEOFF12 + const ARM64_RELOC_PAGE21 + const ARM64_RELOC_PAGEOFF12 + const ARM64_RELOC_POINTER_TO_GOT + const ARM64_RELOC_SUBTRACTOR + const ARM64_RELOC_TLVP_LOAD_PAGE21 + const ARM64_RELOC_TLVP_LOAD_PAGEOFF12 + const ARM64_RELOC_UNSIGNED + func (i RelocTypeARM64) String() string + func (r RelocTypeARM64) GoString() string + type RelocTypeGeneric int + const GENERIC_RELOC_LOCAL_SECTDIFF + const GENERIC_RELOC_PAIR + const GENERIC_RELOC_PB_LA_PTR + const GENERIC_RELOC_SECTDIFF + const GENERIC_RELOC_TLV + const GENERIC_RELOC_VANILLA + func (i RelocTypeGeneric) String() string + func (r RelocTypeGeneric) GoString() string + type RelocTypeX86_64 int + const X86_64_RELOC_BRANCH + const X86_64_RELOC_GOT + const X86_64_RELOC_GOT_LOAD + const X86_64_RELOC_SIGNED + const X86_64_RELOC_SIGNED_1 + const X86_64_RELOC_SIGNED_2 + const X86_64_RELOC_SIGNED_4 + const X86_64_RELOC_SUBTRACTOR + const X86_64_RELOC_TLV + const X86_64_RELOC_UNSIGNED + func (i RelocTypeX86_64) String() string + func (r RelocTypeX86_64) GoString() string + type Rpath struct + Path string + func (s *Rpath) Command() LoadCmd + func (s *Rpath) Copy() *Rpath + func (s *Rpath) LoadSize(t *FileTOC) uint32 + func (s *Rpath) String() string + type RpathCmd struct + Len uint32 + Path uint32 + type SecFlags uint32 + type Section struct + Relocs []Reloc + func (s *Section) Copy() *Section + func (s *Section) Data() ([]byte, error) + func (s *Section) Open() io.ReadSeeker + func (s *Section) Put32(b []byte, o binary.ByteOrder) int + func (s *Section) Put64(b []byte, o binary.ByteOrder) int + func (s *Section) PutData(b []byte) + func (s *Section) PutRelocs(b []byte, o binary.ByteOrder) int + func (s *Section) PutUncompressedData(b []byte) + func (s *Section) UncompressedSize() uint64 + type Section32 struct + Addr uint32 + Align uint32 + Flags SecFlags + Name [16]byte + Nreloc uint32 + Offset uint32 + Reloff uint32 + Reserve1 uint32 + Reserve2 uint32 + Seg [16]byte + Size uint32 + type Section64 struct + Addr uint64 + Align uint32 + Flags SecFlags + Name [16]byte + Nreloc uint32 + Offset uint32 + Reloff uint32 + Reserve1 uint32 + Reserve2 uint32 + Reserve3 uint32 + Seg [16]byte + Size uint64 + type SectionHeader struct + Addr uint64 + Align uint32 + Flags SecFlags + Name string + Nreloc uint32 + Offset uint32 + Reloff uint32 + Reserved1 uint32 + Reserved2 uint32 + Reserved3 uint32 + Seg string + Size uint64 + type SegFlags uint32 + type Segment struct + func (s *Segment) Copy() *Segment + func (s *Segment) CopyZeroed() *Segment + func (s *Segment) Data() ([]byte, error) + func (s *Segment) LoadSize(t *FileTOC) uint32 + func (s *Segment) Open() io.ReadSeeker + func (s *Segment) Put32(b []byte, o binary.ByteOrder) int + func (s *Segment) Put64(b []byte, o binary.ByteOrder) int + func (s *Segment) String() string + func (s *Segment) UncompressedSize(t *FileTOC, align uint64) uint64 + type Segment32 struct + Addr uint32 + Filesz uint32 + Flag SegFlags + Len uint32 + Maxprot uint32 + Memsz uint32 + Name [16]byte + Nsect uint32 + Offset uint32 + Prot uint32 + type Segment64 struct + Addr uint64 + Filesz uint64 + Flag SegFlags + Len uint32 + Maxprot uint32 + Memsz uint64 + Name [16]byte + Nsect uint32 + Offset uint64 + Prot uint32 + type SegmentHeader struct + Addr uint64 + Filesz uint64 + Firstsect uint32 + Flag SegFlags + Len uint32 + Maxprot uint32 + Memsz uint64 + Name string + Nsect uint32 + Offset uint64 + Prot uint32 + func (s *SegmentHeader) String() string + type Symbol struct + Desc uint16 + Name string + Sect uint8 + Type uint8 + Value uint64 + type Symtab struct + Syms []Symbol + func (s *Symtab) Copy() *Symtab + func (s *Symtab) LoadSize(t *FileTOC) uint32 + func (s *Symtab) Put(b []byte, o binary.ByteOrder) int + func (s *Symtab) String() string + type SymtabCmd struct + Len uint32 + Nsyms uint32 + Stroff uint32 + Strsize uint32 + Symoff uint32 + type Thread struct + Data []uint32 + Len uint32 + Type uint32 + type Uuid struct + func (s *Uuid) Copy() *Uuid + func (s *Uuid) LoadSize(t *FileTOC) uint32 + func (s *Uuid) Put(b []byte, o binary.ByteOrder) int + func (s *Uuid) String() string + type UuidCmd struct + Id [16]byte + Len uint32