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

ディレクトリ 検索
archive archive/tar archive/zip bufio bufio(緩存) builtin builtin(內(nèi)置包) bytes bytes(包字節(jié)) compress compress/bzip2(壓縮/bzip2) compress/flate(壓縮/flate) compress/gzip(壓縮/gzip) compress/lzw(壓縮/lzw) compress/zlib(壓縮/zlib) container container/heap(容器數(shù)據(jù)結(jié)構(gòu)heap) container/list(容器數(shù)據(jù)結(jié)構(gòu)list) container/ring(容器數(shù)據(jù)結(jié)構(gòu)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ù)庫(kù)/sql) database/sql/driver(數(shù)據(jù)庫(kù)/sql/driver) debug debug/dwarf(調(diào)試/dwarf) debug/elf(調(diào)試/elf) debug/gosym(調(diào)試/gosym) debug/macho(調(diào)試/macho) debug/pe(調(diào)試/pe) debug/plan9obj(調(diào)試/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(錯(cuò)誤) expvar expvar flag flag(命令行參數(shù)解析flag包) fmt fmt go go/ast(抽象語(yǔ)法樹(shù)) go/build go/constant(常量) go/doc(文檔) go/format(格式) go/importer go/parser go/printer go/scanner(掃描儀) go/token(令牌) go/types(類(lèi)型) hash hash(散列) hash/adler32 hash/crc32 hash/crc64 hash/fnv html html html/template(模板) image image(圖像) image/color(顏色) image/color/palette(調(diào)色板) 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(正則表達(dá)式) regexp/syntax runtime runtime(運(yùn)行時(shí)) runtime/debug(調(diào)試) runtime/internal/sys runtime/pprof runtime/race(競(jìng)爭(zhēng)) runtime/trace(執(zhí)行追蹤器) sort sort(排序算法) strconv strconv(轉(zhuǎn)換) strings strings(字符串) sync sync(同步) sync/atomic(原子操作) syscall syscall(系統(tǒng)調(diào)用) testing testing(測(cè)試) testing/iotest testing/quick text text/scanner(掃描文本) text/tabwriter text/template(定義模板) text/template/parse time time(時(shí)間戳) unicode unicode unicode/utf16 unicode/utf8 unsafe unsafe
テキスト

  • import "debug/macho"

  • 概述

  • 參數(shù)

概述

macho 可以訪問(wèn) Mach-O 目標(biā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)

變量

當(dāng)文件不是通用二進(jìn)制文件時(shí),ErrNotFat 從 NewFatFile 或 OpenFat 返回,但可能是基于其幻數(shù)的精簡(jiǎn)二進(jìn)制文件。

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

type Cpu

Cpu 是一個(gè) Mach-O CPU 類(lèi)型。

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 加載動(dòng)態(tài)庫(kù)命令。

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

type DylibCmd

DylibCmd 是一個(gè) Mach-O 加載動(dòng)態(tài)庫(kù)命令。

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

type Dysymtab

Dysymtab 表示一個(gè) Mach-O 動(dòng)態(tài)符號(hào)表命令。

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

type DysymtabCmd

DysymtabCmd 是一個(gè) Mach-O 動(dòng)態(tài)符號(hào)表命令。

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 內(nèi)的 Mach-O 文件。

type FatArch struct {
        FatArchHeader        *File}

type FatArchHeader

FatArchHeader 表示特定圖像體系結(jié)構(gòu)的多頭。

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

type FatFile

FatFile 是一個(gè)包含至少一個(gè)體系結(jié)構(gòu)的 Mach-O 通用二進(jìn)制文件。

type FatFile struct {
        Magic  uint32
        Arches []FatArch        // 包含已過(guò)濾或未導(dǎo)出的字段}

func NewFatFile

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

NewFatFile 創(chuàng)建一個(gè)新的 FatFile,用于訪問(wèn)通用二進(jìn)制文件中的所有 Mach-O 圖像。Mach-O 二進(jìn)制文件預(yù)計(jì)從 ReaderAt 的位置0開(kāi)始。

func OpenFat

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

OpenFat 使用 os.Open 打開(kāi)指定的文件并準(zhǔn)備將其用作 Mach-O 通用二進(jìn)制文件。

func (*FatFile) Close

func (ff *FatFile) Close() error

type File

文件表示一個(gè)開(kāi)放的 Mach-O 文件。

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

        Symtab   *Symtab
        Dysymtab *Dysymtab        // 包含已過(guò)濾或未導(dǎo)出的字段}

func NewFile

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

NewFile 創(chuàng)建一個(gè)新的文件,用于訪問(wèn)底層閱讀器中的 Mach-O 二進(jìn)制文件。Mach-O 二進(jìn)制文件預(yù)計(jì)從ReaderAt 的位置0開(kāi)始。

func Open

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

打開(kāi)使用 os.Open 打開(kāi)命名文件,并準(zhǔn)備將其用作 Mach-O 二進(jìn)制文件。

func (*File) Close

func (f *File) Close() error

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

func (*File) DWARF

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

DWARF 返回 Mach-O 文件的 DWARF 調(diào)試信息。

func (*File) ImportedLibraries

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

ImportedLibraries 返回由二進(jìn)制文件 f 引用的所有庫(kù)的路徑,這些庫(kù)在動(dòng)態(tài)鏈接時(shí)間期望與二進(jìn)制鏈接。

func (*File) ImportedSymbols

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

ImportedSymbols 返回二進(jìn)制文件f引用的所有符號(hào)的名稱(chēng),動(dòng)態(tài)加載時(shí)期望其他庫(kù)會(huì)滿(mǎn)足這些名稱(chēng)。

func (*File) Section

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

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

func (*File) Segment

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

Segment 會(huì)返回具有給定名稱(chēng)的第一個(gè) Segment,如果不存在此 Segment,則為零。

type FileHeader

FileHeader 表示一個(gè) Mach-O 文件頭。

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

type FormatError

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

type FormatError struct {        // 包含已過(guò)濾或未導(dǎo)出的字段}

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 是一個(gè) 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 位符號(hào)表項(xiàng)。

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

type Nlist64

Nlist64 是一個(gè) Mach-O 64 位符號(hào)表項(xiàng)。

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

type Regs386

Regs386 是 Mach-O 386 寄存器結(jié)構(gòu)。

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 寄存器結(jié)構(gòu)。

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。        // 如果客戶(hù)想要閱讀和尋求它必須使用        // Open()以避免爭(zhēng)奪搜索偏移量        // 與其他客戶(hù)。
        io.ReaderAt        // 包含已過(guò)濾或未導(dǎo)出的字段}

func (*Section) Data

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

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

func (*Section) Open

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

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

type Section32

Section32 是一個(gè)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 是一個(gè)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尋求。        // 如果客戶(hù)想要閱讀和尋求它必須使用        // Open()以避免爭(zhēng)奪搜索偏移量        // 與其他客戶(hù)。
        io.ReaderAt        // 包含已過(guò)濾或未導(dǎo)出的字段}

func (*Segment) Data

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

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

func (*Segment) Open

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

Open 返回一個(gè)新的 ReadSeeker 讀取該段。

type Segment32

Segment32 是一個(gè)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是一個(gè)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位加載段命令的標(biāo)頭。

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

符號(hào)是一個(gè) Mach-O 32 位或64位符號(hào)表?xiàng)l目。

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

type Symtab

Symtab 代表 Mach-O 符號(hào)表命令。

type Symtab struct {
        LoadBytes
        SymtabCmd
        Syms []Symbol}

type SymtabCmd

SymtabCmd 是一個(gè) Mach-O符號(hào)表命令。

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

type Thread

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

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

type Type

Type 是 Mach-O 文件類(lèi)型,例如目標(biāo)文件,可執(zhí)行文件或動(dòng)態(tài)庫(kù)。

type Type uint32
const (
        TypeObj    Type = 1
        TypeExec   Type = 2
        TypeDylib  Type = 6
        TypeBundle Type = 8)
前の記事: 次の記事: