亚洲国产日韩欧美一区二区三区,精品亚洲国产成人av在线,国产99视频精品免视看7,99国产精品久久久久久久成人热,欧美日韩亚洲国产综合乱

directory search
archive archive/tar archive/zip bufio bufio(緩存) builtin builtin(內置包) bytes bytes(包字節(jié)) compress compress/bzip2(壓縮/bzip2) compress/flate(壓縮/flate) compress/gzip(壓縮/gzip) compress/lzw(壓縮/lzw) compress/zlib(壓縮/zlib) container container/heap(容器數(shù)據(jù)結構heap) container/list(容器數(shù)據(jù)結構list) container/ring(容器數(shù)據(jù)結構ring) context context(上下文) crypto crypto(加密) crypto/aes(加密/aes) crypto/cipher(加密/cipher) crypto/des(加密/des) crypto/dsa(加密/dsa) crypto/ecdsa(加密/ecdsa) crypto/elliptic(加密/elliptic) crypto/hmac(加密/hmac) crypto/md5(加密/md5) crypto/rand(加密/rand) crypto/rc4(加密/rc4) crypto/rsa(加密/rsa) crypto/sha1(加密/sha1) crypto/sha256(加密/sha256) crypto/sha512(加密/sha512) crypto/subtle(加密/subtle) crypto/tls(加密/tls) crypto/x509(加密/x509) crypto/x509/pkix(加密/x509/pkix) database database/sql(數(shù)據(jù)庫/sql) database/sql/driver(數(shù)據(jù)庫/sql/driver) debug debug/dwarf(調試/dwarf) debug/elf(調試/elf) debug/gosym(調試/gosym) debug/macho(調試/macho) debug/pe(調試/pe) debug/plan9obj(調試/plan9obj) encoding encoding(編碼) encoding/ascii85(編碼/ascii85) encoding/asn1(編碼/asn1) encoding/base32(編碼/base32) encoding/base64(編碼/base64) encoding/binary(編碼/binary) encoding/csv(編碼/csv) encoding/gob(編碼/gob) encoding/hex(編碼/hex) encoding/json(編碼/json) encoding/pem(編碼/pem) encoding/xml(編碼/xml) errors errors(錯誤) expvar expvar flag flag(命令行參數(shù)解析flag包) fmt fmt go go/ast(抽象語法樹) go/build go/constant(常量) go/doc(文檔) go/format(格式) go/importer go/parser go/printer go/scanner(掃描儀) go/token(令牌) go/types(類型) hash hash(散列) hash/adler32 hash/crc32 hash/crc64 hash/fnv html html html/template(模板) image image(圖像) image/color(顏色) image/color/palette(調色板) image/draw(繪圖) image/gif image/jpeg image/png index index/suffixarray io io io/ioutil log log log/syslog(日志系統(tǒng)) math math math/big math/big math/bits math/bits math/cmplx math/cmplx math/rand math/rand mime mime mime/multipart(多部分) mime/quotedprintable net net net/http net/http net/http/cgi net/http/cookiejar net/http/fcgi net/http/httptest net/http/httptrace net/http/httputil net/http/internal net/http/pprof net/mail net/mail net/rpc net/rpc net/rpc/jsonrpc net/smtp net/smtp net/textproto net/textproto net/url net/url os os os/exec os/signal os/user path path path/filepath(文件路徑) plugin plugin(插件) reflect reflect(反射) regexp regexp(正則表達式) regexp/syntax runtime runtime(運行時) runtime/debug(調試) runtime/internal/sys runtime/pprof runtime/race(競爭) runtime/trace(執(zhí)行追蹤器) sort sort(排序算法) strconv strconv(轉換) strings strings(字符串) sync sync(同步) sync/atomic(原子操作) syscall syscall(系統(tǒng)調用) testing testing(測試) testing/iotest testing/quick text text/scanner(掃描文本) text/tabwriter text/template(定義模板) text/template/parse time time(時間戳) unicode unicode unicode/utf16 unicode/utf8 unsafe unsafe
characters

  • import "debug/macho"

  • 概述

  • 參數(shù)

概述

macho 可以訪問 Mach-O 目標文件。

參數(shù)

  • 常量

  • 變量

  • type Cpu

  • func (i Cpu) GoString() string

  • func (i Cpu) String() string

  • type Dylib

  • type DylibCmd

  • type Dysymtab

  • type DysymtabCmd

  • type FatArch

  • type FatArchHeader

  • type FatFile

  • func NewFatFile(r io.ReaderAt) (*FatFile, error)

  • func OpenFat(name string) (*FatFile, error)

  • func (ff *FatFile) Close() error

  • type File

  • 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

  • type FormatError

  • func (e *FormatError) Error() string

  • type Load

  • type LoadBytes

  • func (b LoadBytes) Raw() []byte

  • type LoadCmd

  • func (i LoadCmd) GoString() string

  • func (i LoadCmd) String() string

  • type Nlist32

  • type Nlist64

  • type Regs386

  • type RegsAMD64

  • type Section

  • func (s *Section) Data() ([]byte, error)

  • func (s *Section) Open() io.ReadSeeker

  • type Section32

  • type Section64

  • type SectionHeader

  • type Segment

  • func (s *Segment) Data() ([]byte, error)

  • func (s *Segment) Open() io.ReadSeeker

  • type Segment32

  • type Segment64

  • type SegmentHeader

  • type Symbol

  • type Symtab

  • type SymtabCmd

  • type Thread

  • type Type

打包文件

fat.go file.go macho.go

常量

const (
        Magic32  uint32 = 0xfeedface
        Magic64  uint32 = 0xfeedfacf
        MagicFat uint32 = 0xcafebabe)

變量

當文件不是通用二進制文件時,ErrNotFat 從 NewFatFile 或 OpenFat 返回,但可能是基于其幻數(shù)的精簡二進制文件。

var ErrNotFat = &FormatError{0, "not a fat Mach-O file", nil}

type Cpu

Cpu 是一個 Mach-O CPU 類型。

type Cpu uint32
const (
        Cpu386   Cpu = 7
        CpuAmd64 Cpu = Cpu386 | cpuArch64
        CpuArm   Cpu = 12
        CpuPpc   Cpu = 18
        CpuPpc64 Cpu = CpuPpc | cpuArch64)

func (Cpu) GoString

func (i Cpu) GoString() string

func (Cpu) String

func (i Cpu) String() string

type Dylib

Dylib 代表 Mach-O 加載動態(tài)庫命令。

type Dylib struct {
        LoadBytes
        Name           string
        Time           uint32
        CurrentVersion uint32
        CompatVersion  uint32}

type DylibCmd

DylibCmd 是一個 Mach-O 加載動態(tài)庫命令。

type DylibCmd struct {
        Cmd            LoadCmd
        Len            uint32
        Name           uint32
        Time           uint32
        CurrentVersion uint32
        CompatVersion  uint32}

type Dysymtab

Dysymtab 表示一個 Mach-O 動態(tài)符號表命令。

type Dysymtab struct {
        LoadBytes
        DysymtabCmd
        IndirectSyms []uint32 // 索引到Symtab.Syms}

type DysymtabCmd

DysymtabCmd 是一個 Mach-O 動態(tài)符號表命令。

type DysymtabCmd struct {
        Cmd            LoadCmd
        Len            uint32
        Ilocalsym      uint32
        Nlocalsym      uint32
        Iextdefsym     uint32
        Nextdefsym     uint32
        Iundefsym      uint32
        Nundefsym      uint32
        Tocoffset      uint32
        Ntoc           uint32
        Modtaboff      uint32
        Nmodtab        uint32
        Extrefsymoff   uint32
        Nextrefsyms    uint32
        Indirectsymoff uint32
        Nindirectsyms  uint32
        Extreloff      uint32
        Nextrel        uint32
        Locreloff      uint32
        Nlocrel        uint32}

type FatArch

FatArch 是 FatFile 內的 Mach-O 文件。

type FatArch struct {
        FatArchHeader        *File}

type FatArchHeader

FatArchHeader 表示特定圖像體系結構的多頭。

type FatArchHeader struct {
        Cpu    Cpu
        SubCpu uint32
        Offset uint32
        Size   uint32
        Align  uint32}

type FatFile

FatFile 是一個包含至少一個體系結構的 Mach-O 通用二進制文件。

type FatFile struct {
        Magic  uint32
        Arches []FatArch        // 包含已過濾或未導出的字段}

func NewFatFile

func NewFatFile(r io.ReaderAt) (*FatFile, error)

NewFatFile 創(chuàng)建一個新的 FatFile,用于訪問通用二進制文件中的所有 Mach-O 圖像。Mach-O 二進制文件預計從 ReaderAt 的位置0開始。

func OpenFat

func OpenFat(name string) (*FatFile, error)

OpenFat 使用 os.Open 打開指定的文件并準備將其用作 Mach-O 通用二進制文件。

func (*FatFile) Close

func (ff *FatFile) Close() error

type File

文件表示一個開放的 Mach-O 文件。

type File struct {
        FileHeader
        ByteOrder binary.ByteOrder
        Loads     []Load
        Sections  []*Section

        Symtab   *Symtab
        Dysymtab *Dysymtab        // 包含已過濾或未導出的字段}

func NewFile

func NewFile(r io.ReaderAt) (*File, error)

NewFile 創(chuàng)建一個新的文件,用于訪問底層閱讀器中的 Mach-O 二進制文件。Mach-O 二進制文件預計從ReaderAt 的位置0開始。

func Open

func Open(name string) (*File, error)

打開使用 os.Open 打開命名文件,并準備將其用作 Mach-O 二進制文件。

func (*File) Close

func (f *File) Close() error

關閉文件。如果文件是直接使用 NewFile 而不是 Open 來創(chuàng)建的,則 Close 不起作用。

func (*File) DWARF

func (f *File) DWARF() (*dwarf.Data, error)

DWARF 返回 Mach-O 文件的 DWARF 調試信息。

func (*File) ImportedLibraries

func (f *File) ImportedLibraries() ([]string, error)

ImportedLibraries 返回由二進制文件 f 引用的所有庫的路徑,這些庫在動態(tài)鏈接時間期望與二進制鏈接。

func (*File) ImportedSymbols

func (f *File) ImportedSymbols() ([]string, error)

ImportedSymbols 返回二進制文件f引用的所有符號的名稱,動態(tài)加載時期望其他庫會滿足這些名稱。

func (*File) Section

func (f *File) Section(name string) *Section

Section 返回給定名稱的第一部分,如果不存在這樣的部分,則返回 nil。

func (*File) Segment

func (f *File) Segment(name string) *Segment

Segment 會返回具有給定名稱的第一個 Segment,如果不存在此 Segment,則為零。

type FileHeader

FileHeader 表示一個 Mach-O 文件頭。

type FileHeader struct {
        Magic  uint32
        Cpu    Cpu
        SubCpu uint32
        Type   Type
        Ncmd   uint32
        Cmdsz  uint32
        Flags  uint32}

type FormatError

如果數(shù)據(jù)的目標文件格式不正確,F(xiàn)ormatError 會被某些操作返回。

type FormatError struct {        // 包含已過濾或未導出的字段}

func (*FormatError) Error

func (e *FormatError) Error() string

type Load

Load 表示任何 Mach-O 加載命令。

type Load interface {        Raw() []byte}

type LoadBytes

LoadBytes 是 Mach-O 加載命令的未解釋字節(jié)。

type LoadBytes []byte

func (LoadBytes) Raw

func (b LoadBytes) Raw() []byte

type LoadCmd

LoadCmd 是一個 Mach-O 加載命令。

type LoadCmd uint32
const (
        LoadCmdSegment    LoadCmd = 1
        LoadCmdSymtab     LoadCmd = 2
        LoadCmdThread     LoadCmd = 4
        LoadCmdUnixThread LoadCmd = 5 // thread+stack
        LoadCmdDysymtab   LoadCmd = 11
        LoadCmdDylib      LoadCmd = 12
        LoadCmdDylinker   LoadCmd = 15
        LoadCmdSegment64  LoadCmd = 25)

func (LoadCmd) GoString

func (i LoadCmd) GoString() string

func (LoadCmd) String

func (i LoadCmd) String() string

type Nlist32

Nlist32 是 Mach-O 32 位符號表項。

type Nlist32 struct {
        Name  uint32
        Type  uint8
        Sect  uint8
        Desc  uint16
        Value uint32}

type Nlist64

Nlist64 是一個 Mach-O 64 位符號表項。

type Nlist64 struct {
        Name  uint32
        Type  uint8
        Sect  uint8
        Desc  uint16
        Value uint64}

type Regs386

Regs386 是 Mach-O 386 寄存器結構。

type Regs386 struct {
        AX    uint32
        BX    uint32
        CX    uint32
        DX    uint32
        DI    uint32
        SI    uint32
        BP    uint32
        SP    uint32
        SS    uint32
        FLAGS uint32
        IP    uint32
        CS    uint32
        DS    uint32
        ES    uint32
        FS    uint32
        GS    uint32}

type RegsAMD64

RegsAMD64 是 Mach-O AMD64 寄存器結構。

type RegsAMD64 struct {
        AX    uint64
        BX    uint64
        CX    uint64
        DX    uint64
        DI    uint64
        SI    uint64
        BP    uint64
        SP    uint64
        R8    uint64
        R9    uint64
        R10   uint64
        R11   uint64
        R12   uint64
        R13   uint64
        R14   uint64
        R15   uint64
        IP    uint64
        FLAGS uint64
        CS    uint64
        FS    uint64
        GS    uint64}

type Section

type Section struct {
        SectionHeader        // 為ReadAt方法嵌入ReaderAt。        // 不要直接嵌入SectionReader        // 避免Read和Seek。        // 如果客戶想要閱讀和尋求它必須使用        // Open()以避免爭奪搜索偏移量        // 與其他客戶。
        io.ReaderAt        // 包含已過濾或未導出的字段}

func (*Section) Data

func (s *Section) Data() ([]byte, error)

數(shù)據(jù)讀取并返回 Mach-O 部分的內容。

func (*Section) Open

func (s *Section) Open() io.ReadSeeker

Open 返回讀取 Mach-O 部分的新 ReadSeeker。

type Section32

Section32 是一個32位 Mach-O 節(jié)頭。

type Section32 struct {
        Name     [16]byte
        Seg      [16]byte
        Addr     uint32
        Size     uint32
        Offset   uint32
        Align    uint32
        Reloff   uint32
        Nreloc   uint32
        Flags    uint32
        Reserve1 uint32
        Reserve2 uint32}

type Section64

Section64 是一個64位 Mach-O 節(jié)頭。

type Section64 struct {
        Name     [16]byte
        Seg      [16]byte
        Addr     uint64
        Size     uint64
        Offset   uint32
        Align    uint32
        Reloff   uint32
        Nreloc   uint32
        Flags    uint32
        Reserve1 uint32
        Reserve2 uint32
        Reserve3 uint32}

type SectionHeader

type SectionHeader struct {
        Name   string
        Seg    string
        Addr   uint64
        Size   uint64
        Offset uint32
        Align  uint32
        Reloff uint32
        Nreloc uint32
        Flags  uint32}

type Segment

Segment 表示 Mach-O 32 位或64位加載段命令。

type Segment struct {
        LoadBytes
        SegmentHeader        // 為ReadAt方法嵌入ReaderAt。        // 不要直接嵌入SectionReader        // 避免Read閱讀和Seek尋求。        // 如果客戶想要閱讀和尋求它必須使用        // Open()以避免爭奪搜索偏移量        // 與其他客戶。
        io.ReaderAt        // 包含已過濾或未導出的字段}

func (*Segment) Data

func (s *Segment) Data() ([]byte, error)

數(shù)據(jù)讀取并返回段的內容。

func (*Segment) Open

func (s *Segment) Open() io.ReadSeeker

Open 返回一個新的 ReadSeeker 讀取該段。

type Segment32

Segment32 是一個32位的 Mach-O segment

加載命令。

type Segment32 struct {
        Cmd     LoadCmd
        Len     uint32
        Name    [16]byte
        Addr    uint32
        Memsz   uint32
        Offset  uint32
        Filesz  uint32
        Maxprot uint32
        Prot    uint32
        Nsect   uint32
        Flag    uint32}

type Segment64

Segment64是一個64位的Mach-O段加載命令。

type Segment64 struct {
        Cmd     LoadCmd
        Len     uint32
        Name    [16]byte
        Addr    uint64
        Memsz   uint64
        Offset  uint64
        Filesz  uint64
        Maxprot uint32
        Prot    uint32
        Nsect   uint32
        Flag    uint32}

type SegmentHeader

SegmentHeader 是 Mach-O 32 位或64位加載段命令的標頭。

type SegmentHeader struct {
        Cmd     LoadCmd
        Len     uint32
        Name    string
        Addr    uint64
        Memsz   uint64
        Offset  uint64
        Filesz  uint64
        Maxprot uint32
        Prot    uint32
        Nsect   uint32
        Flag    uint32}

type Symbol

符號是一個 Mach-O 32 位或64位符號表條目。

type Symbol struct {
        Name  string
        Type  uint8
        Sect  uint8
        Desc  uint16
        Value uint64}

type Symtab

Symtab 代表 Mach-O 符號表命令。

type Symtab struct {
        LoadBytes
        SymtabCmd
        Syms []Symbol}

type SymtabCmd

SymtabCmd 是一個 Mach-O符號表命令。

type SymtabCmd struct {
        Cmd     LoadCmd
        Len     uint32
        Symoff  uint32
        Nsyms   uint32
        Stroff  uint32
        Strsize uint32}

type Thread

線程是一個 Mach-O 線程狀態(tài)命令。

type Thread struct {
        Cmd  LoadCmd
        Len  uint32
        Type uint32
        Data []uint32}

type Type

Type 是 Mach-O 文件類型,例如目標文件,可執(zhí)行文件或動態(tài)庫。

type Type uint32
const (
        TypeObj    Type = 1
        TypeExec   Type = 2
        TypeDylib  Type = 6
        TypeBundle Type = 8)
Previous article: Next article: