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

directory search
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ù)庫/sql) database/sql/driver(數(shù)據(jù)庫/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(錯誤) 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(調(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(正則表達式) regexp/syntax runtime runtime(運行時) runtime/debug(調(diào)試) runtime/internal/sys runtime/pprof runtime/race(競爭) runtime/trace(執(zhí)行追蹤器) sort sort(排序算法) strconv strconv(轉(zhuǎn)換) strings strings(字符串) sync sync(同步) sync/atomic(原子操作) syscall syscall(系統(tǒng)調(diào)用) 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/elf"

  • 概述

  • 參數(shù)

概述

封裝 ELF 實現(xiàn)了對 ELF 對象文件的訪問。

索引

  • Constants

  • Variables

  • func R_INFO(sym, typ uint32) uint64

  • func R_INFO32(sym, typ uint32) uint32

  • func R_SYM32(info uint32) uint32

  • func R_SYM64(info uint64) uint32

  • func R_TYPE32(info uint32) uint32

  • func R_TYPE64(info uint64) uint32

  • func ST_INFO(bind SymBind, typ SymType) uint8

  • type Chdr32

  • type Chdr64

  • type Class

  • func (i Class) GoString() string

  • func (i Class) String() string

  • type CompressionType

  • func (i CompressionType) GoString() string

  • func (i CompressionType) String() string

  • type Data

  • func (i Data) GoString() string

  • func (i Data) String() string

  • type Dyn32

  • type Dyn64

  • type DynFlag

  • func (i DynFlag) GoString() string

  • func (i DynFlag) String() string

  • type DynTag

  • func (i DynTag) GoString() string

  • func (i DynTag) String() string

  • 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) DynString(tag DynTag) ([]string, error)

  • func (f *File) DynamicSymbols() ([]Symbol, error)

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

  • func (f *File) ImportedSymbols() ([]ImportedSymbol, error)

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

  • func (f *File) SectionByType(typ SectionType) *Section

  • func (f *File) Symbols() ([]Symbol, error)

  • type FileHeader

  • type FormatError

  • func (e *FormatError) Error() string

  • type Header32

  • type Header64

  • type ImportedSymbol

  • type Machine

  • func (i Machine) GoString() string

  • func (i Machine) String() string

  • type NType

  • func (i NType) GoString() string

  • func (i NType) String() string

  • type OSABI

  • func (i OSABI) GoString() string

  • func (i OSABI) String() string

  • type Prog

  • func (p *Prog) Open() io.ReadSeeker

  • type Prog32

  • type Prog64

  • type ProgFlag

  • func (i ProgFlag) GoString() string

  • func (i ProgFlag) String() string

  • type ProgHeader

  • type ProgType

  • func (i ProgType) GoString() string

  • func (i ProgType) String() string

  • type R_386

  • func (i R_386) GoString() string

  • func (i R_386) String() string

  • type R_390

  • func (i R_390) GoString() string

  • func (i R_390) String() string

  • type R_AARCH64

  • func (i R_AARCH64) GoString() string

  • func (i R_AARCH64) String() string

  • type R_ALPHA

  • func (i R_ALPHA) GoString() string

  • func (i R_ALPHA) String() string

  • type R_ARM

  • func (i R_ARM) GoString() string

  • func (i R_ARM) String() string

  • type R_MIPS

  • func (i R_MIPS) GoString() string

  • func (i R_MIPS) String() string

  • type R_PPC

  • func (i R_PPC) GoString() string

  • func (i R_PPC) String() string

  • type R_PPC64

  • func (i R_PPC64) GoString() string

  • func (i R_PPC64) String() string

  • type R_SPARC

  • func (i R_SPARC) GoString() string

  • func (i R_SPARC) String() string

  • type R_X86_64

  • func (i R_X86_64) GoString() string

  • func (i R_X86_64) String() string

  • type Rel32

  • type Rel64

  • type Rela32

  • type Rela64

  • type Section

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

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

  • type Section32

  • type Section64

  • type SectionFlag

  • func (i SectionFlag) GoString() string

  • func (i SectionFlag) String() string

  • type SectionHeader

  • type SectionIndex

  • func (i SectionIndex) GoString() string

  • func (i SectionIndex) String() string

  • type SectionType

  • func (i SectionType) GoString() string

  • func (i SectionType) String() string

  • type Sym32

  • type Sym64

  • type SymBind

  • func ST_BIND(info uint8) SymBind

  • func (i SymBind) GoString() string

  • func (i SymBind) String() string

  • type SymType

  • func ST_TYPE(info uint8) SymType

  • func (i SymType) GoString() string

  • func (i SymType) String() string

  • type SymVis

  • func ST_VISIBILITY(other uint8) SymVis

  • func (i SymVis) GoString() string

  • func (i SymVis) String() string

  • type Symbol

  • type Type

  • func (i Type) GoString() string

  • func (i Type) String() string

  • type Version

  • func (i Version) GoString() string

  • func (i Version) String() string

打包文件

elf.go file.go reader.go

常量

索引到Header.Ident數(shù)組中。

const (
        EI_CLASS      = 4  /* 機器類別。 */
        EI_DATA       = 5  /* 數(shù)據(jù)格式。 */
        EI_VERSION    = 6  /* ELF格式版本。 */
        EI_OSABI      = 7  /* 操作系統(tǒng)/ABI識別 */
        EI_ABIVERSION = 8  /* ABI版 */
        EI_PAD        = 9  /* 填充開始(根據(jù)SVR4 ABI)。 */
        EI_NIDENT     = 16 /* e_ident數(shù)組的大小。 */)

ELF的神奇數(shù)字,明智地被選為即時的值。

const ARM_MAGIC_TRAMP_NUMBER = 0x5c000003

ELF文件的初始數(shù)值。

const ELFMAG = "\177ELF"
const Sym32Size = 16
const Sym64Size = 24

變量

如果文件中沒有這樣的部分,則 ErrNoSymbols 由 File.Symbols 和 File.DynamicSymbols 返回。

var ErrNoSymbols = errors.New("no symbol section")

func R_INFO

func R_INFO(sym, typ uint32) uint64

func R_INFO32

func R_INFO32(sym, typ uint32) uint32

func R_SYM32

func R_SYM32(info uint32) uint32

func R_SYM64

func R_SYM64(info uint64) uint32

func R_TYPE32

func R_TYPE32(info uint32) uint32

func R_TYPE64

func R_TYPE64(info uint64) uint32

func ST_INFO

func ST_INFO(bind SymBind, typ SymType) uint8

type Chdr32

ELF32 壓縮標題。

type Chdr32 struct {
        Type      uint32
        Size      uint32
        Addralign uint32}

type Chdr64

ELF64 壓縮標題。

type Chdr64 struct {
        Type uint32

        Size      uint64
        Addralign uint64        // 包含過濾或未導出的字段}

type Class

Class 在 Header.IdentEI_CLASS 和 Header.Class 中找到。

type Class byte
const (
        ELFCLASSNONE Class = 0 /* 未知的類別。 */
        ELFCLASS32   Class = 1 /* 32位架構(gòu)。 */
        ELFCLASS64   Class = 2 /* 64位架構(gòu)。 */)

func (Class) GoString

func (i Class) GoString() string

func (Class) String

func (i Class) String() string

type CompressionType

部分壓縮類型。

type CompressionType int
const (
        COMPRESS_ZLIB   CompressionType = 1          /* ZLIB壓縮。 */
        COMPRESS_LOOS   CompressionType = 0x60000000 /* 第一個特定于操作系統(tǒng) */
        COMPRESS_HIOS   CompressionType = 0x6fffffff /* 最后一個特定于OS的。 */
        COMPRESS_LOPROC CompressionType = 0x70000000 /* 第一種處理器特定類型。 */
        COMPRESS_HIPROC CompressionType = 0x7fffffff /* 最后一個處理器特定類型。 */)

func (CompressionType) GoString

func (i CompressionType) GoString() string

func (CompressionType) String

func (i CompressionType) String() string

type Data

數(shù)據(jù)位于 Header.IdentEI_DATA 和 Header.Data 中。

type Data byte
const (
        ELFDATANONE Data = 0 /* 未知的數(shù)據(jù)格式。 */
        ELFDATA2LSB Data = 1 /* 2的補充little-endian。 */
        ELFDATA2MSB Data = 2 /* 2的補充big-endian。 */)

func (Data) GoString

func (i Data) GoString() string

func (Data) String

func (i Data) String() string

type Dyn32

ELF32 動態(tài)結(jié)構(gòu)?!?dynamic” 部分包含它們的數(shù)組。

type Dyn32 struct {
        Tag int32  /* 輸入類型。 */
        Val uint32 /* 整數(shù)/地址值。 */}

type Dyn64

ELF64 動態(tài)結(jié)構(gòu)?!?dynamic” 部分包含它們的數(shù)組。

type Dyn64 struct {
        Tag int64  /* 輸入類型。 */
        Val uint64 /* 整數(shù)/地址值 */}

type DynFlag

DT_FLAGS 值。

type DynFlag int
const (
        DF_ORIGIN DynFlag = 0x0001 /* 表示正在加載的對象可能
           參考
           $ORIGIN 替換字符串 */
        DF_SYMBOLIC DynFlag = 0x0002 /* 表示“symbolic”鏈接。 */
        DF_TEXTREL  DynFlag = 0x0004 /* 表示可寫區(qū)段中可能存在重定位。 */
        DF_BIND_NOW DynFlag = 0x0008 /* 表示動態(tài)鏈接器應該
           處理對象的所有重定位
           轉(zhuǎn)移前包含此條目
           控制程序。 */
        DF_STATIC_TLS DynFlag = 0x0010 /* 表示共享對象或
           可執(zhí)行文件包含使用靜態(tài)代碼
           線程本地存儲方案。 */)

func (DynFlag) GoString

func (i DynFlag) GoString() string

func (DynFlag) String

func (i DynFlag) String() string

type DynTag

Dyn.Tag

type DynTag int
const (
        DT_NULL         DynTag = 0  /* 終止輸入。 */
        DT_NEEDED       DynTag = 1  /* 所需共享庫的字符串表偏移量。 */
        DT_PLTRELSZ     DynTag = 2  /* PLT重定位的總大小(以字節(jié)為單位)。 */
        DT_PLTGOT       DynTag = 3  /* 依賴于處理器的地址。 */
        DT_HASH         DynTag = 4  /* 符號哈希表的地址。 */
        DT_STRTAB       DynTag = 5  /* 字符串表的地址。 */
        DT_SYMTAB       DynTag = 6  /* 符號表的地址。 */
        DT_RELA         DynTag = 7  /* ElfNN_Rela搬遷地址。 */
        DT_RELASZ       DynTag = 8  /* ElfNN_Rela重定位的總大小。 */
        DT_RELAENT      DynTag = 9  /* 每個ElfNN_Rela重定位條目的大小。 */
        DT_STRSZ        DynTag = 10 /* 字符串表的大小。 */
        DT_SYMENT       DynTag = 11 /* 每個符號表條目的大小。 */
        DT_INIT         DynTag = 12 /* 初始化函數(shù)的地址。 */
        DT_FINI         DynTag = 13 /* 終結(jié)函數(shù)的地址。 */
        DT_SONAME       DynTag = 14 /* 共享對象名稱的字符串表偏移量。 */
        DT_RPATH        DynTag = 15 /* path. [sup]庫的字符串表偏移量  */
        DT_SYMBOLIC     DynTag = 16 /* 表示“symbolic” linking.[sup] */
        DT_REL          DynTag = 17 /* ElfNN_Rel重新安置的地址。 */
        DT_RELSZ        DynTag = 18 /* ElfNN_Rel重定位的總大小。 */
        DT_RELENT       DynTag = 19 /* 每個ElfNN_Rel重定位的大小。 */
        DT_PLTREL       DynTag = 20 /* PLT使用的搬遷類型。 */
        DT_DEBUG        DynTag = 21 /* 保留(未使用)。 */
        DT_TEXTREL      DynTag = 22 /* 表示可寫區(qū)段中可能存在重定位。[SUP] */
        DT_JMPREL       DynTag = 23 /* PLT重新安置的地址。 */
        DT_BIND_NOW     DynTag = 24 /* [sup] */
        DT_INIT_ARRAY   DynTag = 25 /* 初始化函數(shù)指針數(shù)組的地址 */
        DT_FINI_ARRAY   DynTag = 26 /* 指向終止函數(shù)的指針數(shù)組的地址 */
        DT_INIT_ARRAYSZ DynTag = 27 /* 初始化函數(shù)數(shù)組的大小(以字節(jié)為單位)。 */
        DT_FINI_ARRAYSZ DynTag = 28 /* 終止函數(shù)數(shù)組的大小(以字節(jié)為單位)。 */
        DT_RUNPATH      DynTag = 29 /* 以null結(jié)尾的庫搜索路徑字符串的字符串表偏移量。 */
        DT_FLAGS        DynTag = 30 /* 對象特定的標志值。 */
        DT_ENCODING     DynTag = 32 /* 值大于或等于DT_ENCODING
           并且小于DT_LOOS遵循規(guī)則
           對d_un聯(lián)盟的解釋
           如下:even =='d_ptr',even =='d_val'
           或者沒有 */
        DT_PREINIT_ARRAY   DynTag = 32         /* 指向預初始化函數(shù)的指針數(shù)組的地址。 */
        DT_PREINIT_ARRAYSZ DynTag = 33         /* 預初始化函數(shù)數(shù)組的大?。ㄒ宰止?jié)為單位)。 */
        DT_LOOS            DynTag = 0x6000000d /* 第一個特定于操作系統(tǒng) */
        DT_HIOS            DynTag = 0x6ffff000 /* 最后一個特定于OS的 */
        DT_VERSYM          DynTag = 0x6ffffff0
        DT_VERNEED         DynTag = 0x6ffffffe
        DT_VERNEEDNUM      DynTag = 0x6fffffff
        DT_LOPROC          DynTag = 0x70000000 /* 第一種處理器特定類型。 */
        DT_HIPROC          DynTag = 0x7fffffff /* 最后一個處理器特定類型。 */)

func (DynTag) GoString

func (i DynTag) GoString() string

func (DynTag) String

func (i DynTag) String() string

type File

文件表示一個開放的 ELF 文件。

type File struct {
        FileHeader
        Sections []*Section
        Progs    []*Prog        // 包含過濾或未導出的字段}

func NewFile

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

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

func Open

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

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

func (*File) Close

func (f *File) Close() error

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

func (*File) DWARF

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

func (*File) DynString

func (f *File) DynString(tag DynTag) ([]string, error)

DynString 返回在文件的動態(tài)部分中為給定標簽列出的字符串。

標簽必須是一個接受字符串值的標簽:DT_NEEDED,DT_SONAME,DT_RPATH或DT_RUNPATH。

func (*File) DynamicSymbols

func (f *File) DynamicSymbols() ([]Symbol, error)

DynamicSymbols 返回 f 的動態(tài)符號表。符號將按照它們在 f 中出現(xiàn)的順序列出。

為了與符號兼容,DynamicSymbols 省略了索引 0 處的空符號。在將符號作為 symtab 檢索后,外部提供的索引 x 對應于 symtabx-1,而不是 symtabx。

func (*File) ImportedLibraries

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

ImportedLibraries 返回二進制文件f引用的所有庫的名稱,這些庫在動態(tài)鏈接時期預計將與二進制文件鏈接。

func (*File) ImportedSymbols

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

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

func (*File) Section

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

部分返回給定名稱的部分,如果不存在此部分,則返回 nil。

func (*File) SectionByType

func (f *File) SectionByType(typ SectionType) *Section

SectionByType 返回 f 中給定類型的第一個部分,如果沒有這個部分,則返回 nil。

func (*File) Symbols

func (f *File) Symbols() ([]Symbol, error)

符號返回 f 的符號表。符號將按照它們在 f 中出現(xiàn)的順序列出。

為了與 Go 1.0 兼容,Symbols 在索引0處省略了空符號。在將符號作為 symtab 檢索后,外部提供的索引 x 對應于 symtabx-1,而不是 symtabx。

type FileHeader

FileHeader 表示 ELF 文件頭。

type FileHeader struct {
        Class      Class
        Data       Data
        Version    Version
        OSABI      OSABI
        ABIVersion uint8
        ByteOrder  binary.ByteOrder
        Type       Type
        Machine    Machine
        Entry      uint64}

type FormatError

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

func (*FormatError) Error

func (e *FormatError) Error() string

type Header32

ELF32 文件頭。

type Header32 struct {
        Ident     [EI_NIDENT]byte /* 文件識別。 */
        Type      uint16          /* 文件類型。 */
        Machine   uint16          /* 機器架構(gòu)。 */
        Version   uint32          /* ELF格式版本。 */
        Entry     uint32          /* 入口點。 */
        Phoff     uint32          /* 程序頭文件偏移量。 */
        Shoff     uint32          /* 節(jié)頭文件偏移量。 */
        Flags     uint32          /* 特定于架構(gòu)的標志。 */
        Ehsize    uint16          /* ELF標題的大?。ㄒ宰止?jié)為單位)。 */
        Phentsize uint16          /* 程序頭條目的大小。 */
        Phnum     uint16          /* 程序頭條目數(shù)。 */
        Shentsize uint16          /* 節(jié)標題條目的大小。 */
        Shnum     uint16          /* 節(jié)頭條目的數(shù)量。 */
        Shstrndx  uint16          /* 節(jié)名稱字符串部分。 */}

type Header64

ELF64 文件頭。

type Header64 struct {
        Ident     [EI_NIDENT]byte /* 文件識別。 */
        Type      uint16          /* 文件類型。 */
        Machine   uint16          /* 機器架構(gòu)。 */
        Version   uint32          /* ELF格式版本。 */
        Entry     uint64          /* 入口點。*/
        Phoff     uint64          /* 程序頭文件偏移量。 */
        Shoff     uint64          /* 節(jié)頭文件偏移量。 */
        Flags     uint32          /* 特定于架構(gòu)的標志。 */
        Ehsize    uint16          /* ELF頭的大?。ㄒ宰止?jié)為單位)。 */
        Phentsize uint16          /* 程序頭條目的大小。*/
        Phnum     uint16          /* 程序頭條目數(shù)。 */
        Shentsize uint16          /* 節(jié)標題條目的大小。 */
        Shnum     uint16          /* 節(jié)頭條目的數(shù)量。 */
        Shstrndx  uint16          /* 節(jié)名稱字符串部分。 */}

type ImportedSymbol

type ImportedSymbol struct {
        Name    string
        Version string
        Library string}

type Machine

Machine 在 Header.Machine 中找到。

type Machine uint16
const (
        EM_NONE        Machine = 0   /* 未知機器*。/
        EM_M32         Machine = 1   /* AT&T WE32100。 */
        EM_SPARC       Machine = 2   /* Sun SPARC。 */
        EM_386         Machine = 3   /* Intel i386。 */
        EM_68K         Machine = 4   /* Motorola 68000。 */
        EM_88K         Machine = 5   /* Motorola 88000。 */
        EM_860         Machine = 7   /* Intel i860。 */
        EM_MIPS        Machine = 8   /* 僅限MIPS R3000 Big-Endian。 */
        EM_S370        Machine = 9   /* IBM System/370。 */
        EM_MIPS_RS3_LE Machine = 10  /* MIPS R3000 Little-Endian。 */
        EM_PARISC      Machine = 15  /* HP PA-RISC。 */
        EM_VPP500      Machine = 17  /* Fujitsu VPP500。 */
        EM_SPARC32PLUS Machine = 18  /* SPARC v8plus。 */
        EM_960         Machine = 19  /* Intel 80960。 */
        EM_PPC         Machine = 20  /* PowerPC 32-bit。 */
        EM_PPC64       Machine = 21  /* PowerPC 64-bit。 */
        EM_S390        Machine = 22  /* IBM System/390。 */
        EM_V800        Machine = 36  /* NEC V800。 */
        EM_FR20        Machine = 37  /* Fujitsu FR20。 */
        EM_RH32        Machine = 38  /* TRW RH-32。 */
        EM_RCE         Machine = 39  /* Motorola RCE。 */
        EM_ARM         Machine = 40  /* ARM。 */
        EM_SH          Machine = 42  /* Hitachi SH。 */
        EM_SPARCV9     Machine = 43  /* SPARC v9 64-bit。 */
        EM_TRICORE     Machine = 44  /* 西門子TriCore嵌入式處理器。 */
        EM_ARC         Machine = 45  /* Argonaut RISC Core。 */
        EM_H8_300      Machine = 46  /* Hitachi H8/300。 */
        EM_H8_300H     Machine = 47  /* Hitachi H8/300H。 */
        EM_H8S         Machine = 48  /* Hitachi H8S。 */
        EM_H8_500      Machine = 49  /* Hitachi H8/500。 */
        EM_IA_64       Machine = 50  /* Intel IA-64 Processor。 */
        EM_MIPS_X      Machine = 51  /* Stanford MIPS-X。 */
        EM_COLDFIRE    Machine = 52  /* Motorola ColdFire。 */
        EM_68HC12      Machine = 53  /* Motorola M68HC12。 */
        EM_MMA         Machine = 54  /* Fujitsu MMA。 */
        EM_PCP         Machine = 55  /* Siemens PCP。 */
        EM_NCPU        Machine = 56  /* Sony nCPU。 */
        EM_NDR1        Machine = 57  /* Denso NDR1微處理器。 */
        EM_STARCORE    Machine = 58  /* 摩托羅拉Star *Core 處理器。 */
        EM_ME16        Machine = 59  /* 豐田ME16處理器。 */
        EM_ST100       Machine = 60  /* STM半導體ST100處理器。 */
        EM_TINYJ       Machine = 61  /* Advanced Logic Corp. TinyJ處理器。 */
        EM_X86_64      Machine = 62  /* Advanced Micro Devices x86-64 */
        EM_AARCH64     Machine = 183 /* ARM 64-bit Architecture (AArch64) */        /* 非標準或已棄用。 */
        EM_486         Machine = 6      /* Intel i486. */
        EM_MIPS_RS4_BE Machine = 10     /* MIPS R4000 Big-Endian */
        EM_ALPHA_STD   Machine = 41     /* Digital Alpha(標準值)。 */
        EM_ALPHA       Machine = 0x9026 /* Alpha(在沒有ABI的情況下編寫) */)

func (Machine) GoString

func (i Machine) GoString() string

func (Machine) String

func (i Machine) String() string

type NType

NType 值;用于核心文件。

type NType int
const (
        NT_PRSTATUS NType = 1 /* 流程狀態(tài)。 */
        NT_FPREGSET NType = 2 /* 浮點寄存器。 */
        NT_PRPSINFO NType = 3 /* 處理狀態(tài)信息。 */)

func (NType) GoString

func (i NType) GoString() string

func (NType) String

func (i NType) String() string

type OSABI

OSABI 位于 Header.IdentEI_OSABI 和 Header.OSABI中。

type OSABI byte
const (
        ELFOSABI_NONE       OSABI = 0   /* UNIX系統(tǒng)V ABI */
        ELFOSABI_HPUX       OSABI = 1   /* HP-UX操作系統(tǒng) */
        ELFOSABI_NETBSD     OSABI = 2   /* NetBSD */
        ELFOSABI_LINUX      OSABI = 3   /* GNU/Linux */
        ELFOSABI_HURD       OSABI = 4   /* GNU/Hurd */
        ELFOSABI_86OPEN     OSABI = 5   /* 86Open common IA32 ABI */
        ELFOSABI_SOLARIS    OSABI = 6   /* Solaris */
        ELFOSABI_AIX        OSABI = 7   /* AIX */
        ELFOSABI_IRIX       OSABI = 8   /* IRIX */
        ELFOSABI_FREEBSD    OSABI = 9   /* FreeBSD */
        ELFOSABI_TRU64      OSABI = 10  /* TRU64 UNIX */
        ELFOSABI_MODESTO    OSABI = 11  /* Novell Modesto */
        ELFOSABI_OPENBSD    OSABI = 12  /* OpenBSD */
        ELFOSABI_OPENVMS    OSABI = 13  /* Open VMS */
        ELFOSABI_NSK        OSABI = 14  /* HP Non-Stop Kernel */
        ELFOSABI_ARM        OSABI = 97  /* ARM */
        ELFOSABI_STANDALONE OSABI = 255 /* 獨立(嵌入式)應用程序 */)

func (OSABI) GoString

func (i OSABI) GoString() string

func (OSABI) String

func (i OSABI) String() string

type Prog

Prog 表示 ELF 二進制文件中的單個ELF程序頭文件。

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

func (*Prog) Open

func (p *Prog) Open() io.ReadSeeker

Open 返回讀取ELF程序主體的新 ReadSeeker。

type Prog32

ELF32 程序標題。

type Prog32 struct {
        Type   uint32 /* 輸入類型。 */
        Off    uint32 /* 內(nèi)容的文件偏移量。 */
        Vaddr  uint32 /* 內(nèi)存映像中的虛擬地址。 */
        Paddr  uint32 /* 物理地址(未使用)。 */
        Filesz uint32 /* 文件中的內(nèi)容大小。 */
        Memsz  uint32 /* 內(nèi)存中的內(nèi)容大小。 */
        Flags  uint32 /* 訪問權(quán)限標志。 */
        Align  uint32 /* 內(nèi)存和文件中的對齊方式。 */}

type Prog64

ELF64程序標題。

type Prog64 struct {
        Type   uint32 /* 輸入類型。 */
        Flags  uint32 /* 訪問權(quán)限標志。 */
        Off    uint64 /* 內(nèi)容的文件偏移量。 */
        Vaddr  uint64 /* 內(nèi)存映像中的虛擬地址。 */
        Paddr  uint64 /* 物理地址(未使用)。 */
        Filesz uint64 /* 文件中的內(nèi)容大小。 */
        Memsz  uint64 /* 內(nèi)存中的內(nèi)容大小。 */
        Align  uint64 /* 內(nèi)存和文件中的對齊方式。 */}

type ProgFlag

Prog.Flag

type ProgFlag uint32
const (
        PF_X        ProgFlag = 0x1        /* 可執(zhí)行文件。 */
        PF_W        ProgFlag = 0x2        /* 可寫。 */
        PF_R        ProgFlag = 0x4        /* 可讀。 */
        PF_MASKOS   ProgFlag = 0x0ff00000 /* 特定于操作系統(tǒng)。 */
        PF_MASKPROC ProgFlag = 0xf0000000 /* 處理器特有的。 */)

func (ProgFlag) GoString

func (i ProgFlag) GoString() string

func (ProgFlag) String

func (i ProgFlag) String() string

type ProgHeader(查看源代碼)

ProgHeader 表示一個 ELF 程序標題。

type ProgHeader struct {
        Type   ProgType
        Flags  ProgFlag
        Off    uint64
        Vaddr  uint64
        Paddr  uint64
        Filesz uint64
        Memsz  uint64
        Align  uint64}

type ProgType

Prog.Type

type ProgType int
const (
        PT_NULL    ProgType = 0          /* 未使用的條目。 */
        PT_LOAD    ProgType = 1          /* 可裝載部分。 */
        PT_DYNAMIC ProgType = 2          /* 動態(tài)鏈接信息段。 */
        PT_INTERP  ProgType = 3          /* 直譯器的路徑名。 */
        PT_NOTE    ProgType = 4          /* 輔助信息。 */
        PT_SHLIB   ProgType = 5          /* 保留(未使用)。 */
        PT_PHDR    ProgType = 6          /* 程序標頭本身的位置。 */
        PT_TLS     ProgType = 7          /* 線程本地存儲段 */
        PT_LOOS    ProgType = 0x60000000 /* 第一個特定于操作系統(tǒng) */
        PT_HIOS    ProgType = 0x6fffffff /* 最后一個特定于OS的。 */
        PT_LOPROC  ProgType = 0x70000000 /* 第一種處理器特定類型。 */
        PT_HIPROC  ProgType = 0x7fffffff /* 最后一個處理器特定類型。 */)

func (ProgType) GoString

func (i ProgType) GoString() string

func (ProgType) String

func (i ProgType) String() string

type R_386

386重新安置類型。

type R_386 int
const (
        R_386_NONE         R_386 = 0  /* 沒有搬遷。 */
        R_386_32           R_386 = 1  /* 添加符號值。 */
        R_386_PC32         R_386 = 2  /* 添加PC相對符號值。 */
        R_386_GOT32        R_386 = 3  /* 添加PC相對GOT偏移量。 */
        R_386_PLT32        R_386 = 4  /* 添加PC相對PLT偏移量。 */
        R_386_COPY         R_386 = 5  /* 從共享對象復制數(shù)據(jù)。 */
        R_386_GLOB_DAT     R_386 = 6  /* 將GOT條目設(shè)置為數(shù)據(jù)地址。 */
        R_386_JMP_SLOT     R_386 = 7  /* 將GOT條目設(shè)置為代碼地址。 */
        R_386_RELATIVE     R_386 = 8  /* 添加共享對象的加載地址。 */
        R_386_GOTOFF       R_386 = 9  /* 添加GOT相對符號地址。 */
        R_386_GOTPC        R_386 = 10 /* 添加PC相對GOT表地址。 */
        R_386_TLS_TPOFF    R_386 = 14 /* 靜態(tài)TLS塊中的負偏移量 */
        R_386_TLS_IE       R_386 = 15 /* -ve static TLS的GOT絕對地址 */
        R_386_TLS_GOTIE    R_386 = 16 /* 負靜態(tài)TLS塊的GOT條目 */
        R_386_TLS_LE       R_386 = 17 /* 相對于靜態(tài)TLS的負偏移 */
        R_386_TLS_GD       R_386 = 18 /* GOT(index,off)對的32位偏移量 */
        R_386_TLS_LDM      R_386 = 19 /* 32位偏移到GOT(index,zero)對 */
        R_386_TLS_GD_32    R_386 = 24 /* GOT(索引,關(guān)閉)對的32位偏移量 */
        R_386_TLS_GD_PUSH  R_386 = 25 /* Sun ABI GD序列的pushl指令 */
        R_386_TLS_GD_CALL  R_386 = 26 /* Sun ABI GD序列的調(diào)用指令 */
        R_386_TLS_GD_POP   R_386 = 27 /* Sun ABI GD序列的popl指令 */
        R_386_TLS_LDM_32   R_386 = 28 /* 32位偏移到GOT(index,zero)對 */
        R_386_TLS_LDM_PUSH R_386 = 29 /* Sun ABI LD序列的pushl指令 */
        R_386_TLS_LDM_CALL R_386 = 30 /* Sun ABI LD序列的調(diào)用指令 */
        R_386_TLS_LDM_POP  R_386 = 31 /* Sun ABI LD序列的popl指令 */
        R_386_TLS_LDO_32   R_386 = 32 /* 從TLS塊開始的32位偏移 */
        R_386_TLS_IE_32    R_386 = 33 /* 到GOT靜態(tài)TLS偏移條目的32位偏移 */
        R_386_TLS_LE_32    R_386 = 34 /* 靜態(tài)TLS塊內(nèi)的32位偏移量 */
        R_386_TLS_DTPMOD32 R_386 = 35 /* 包含TLS索引的GOT條目 */
        R_386_TLS_DTPOFF32 R_386 = 36 /* 包含TLS偏移的GOT條目 */
        R_386_TLS_TPOFF32  R_386 = 37 /* GOT輸入-ve static TLS偏移量 */)

func (R_386) GoString

func (i R_386) GoString() string

func (R_386) String

func (i R_386) String() string

type R_390

s390x 處理器的重新分配類型。

type R_390 int
const (
        R_390_NONE        R_390 = 0
        R_390_8           R_390 = 1
        R_390_12          R_390 = 2
        R_390_16          R_390 = 3
        R_390_32          R_390 = 4
        R_390_PC32        R_390 = 5
        R_390_GOT12       R_390 = 6
        R_390_GOT32       R_390 = 7
        R_390_PLT32       R_390 = 8
        R_390_COPY        R_390 = 9
        R_390_GLOB_DAT    R_390 = 10
        R_390_JMP_SLOT    R_390 = 11
        R_390_RELATIVE    R_390 = 12
        R_390_GOTOFF      R_390 = 13
        R_390_GOTPC       R_390 = 14
        R_390_GOT16       R_390 = 15
        R_390_PC16        R_390 = 16
        R_390_PC16DBL     R_390 = 17
        R_390_PLT16DBL    R_390 = 18
        R_390_PC32DBL     R_390 = 19
        R_390_PLT32DBL    R_390 = 20
        R_390_GOTPCDBL    R_390 = 21
        R_390_64          R_390 = 22
        R_390_PC64        R_390 = 23
        R_390_GOT64       R_390 = 24
        R_390_PLT64       R_390 = 25
        R_390_GOTENT      R_390 = 26
        R_390_GOTOFF16    R_390 = 27
        R_390_GOTOFF64    R_390 = 28
        R_390_GOTPLT12    R_390 = 29
        R_390_GOTPLT16    R_390 = 30
        R_390_GOTPLT32    R_390 = 31
        R_390_GOTPLT64    R_390 = 32
        R_390_GOTPLTENT   R_390 = 33
        R_390_GOTPLTOFF16 R_390 = 34
        R_390_GOTPLTOFF32 R_390 = 35
        R_390_GOTPLTOFF64 R_390 = 36
        R_390_TLS_LOAD    R_390 = 37
        R_390_TLS_GDCALL  R_390 = 38
        R_390_TLS_LDCALL  R_390 = 39
        R_390_TLS_GD32    R_390 = 40
        R_390_TLS_GD64    R_390 = 41
        R_390_TLS_GOTIE12 R_390 = 42
        R_390_TLS_GOTIE32 R_390 = 43
        R_390_TLS_GOTIE64 R_390 = 44
        R_390_TLS_LDM32   R_390 = 45
        R_390_TLS_LDM64   R_390 = 46
        R_390_TLS_IE32    R_390 = 47
        R_390_TLS_IE64    R_390 = 48
        R_390_TLS_IEENT   R_390 = 49
        R_390_TLS_LE32    R_390 = 50
        R_390_TLS_LE64    R_390 = 51
        R_390_TLS_LDO32   R_390 = 52
        R_390_TLS_LDO64   R_390 = 53
        R_390_TLS_DTPMOD  R_390 = 54
        R_390_TLS_DTPOFF  R_390 = 55
        R_390_TLS_TPOFF   R_390 = 56
        R_390_20          R_390 = 57
        R_390_GOT20       R_390 = 58
        R_390_GOTPLT20    R_390 = 59
        R_390_TLS_GOTIE20 R_390 = 60)

func (R_390) GoString

func (i R_390) GoString() string

func (R_390) String

func (i R_390) String() string

type R_AARCH64

AArch64(aka arm64)的重定位類型

type R_AARCH64 int
const (
        R_AARCH64_NONE                            R_AARCH64 = 0
        R_AARCH64_P32_ABS32                       R_AARCH64 = 1
        R_AARCH64_P32_ABS16                       R_AARCH64 = 2
        R_AARCH64_P32_PREL32                      R_AARCH64 = 3
        R_AARCH64_P32_PREL16                      R_AARCH64 = 4
        R_AARCH64_P32_MOVW_UABS_G0                R_AARCH64 = 5
        R_AARCH64_P32_MOVW_UABS_G0_NC             R_AARCH64 = 6
        R_AARCH64_P32_MOVW_UABS_G1                R_AARCH64 = 7
        R_AARCH64_P32_MOVW_SABS_G0                R_AARCH64 = 8
        R_AARCH64_P32_LD_PREL_LO19                R_AARCH64 = 9
        R_AARCH64_P32_ADR_PREL_LO21               R_AARCH64 = 10
        R_AARCH64_P32_ADR_PREL_PG_HI21            R_AARCH64 = 11
        R_AARCH64_P32_ADD_ABS_LO12_NC             R_AARCH64 = 12
        R_AARCH64_P32_LDST8_ABS_LO12_NC           R_AARCH64 = 13
        R_AARCH64_P32_LDST16_ABS_LO12_NC          R_AARCH64 = 14
        R_AARCH64_P32_LDST32_ABS_LO12_NC          R_AARCH64 = 15
        R_AARCH64_P32_LDST64_ABS_LO12_NC          R_AARCH64 = 16
        R_AARCH64_P32_LDST128_ABS_LO12_NC         R_AARCH64 = 17
        R_AARCH64_P32_TSTBR14                     R_AARCH64 = 18
        R_AARCH64_P32_CONDBR19                    R_AARCH64 = 19
        R_AARCH64_P32_JUMP26                      R_AARCH64 = 20
        R_AARCH64_P32_CALL26                      R_AARCH64 = 21
        R_AARCH64_P32_GOT_LD_PREL19               R_AARCH64 = 25
        R_AARCH64_P32_ADR_GOT_PAGE                R_AARCH64 = 26
        R_AARCH64_P32_LD32_GOT_LO12_NC            R_AARCH64 = 27
        R_AARCH64_P32_TLSGD_ADR_PAGE21            R_AARCH64 = 81
        R_AARCH64_P32_TLSGD_ADD_LO12_NC           R_AARCH64 = 82
        R_AARCH64_P32_TLSIE_ADR_GOTTPREL_PAGE21   R_AARCH64 = 103
        R_AARCH64_P32_TLSIE_LD32_GOTTPREL_LO12_NC R_AARCH64 = 104
        R_AARCH64_P32_TLSIE_LD_GOTTPREL_PREL19    R_AARCH64 = 105
        R_AARCH64_P32_TLSLE_MOVW_TPREL_G1         R_AARCH64 = 106
        R_AARCH64_P32_TLSLE_MOVW_TPREL_G0         R_AARCH64 = 107
        R_AARCH64_P32_TLSLE_MOVW_TPREL_G0_NC      R_AARCH64 = 108
        R_AARCH64_P32_TLSLE_ADD_TPREL_HI12        R_AARCH64 = 109
        R_AARCH64_P32_TLSLE_ADD_TPREL_LO12        R_AARCH64 = 110
        R_AARCH64_P32_TLSLE_ADD_TPREL_LO12_NC     R_AARCH64 = 111
        R_AARCH64_P32_TLSDESC_LD_PREL19           R_AARCH64 = 122
        R_AARCH64_P32_TLSDESC_ADR_PREL21          R_AARCH64 = 123
        R_AARCH64_P32_TLSDESC_ADR_PAGE21          R_AARCH64 = 124
        R_AARCH64_P32_TLSDESC_LD32_LO12_NC        R_AARCH64 = 125
        R_AARCH64_P32_TLSDESC_ADD_LO12_NC         R_AARCH64 = 126
        R_AARCH64_P32_TLSDESC_CALL                R_AARCH64 = 127
        R_AARCH64_P32_COPY                        R_AARCH64 = 180
        R_AARCH64_P32_GLOB_DAT                    R_AARCH64 = 181
        R_AARCH64_P32_JUMP_SLOT                   R_AARCH64 = 182
        R_AARCH64_P32_RELATIVE                    R_AARCH64 = 183
        R_AARCH64_P32_TLS_DTPMOD                  R_AARCH64 = 184
        R_AARCH64_P32_TLS_DTPREL                  R_AARCH64 = 185
        R_AARCH64_P32_TLS_TPREL                   R_AARCH64 = 186
        R_AARCH64_P32_TLSDESC                     R_AARCH64 = 187
        R_AARCH64_P32_IRELATIVE                   R_AARCH64 = 188
        R_AARCH64_NULL                            R_AARCH64 = 256
        R_AARCH64_ABS64                           R_AARCH64 = 257
        R_AARCH64_ABS32                           R_AARCH64 = 258
        R_AARCH64_ABS16                           R_AARCH64 = 259
        R_AARCH64_PREL64                          R_AARCH64 = 260
        R_AARCH64_PREL32                          R_AARCH64 = 261
        R_AARCH64_PREL16                          R_AARCH64 = 262
        R_AARCH64_MOVW_UABS_G0                    R_AARCH64 = 263
        R_AARCH64_MOVW_UABS_G0_NC                 R_AARCH64 = 264
        R_AARCH64_MOVW_UABS_G1                    R_AARCH64 = 265
        R_AARCH64_MOVW_UABS_G1_NC                 R_AARCH64 = 266
        R_AARCH64_MOVW_UABS_G2                    R_AARCH64 = 267
        R_AARCH64_MOVW_UABS_G2_NC                 R_AARCH64 = 268
        R_AARCH64_MOVW_UABS_G3                    R_AARCH64 = 269
        R_AARCH64_MOVW_SABS_G0                    R_AARCH64 = 270
        R_AARCH64_MOVW_SABS_G1                    R_AARCH64 = 271
        R_AARCH64_MOVW_SABS_G2                    R_AARCH64 = 272
        R_AARCH64_LD_PREL_LO19                    R_AARCH64 = 273
        R_AARCH64_ADR_PREL_LO21                   R_AARCH64 = 274
        R_AARCH64_ADR_PREL_PG_HI21                R_AARCH64 = 275
        R_AARCH64_ADR_PREL_PG_HI21_NC             R_AARCH64 = 276
        R_AARCH64_ADD_ABS_LO12_NC                 R_AARCH64 = 277
        R_AARCH64_LDST8_ABS_LO12_NC               R_AARCH64 = 278
        R_AARCH64_TSTBR14                         R_AARCH64 = 279
        R_AARCH64_CONDBR19                        R_AARCH64 = 280
        R_AARCH64_JUMP26                          R_AARCH64 = 282
        R_AARCH64_CALL26                          R_AARCH64 = 283
        R_AARCH64_LDST16_ABS_LO12_NC              R_AARCH64 = 284
        R_AARCH64_LDST32_ABS_LO12_NC              R_AARCH64 = 285
        R_AARCH64_LDST64_ABS_LO12_NC              R_AARCH64 = 286
        R_AARCH64_LDST128_ABS_LO12_NC             R_AARCH64 = 299
        R_AARCH64_GOT_LD_PREL19                   R_AARCH64 = 309
        R_AARCH64_ADR_GOT_PAGE                    R_AARCH64 = 311
        R_AARCH64_LD64_GOT_LO12_NC                R_AARCH64 = 312
        R_AARCH64_TLSGD_ADR_PAGE21                R_AARCH64 = 513
        R_AARCH64_TLSGD_ADD_LO12_NC               R_AARCH64 = 514
        R_AARCH64_TLSIE_MOVW_GOTTPREL_G1          R_AARCH64 = 539
        R_AARCH64_TLSIE_MOVW_GOTTPREL_G0_NC       R_AARCH64 = 540
        R_AARCH64_TLSIE_ADR_GOTTPREL_PAGE21       R_AARCH64 = 541
        R_AARCH64_TLSIE_LD64_GOTTPREL_LO12_NC     R_AARCH64 = 542
        R_AARCH64_TLSIE_LD_GOTTPREL_PREL19        R_AARCH64 = 543
        R_AARCH64_TLSLE_MOVW_TPREL_G2             R_AARCH64 = 544
        R_AARCH64_TLSLE_MOVW_TPREL_G1             R_AARCH64 = 545
        R_AARCH64_TLSLE_MOVW_TPREL_G1_NC          R_AARCH64 = 546
        R_AARCH64_TLSLE_MOVW_TPREL_G0             R_AARCH64 = 547
        R_AARCH64_TLSLE_MOVW_TPREL_G0_NC          R_AARCH64 = 548
        R_AARCH64_TLSLE_ADD_TPREL_HI12            R_AARCH64 = 549
        R_AARCH64_TLSLE_ADD_TPREL_LO12            R_AARCH64 = 550
        R_AARCH64_TLSLE_ADD_TPREL_LO12_NC         R_AARCH64 = 551
        R_AARCH64_TLSDESC_LD_PREL19               R_AARCH64 = 560
        R_AARCH64_TLSDESC_ADR_PREL21              R_AARCH64 = 561
        R_AARCH64_TLSDESC_ADR_PAGE21              R_AARCH64 = 562
        R_AARCH64_TLSDESC_LD64_LO12_NC            R_AARCH64 = 563
        R_AARCH64_TLSDESC_ADD_LO12_NC             R_AARCH64 = 564
        R_AARCH64_TLSDESC_OFF_G1                  R_AARCH64 = 565
        R_AARCH64_TLSDESC_OFF_G0_NC               R_AARCH64 = 566
        R_AARCH64_TLSDESC_LDR                     R_AARCH64 = 567
        R_AARCH64_TLSDESC_ADD                     R_AARCH64 = 568
        R_AARCH64_TLSDESC_CALL                    R_AARCH64 = 569
        R_AARCH64_COPY                            R_AARCH64 = 1024
        R_AARCH64_GLOB_DAT                        R_AARCH64 = 1025
        R_AARCH64_JUMP_SLOT                       R_AARCH64 = 1026
        R_AARCH64_RELATIVE                        R_AARCH64 = 1027
        R_AARCH64_TLS_DTPMOD64                    R_AARCH64 = 1028
        R_AARCH64_TLS_DTPREL64                    R_AARCH64 = 1029
        R_AARCH64_TLS_TPREL64                     R_AARCH64 = 1030
        R_AARCH64_TLSDESC                         R_AARCH64 = 1031
        R_AARCH64_IRELATIVE                       R_AARCH64 = 1032)

func (R_AARCH64) GoString

func (i R_AARCH64) GoString() string

func (R_AARCH64) String

func (i R_AARCH64) String() string

type R_ALPHA

Alpha的重新分配類型。

type R_ALPHA int
const (
        R_ALPHA_NONE           R_ALPHA = 0  /* 沒有重新安置 */
        R_ALPHA_REFLONG        R_ALPHA = 1  /* Direct 32 bit */
        R_ALPHA_REFQUAD        R_ALPHA = 2  /* Direct 64 bit */
        R_ALPHA_GPREL32        R_ALPHA = 3  /* GP相對32位 */
        R_ALPHA_LITERAL        R_ALPHA = 4  /* GP相對16位w/optimization */
        R_ALPHA_LITUSE         R_ALPHA = 5  /* LITERAL的優(yōu)化提示 */
        R_ALPHA_GPDISP         R_ALPHA = 6  /* 向GP添加排量 */
        R_ALPHA_BRADDR         R_ALPHA = 7  /* PC + 4相對23位移位 */
        R_ALPHA_HINT           R_ALPHA = 8  /* PC + 4相對16位移位 */
        R_ALPHA_SREL16         R_ALPHA = 9  /* PC相對16位 */
        R_ALPHA_SREL32         R_ALPHA = 10 /* PC相對32位 */
        R_ALPHA_SREL64         R_ALPHA = 11 /* PC相對64位 */
        R_ALPHA_OP_PUSH        R_ALPHA = 12 /* OP堆棧推送 */
        R_ALPHA_OP_STORE       R_ALPHA = 13 /* OP堆棧彈出和存儲 */
        R_ALPHA_OP_PSUB        R_ALPHA = 14 /* OP堆棧減法 */
        R_ALPHA_OP_PRSHIFT     R_ALPHA = 15 /* OP堆棧右移 */
        R_ALPHA_GPVALUE        R_ALPHA = 16
        R_ALPHA_GPRELHIGH      R_ALPHA = 17
        R_ALPHA_GPRELLOW       R_ALPHA = 18
        R_ALPHA_IMMED_GP_16    R_ALPHA = 19
        R_ALPHA_IMMED_GP_HI32  R_ALPHA = 20
        R_ALPHA_IMMED_SCN_HI32 R_ALPHA = 21
        R_ALPHA_IMMED_BR_HI32  R_ALPHA = 22
        R_ALPHA_IMMED_LO32     R_ALPHA = 23
        R_ALPHA_COPY           R_ALPHA = 24 /* 在運行時復制符號 */
        R_ALPHA_GLOB_DAT       R_ALPHA = 25 /* 創(chuàng)建GOT條目 */
        R_ALPHA_JMP_SLOT       R_ALPHA = 26 /* 創(chuàng)建PLT條目 */
        R_ALPHA_RELATIVE       R_ALPHA = 27 /* 按程序庫調(diào)整 */)

func (R_ALPHA) GoString

func (i R_ALPHA) GoString() string

func (R_ALPHA) String

func (i R_ALPHA) String() string

type R_ARM

為 ARM 重新分配類型。

type R_ARM int
const (
        R_ARM_NONE          R_ARM = 0 /* 沒有遷移。 */
        R_ARM_PC24          R_ARM = 1
        R_ARM_ABS32         R_ARM = 2
        R_ARM_REL32         R_ARM = 3
        R_ARM_PC13          R_ARM = 4
        R_ARM_ABS16         R_ARM = 5
        R_ARM_ABS12         R_ARM = 6
        R_ARM_THM_ABS5      R_ARM = 7
        R_ARM_ABS8          R_ARM = 8
        R_ARM_SBREL32       R_ARM = 9
        R_ARM_THM_PC22      R_ARM = 10
        R_ARM_THM_PC8       R_ARM = 11
        R_ARM_AMP_VCALL9    R_ARM = 12
        R_ARM_SWI24         R_ARM = 13
        R_ARM_THM_SWI8      R_ARM = 14
        R_ARM_XPC25         R_ARM = 15
        R_ARM_THM_XPC22     R_ARM = 16
        R_ARM_COPY          R_ARM = 20 /* 從共享對象復制數(shù)據(jù)。 */
        R_ARM_GLOB_DAT      R_ARM = 21 /* 將GOT條目設(shè)置為數(shù)據(jù)地址。 */
        R_ARM_JUMP_SLOT     R_ARM = 22 /* 將GOT條目設(shè)置為代碼地址。 */
        R_ARM_RELATIVE      R_ARM = 23 /* 添加共享對象的加載地址。 */
        R_ARM_GOTOFF        R_ARM = 24 /* 添加GOT相對符號地址。 */
        R_ARM_GOTPC         R_ARM = 25 /* 添加PC相對GOT表地址。 */
        R_ARM_GOT32         R_ARM = 26 /* 添加PC相對GOT偏移量。 */
        R_ARM_PLT32         R_ARM = 27 /* 添加PC相對PLT偏移量。 */
        R_ARM_GNU_VTENTRY   R_ARM = 100
        R_ARM_GNU_VTINHERIT R_ARM = 101
        R_ARM_RSBREL32      R_ARM = 250
        R_ARM_THM_RPC22     R_ARM = 251
        R_ARM_RREL32        R_ARM = 252
        R_ARM_RABS32        R_ARM = 253
        R_ARM_RPC24         R_ARM = 254
        R_ARM_RBASE         R_ARM = 255)

func (R_ARM) GoString

func (i R_ARM) GoString() string

func (R_ARM) String

func (i R_ARM) String() string

type R_MIPS

為 MIPS 重新安置類型。

type R_MIPS int
const (
        R_MIPS_NONE          R_MIPS = 0
        R_MIPS_16            R_MIPS = 1
        R_MIPS_32            R_MIPS = 2
        R_MIPS_REL32         R_MIPS = 3
        R_MIPS_26            R_MIPS = 4
        R_MIPS_HI16          R_MIPS = 5  /* 高16位的符號值 */
        R_MIPS_LO16          R_MIPS = 6  /* 低16位符號值 */
        R_MIPS_GPREL16       R_MIPS = 7  /* GP相對參考  */
        R_MIPS_LITERAL       R_MIPS = 8  /* 參考文字部分  */
        R_MIPS_GOT16         R_MIPS = 9  /* 引用全局偏移表 */
        R_MIPS_PC16          R_MIPS = 10 /* 16位PC相對參考 */
        R_MIPS_CALL16        R_MIPS = 11 /* 通過全局偏移表進行16位調(diào)用 */
        R_MIPS_GPREL32       R_MIPS = 12
        R_MIPS_SHIFT5        R_MIPS = 16
        R_MIPS_SHIFT6        R_MIPS = 17
        R_MIPS_64            R_MIPS = 18
        R_MIPS_GOT_DISP      R_MIPS = 19
        R_MIPS_GOT_PAGE      R_MIPS = 20
        R_MIPS_GOT_OFST      R_MIPS = 21
        R_MIPS_GOT_HI16      R_MIPS = 22
        R_MIPS_GOT_LO16      R_MIPS = 23
        R_MIPS_SUB           R_MIPS = 24
        R_MIPS_INSERT_A      R_MIPS = 25
        R_MIPS_INSERT_B      R_MIPS = 26
        R_MIPS_DELETE        R_MIPS = 27
        R_MIPS_HIGHER        R_MIPS = 28
        R_MIPS_HIGHEST       R_MIPS = 29
        R_MIPS_CALL_HI16     R_MIPS = 30
        R_MIPS_CALL_LO16     R_MIPS = 31
        R_MIPS_SCN_DISP      R_MIPS = 32
        R_MIPS_REL16         R_MIPS = 33
        R_MIPS_ADD_IMMEDIATE R_MIPS = 34
        R_MIPS_PJUMP         R_MIPS = 35
        R_MIPS_RELGOT        R_MIPS = 36
        R_MIPS_JALR          R_MIPS = 37

        R_MIPS_TLS_DTPMOD32    R_MIPS = 38 /* 模塊編號32位 */
        R_MIPS_TLS_DTPREL32    R_MIPS = 39 /* 模塊相對偏移32位 */
        R_MIPS_TLS_DTPMOD64    R_MIPS = 40 /* 模塊編號64位 */
        R_MIPS_TLS_DTPREL64    R_MIPS = 41 /* 模塊相對偏移64位 */
        R_MIPS_TLS_GD          R_MIPS = 42 /* GD的16位GOT偏移 */
        R_MIPS_TLS_LDM         R_MIPS = 43 /* LDM的16位GOT偏移 */
        R_MIPS_TLS_DTPREL_HI16 R_MIPS = 44 /* 模塊相對偏移,高16位 */
        R_MIPS_TLS_DTPREL_LO16 R_MIPS = 45 /* 模塊相對偏移,低16位 */
        R_MIPS_TLS_GOTTPREL    R_MIPS = 46 /* IE的16位GOT偏移 */
        R_MIPS_TLS_TPREL32     R_MIPS = 47 /* TP相對偏移,32位 */
        R_MIPS_TLS_TPREL64     R_MIPS = 48 /* TP相對偏移,64位 */
        R_MIPS_TLS_TPREL_HI16  R_MIPS = 49 /* TP相對偏移,高16位 */
        R_MIPS_TLS_TPREL_LO16  R_MIPS = 50 /* TP相對偏移,低16位 */)

func (R_MIPS) GoString

func (i R_MIPS) GoString() string

func (R_MIPS) String

func (i R_MIPS) String() string

type R_PPC

為PowerPC重新分配類型。

type R_PPC int
const (
        R_PPC_NONE            R_PPC = 0 /* 沒有搬遷。 */
        R_PPC_ADDR32          R_PPC = 1
        R_PPC_ADDR24          R_PPC = 2
        R_PPC_ADDR16          R_PPC = 3
        R_PPC_ADDR16_LO       R_PPC = 4
        R_PPC_ADDR16_HI       R_PPC = 5
        R_PPC_ADDR16_HA       R_PPC = 6
        R_PPC_ADDR14          R_PPC = 7
        R_PPC_ADDR14_BRTAKEN  R_PPC = 8
        R_PPC_ADDR14_BRNTAKEN R_PPC = 9
        R_PPC_REL24           R_PPC = 10
        R_PPC_REL14           R_PPC = 11
        R_PPC_REL14_BRTAKEN   R_PPC = 12
        R_PPC_REL14_BRNTAKEN  R_PPC = 13
        R_PPC_GOT16           R_PPC = 14
        R_PPC_GOT16_LO        R_PPC = 15
        R_PPC_GOT16_HI        R_PPC = 16
        R_PPC_GOT16_HA        R_PPC = 17
        R_PPC_PLTREL24        R_PPC = 18
        R_PPC_COPY            R_PPC = 19
        R_PPC_GLOB_DAT        R_PPC = 20
        R_PPC_JMP_SLOT        R_PPC = 21
        R_PPC_RELATIVE        R_PPC = 22
        R_PPC_LOCAL24PC       R_PPC = 23
        R_PPC_UADDR32         R_PPC = 24
        R_PPC_UADDR16         R_PPC = 25
        R_PPC_REL32           R_PPC = 26
        R_PPC_PLT32           R_PPC = 27
        R_PPC_PLTREL32        R_PPC = 28
        R_PPC_PLT16_LO        R_PPC = 29
        R_PPC_PLT16_HI        R_PPC = 30
        R_PPC_PLT16_HA        R_PPC = 31
        R_PPC_SDAREL16        R_PPC = 32
        R_PPC_SECTOFF         R_PPC = 33
        R_PPC_SECTOFF_LO      R_PPC = 34
        R_PPC_SECTOFF_HI      R_PPC = 35
        R_PPC_SECTOFF_HA      R_PPC = 36
        R_PPC_TLS             R_PPC = 67
        R_PPC_DTPMOD32        R_PPC = 68
        R_PPC_TPREL16         R_PPC = 69
        R_PPC_TPREL16_LO      R_PPC = 70
        R_PPC_TPREL16_HI      R_PPC = 71
        R_PPC_TPREL16_HA      R_PPC = 72
        R_PPC_TPREL32         R_PPC = 73
        R_PPC_DTPREL16        R_PPC = 74
        R_PPC_DTPREL16_LO     R_PPC = 75
        R_PPC_DTPREL16_HI     R_PPC = 76
        R_PPC_DTPREL16_HA     R_PPC = 77
        R_PPC_DTPREL32        R_PPC = 78
        R_PPC_GOT_TLSGD16     R_PPC = 79
        R_PPC_GOT_TLSGD16_LO  R_PPC = 80
        R_PPC_GOT_TLSGD16_HI  R_PPC = 81
        R_PPC_GOT_TLSGD16_HA  R_PPC = 82
        R_PPC_GOT_TLSLD16     R_PPC = 83
        R_PPC_GOT_TLSLD16_LO  R_PPC = 84
        R_PPC_GOT_TLSLD16_HI  R_PPC = 85
        R_PPC_GOT_TLSLD16_HA  R_PPC = 86
        R_PPC_GOT_TPREL16     R_PPC = 87
        R_PPC_GOT_TPREL16_LO  R_PPC = 88
        R_PPC_GOT_TPREL16_HI  R_PPC = 89
        R_PPC_GOT_TPREL16_HA  R_PPC = 90
        R_PPC_EMB_NADDR32     R_PPC = 101
        R_PPC_EMB_NADDR16     R_PPC = 102
        R_PPC_EMB_NADDR16_LO  R_PPC = 103
        R_PPC_EMB_NADDR16_HI  R_PPC = 104
        R_PPC_EMB_NADDR16_HA  R_PPC = 105
        R_PPC_EMB_SDAI16      R_PPC = 106
        R_PPC_EMB_SDA2I16     R_PPC = 107
        R_PPC_EMB_SDA2REL     R_PPC = 108
        R_PPC_EMB_SDA21       R_PPC = 109
        R_PPC_EMB_MRKREF      R_PPC = 110
        R_PPC_EMB_RELSEC16    R_PPC = 111
        R_PPC_EMB_RELST_LO    R_PPC = 112
        R_PPC_EMB_RELST_HI    R_PPC = 113
        R_PPC_EMB_RELST_HA    R_PPC = 114
        R_PPC_EMB_BIT_FLD     R_PPC = 115
        R_PPC_EMB_RELSDA      R_PPC = 116)

func (R_PPC) GoString

func (i R_PPC) GoString() string

func (R_PPC) String

func (i R_PPC) String() string

type R_PPC64

64位PowerPC 或 Power Architecture 處理器重新分配類型。

type R_PPC64 int
const (
        R_PPC64_NONE               R_PPC64 = 0
        R_PPC64_ADDR32             R_PPC64 = 1
        R_PPC64_ADDR24             R_PPC64 = 2
        R_PPC64_ADDR16             R_PPC64 = 3
        R_PPC64_ADDR16_LO          R_PPC64 = 4
        R_PPC64_ADDR16_HI          R_PPC64 = 5
        R_PPC64_ADDR16_HA          R_PPC64 = 6
        R_PPC64_ADDR14             R_PPC64 = 7
        R_PPC64_ADDR14_BRTAKEN     R_PPC64 = 8
        R_PPC64_ADDR14_BRNTAKEN    R_PPC64 = 9
        R_PPC64_REL24              R_PPC64 = 10
        R_PPC64_REL14              R_PPC64 = 11
        R_PPC64_REL14_BRTAKEN      R_PPC64 = 12
        R_PPC64_REL14_BRNTAKEN     R_PPC64 = 13
        R_PPC64_GOT16              R_PPC64 = 14
        R_PPC64_GOT16_LO           R_PPC64 = 15
        R_PPC64_GOT16_HI           R_PPC64 = 16
        R_PPC64_GOT16_HA           R_PPC64 = 17
        R_PPC64_JMP_SLOT           R_PPC64 = 21
        R_PPC64_REL32              R_PPC64 = 26
        R_PPC64_ADDR64             R_PPC64 = 38
        R_PPC64_ADDR16_HIGHER      R_PPC64 = 39
        R_PPC64_ADDR16_HIGHERA     R_PPC64 = 40
        R_PPC64_ADDR16_HIGHEST     R_PPC64 = 41
        R_PPC64_ADDR16_HIGHESTA    R_PPC64 = 42
        R_PPC64_REL64              R_PPC64 = 44
        R_PPC64_TOC16              R_PPC64 = 47
        R_PPC64_TOC16_LO           R_PPC64 = 48
        R_PPC64_TOC16_HI           R_PPC64 = 49
        R_PPC64_TOC16_HA           R_PPC64 = 50
        R_PPC64_TOC                R_PPC64 = 51
        R_PPC64_ADDR16_DS          R_PPC64 = 56
        R_PPC64_ADDR16_LO_DS       R_PPC64 = 57
        R_PPC64_GOT16_DS           R_PPC64 = 58
        R_PPC64_GOT16_LO_DS        R_PPC64 = 59
        R_PPC64_TOC16_DS           R_PPC64 = 63
        R_PPC64_TOC16_LO_DS        R_PPC64 = 64
        R_PPC64_TLS                R_PPC64 = 67
        R_PPC64_DTPMOD64           R_PPC64 = 68
        R_PPC64_TPREL16            R_PPC64 = 69
        R_PPC64_TPREL16_LO         R_PPC64 = 70
        R_PPC64_TPREL16_HI         R_PPC64 = 71
        R_PPC64_TPREL16_HA         R_PPC64 = 72
        R_PPC64_TPREL64            R_PPC64 = 73
        R_PPC64_DTPREL16           R_PPC64 = 74
        R_PPC64_DTPREL16_LO        R_PPC64 = 75
        R_PPC64_DTPREL16_HI        R_PPC64 = 76
        R_PPC64_DTPREL16_HA        R_PPC64 = 77
        R_PPC64_DTPREL64           R_PPC64 = 78
        R_PPC64_GOT_TLSGD16        R_PPC64 = 79
        R_PPC64_GOT_TLSGD16_LO     R_PPC64 = 80
        R_PPC64_GOT_TLSGD16_HI     R_PPC64 = 81
        R_PPC64_GOT_TLSGD16_HA     R_PPC64 = 82
        R_PPC64_GOT_TLSLD16        R_PPC64 = 83
        R_PPC64_GOT_TLSLD16_LO     R_PPC64 = 84
        R_PPC64_GOT_TLSLD16_HI     R_PPC64 = 85
        R_PPC64_GOT_TLSLD16_HA     R_PPC64 = 86
        R_PPC64_GOT_TPREL16_DS     R_PPC64 = 87
        R_PPC64_GOT_TPREL16_LO_DS  R_PPC64 = 88
        R_PPC64_GOT_TPREL16_HI     R_PPC64 = 89
        R_PPC64_GOT_TPREL16_HA     R_PPC64 = 90
        R_PPC64_GOT_DTPREL16_DS    R_PPC64 = 91
        R_PPC64_GOT_DTPREL16_LO_DS R_PPC64 = 92
        R_PPC64_GOT_DTPREL16_HI    R_PPC64 = 93
        R_PPC64_GOT_DTPREL16_HA    R_PPC64 = 94
        R_PPC64_TPREL16_DS         R_PPC64 = 95
        R_PPC64_TPREL16_LO_DS      R_PPC64 = 96
        R_PPC64_TPREL16_HIGHER     R_PPC64 = 97
        R_PPC64_TPREL16_HIGHERA    R_PPC64 = 98
        R_PPC64_TPREL16_HIGHEST    R_PPC64 = 99
        R_PPC64_TPREL16_HIGHESTA   R_PPC64 = 100
        R_PPC64_DTPREL16_DS        R_PPC64 = 101
        R_PPC64_DTPREL16_LO_DS     R_PPC64 = 102
        R_PPC64_DTPREL16_HIGHER    R_PPC64 = 103
        R_PPC64_DTPREL16_HIGHERA   R_PPC64 = 104
        R_PPC64_DTPREL16_HIGHEST   R_PPC64 = 105
        R_PPC64_DTPREL16_HIGHESTA  R_PPC64 = 106
        R_PPC64_TLSGD              R_PPC64 = 107
        R_PPC64_TLSLD              R_PPC64 = 108
        R_PPC64_REL16              R_PPC64 = 249
        R_PPC64_REL16_LO           R_PPC64 = 250
        R_PPC64_REL16_HI           R_PPC64 = 251
        R_PPC64_REL16_HA           R_PPC64 = 252)

func (R_PPC64) GoString

func (i R_PPC64) GoString() string

func (R_PPC64) String

func (i R_PPC64) String() string

type R_SPARC

SPARC 重新分配類型。

type R_SPARC int
const (
        R_SPARC_NONE     R_SPARC = 0
        R_SPARC_8        R_SPARC = 1
        R_SPARC_16       R_SPARC = 2
        R_SPARC_32       R_SPARC = 3
        R_SPARC_DISP8    R_SPARC = 4
        R_SPARC_DISP16   R_SPARC = 5
        R_SPARC_DISP32   R_SPARC = 6
        R_SPARC_WDISP30  R_SPARC = 7
        R_SPARC_WDISP22  R_SPARC = 8
        R_SPARC_HI22     R_SPARC = 9
        R_SPARC_22       R_SPARC = 10
        R_SPARC_13       R_SPARC = 11
        R_SPARC_LO10     R_SPARC = 12
        R_SPARC_GOT10    R_SPARC = 13
        R_SPARC_GOT13    R_SPARC = 14
        R_SPARC_GOT22    R_SPARC = 15
        R_SPARC_PC10     R_SPARC = 16
        R_SPARC_PC22     R_SPARC = 17
        R_SPARC_WPLT30   R_SPARC = 18
        R_SPARC_COPY     R_SPARC = 19
        R_SPARC_GLOB_DAT R_SPARC = 20
        R_SPARC_JMP_SLOT R_SPARC = 21
        R_SPARC_RELATIVE R_SPARC = 22
        R_SPARC_UA32     R_SPARC = 23
        R_SPARC_PLT32    R_SPARC = 24
        R_SPARC_HIPLT22  R_SPARC = 25
        R_SPARC_LOPLT10  R_SPARC = 26
        R_SPARC_PCPLT32  R_SPARC = 27
        R_SPARC_PCPLT22  R_SPARC = 28
        R_SPARC_PCPLT10  R_SPARC = 29
        R_SPARC_10       R_SPARC = 30
        R_SPARC_11       R_SPARC = 31
        R_SPARC_64       R_SPARC = 32
        R_SPARC_OLO10    R_SPARC = 33
        R_SPARC_HH22     R_SPARC = 34
        R_SPARC_HM10     R_SPARC = 35
        R_SPARC_LM22     R_SPARC = 36
        R_SPARC_PC_HH22  R_SPARC = 37
        R_SPARC_PC_HM10  R_SPARC = 38
        R_SPARC_PC_LM22  R_SPARC = 39
        R_SPARC_WDISP16  R_SPARC = 40
        R_SPARC_WDISP19  R_SPARC = 41
        R_SPARC_GLOB_JMP R_SPARC = 42
        R_SPARC_7        R_SPARC = 43
        R_SPARC_5        R_SPARC = 44
        R_SPARC_6        R_SPARC = 45
        R_SPARC_DISP64   R_SPARC = 46
        R_SPARC_PLT64    R_SPARC = 47
        R_SPARC_HIX22    R_SPARC = 48
        R_SPARC_LOX10    R_SPARC = 49
        R_SPARC_H44      R_SPARC = 50
        R_SPARC_M44      R_SPARC = 51
        R_SPARC_L44      R_SPARC = 52
        R_SPARC_REGISTER R_SPARC = 53
        R_SPARC_UA64     R_SPARC = 54
        R_SPARC_UA16     R_SPARC = 55)

func (R_SPARC) GoString

func (i R_SPARC) GoString() string

func (R_SPARC) String

func (i R_SPARC) String() string

type R_X86_64

x86-64 重新分配類型。

type R_X86_64 int
const (
        R_X86_64_NONE     R_X86_64 = 0  /* 沒有搬遷。 */
        R_X86_64_64       R_X86_64 = 1  /* 添加64位符號值。 */
        R_X86_64_PC32     R_X86_64 = 2  /* PC相對32位簽名sym值。 */
        R_X86_64_GOT32    R_X86_64 = 3  /* PC相對32位GOT偏移。 */
        R_X86_64_PLT32    R_X86_64 = 4  /* PC相對32位PLT偏移。 */
        R_X86_64_COPY     R_X86_64 = 5  /* 從共享對象復制數(shù)據(jù)。 */
        R_X86_64_GLOB_DAT R_X86_64 = 6  /* 將GOT條目設(shè)置為數(shù)據(jù)地址。 */
        R_X86_64_JMP_SLOT R_X86_64 = 7  /* 將GOT條目設(shè)置為代碼地址。 */
        R_X86_64_RELATIVE R_X86_64 = 8  /* 添加共享對象的加載地址。 */
        R_X86_64_GOTPCREL R_X86_64 = 9  /* 將32位帶符號的pcrel偏移量添加到GOT。 */
        R_X86_64_32       R_X86_64 = 10 /* 添加32位零擴展符號值 */
        R_X86_64_32S      R_X86_64 = 11 /* 添加32位符號擴展符號值 */
        R_X86_64_16       R_X86_64 = 12 /* 添加16位零擴展符號值 */
        R_X86_64_PC16     R_X86_64 = 13 /* 添加16位帶符號的擴展pc相對符號值 */
        R_X86_64_8        R_X86_64 = 14 /* 添加8位零擴展符號值 */
        R_X86_64_PC8      R_X86_64 = 15 /* 添加8位帶符號的擴展pc相對符號值 */
        R_X86_64_DTPMOD64 R_X86_64 = 16 /* 包含符號的模塊的ID */
        R_X86_64_DTPOFF64 R_X86_64 = 17 /* TLS塊中的偏移量 */
        R_X86_64_TPOFF64  R_X86_64 = 18 /* TLS塊中的偏移量 */
        R_X86_64_TLSGD    R_X86_64 = 19 /* PC相對偏移到GD GOT條目 */
        R_X86_64_TLSLD    R_X86_64 = 20 /* PC相對偏移到LD GOT條目 */
        R_X86_64_DTPOFF32 R_X86_64 = 21 /* TLS塊中的偏移量 */
        R_X86_64_GOTTPOFF R_X86_64 = 22 /* IE相對偏移到IE GOT條目 */
        R_X86_64_TPOFF32  R_X86_64 = 23 /* 靜態(tài)TLS塊中的偏移量 */)

func (R_X86_64) GoString

func (i R_X86_64) GoString() string

func (R_X86_64) String

func (i R_X86_64) String() string

type Rel32

ELF32 不需要加數(shù)字段的重定位。

type Rel32 struct {
        Off  uint32 /* 要重新安置的位置。 */
        Info uint32 /* 重定位類型和符號索引。 */}

type Rel64

不需要加數(shù)字段的 ELF64 重定位。

type Rel64 struct {
        Off  uint64 /* 要重新安置的位置。 */
        Info uint64 /* 重定位類型和符號索引。 */}

type Rela32

需要加數(shù)字段的 ELF32 重定位。

type Rela32 struct {
        Off    uint32 /* 要重新安置的位置。 */
        Info   uint32 /* 重定位類型和符號索引。 */
        Addend int32  /* 加數(shù)。 */}

type Rela64

需要加數(shù)字段的 ELF64 重定位。

type Rela64 struct {
        Off    uint64 /* 要重新安置的位置。 */
        Info   uint64 /* 重定位類型和符號索引。 */
        Addend int64  /* 加數(shù)。 */}

type Section

Section 代表 ELF 文件中的單個節(jié)。

type Section struct {
        SectionHeader        // 為ReadAt方法嵌入ReaderAt。        // 不要直接嵌入SectionReader        // 避免閱讀和尋求。        // 如果客戶想要閱讀和尋求它必須使用        // Open() 避免爭奪尋求抵消        // 與其他客戶端。        //        // 如果該部分不容易獲得,ReaderAt可能為零        // 以隨機訪問形式。 例如,壓縮部分        // 可能沒有閱讀器。
        io.ReaderAt        // 包含過濾或未導出的字段}

func (*Section) Data

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

數(shù)據(jù)讀取并返回 ELF 部分的內(nèi)容。即使該部分被壓縮存儲在ELF文件中,數(shù)據(jù)也會返回未壓縮的數(shù)據(jù)。

func (*Section) Open

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

Open 返回讀取 ELF 部分的新 ReadSeeker。即使該部分被壓縮存儲在 ELF 文件中,ReadSeeker 也會讀取未壓縮的數(shù)據(jù)。

type Section32

ELF32 部分標題。

type Section32 struct {
        Name      uint32 /* 節(jié)名稱(節(jié)標題字符串表的索引)。 */
        Type      uint32 /* 節(jié)類型。 */
        Flags     uint32 /* 節(jié)標志。 */
        Addr      uint32 /* 內(nèi)存映像中的地址。 */
        Off       uint32 /* 文件中的偏移量。 */
        Size      uint32 /* 大小以字節(jié)為單位 */
        Link      uint32 /* 相關(guān)部分的索引。 */
        Info      uint32 /* 取決于部分類型。 */
        Addralign uint32 /* 以字節(jié)為單位對齊。 */
        Entsize   uint32 /* 部分中每個條目的大小。 */}

type Section64

ELF64 部分標題。

type Section64 struct {
        Name      uint32 /* 節(jié)名稱(節(jié)標題字符串表的索引)。 */
        Type      uint32 /* 節(jié)類型。 */
        Flags     uint64 /* 節(jié)標志。 */
        Addr      uint64 /* 內(nèi)存映像中的地址。 */
        Off       uint64 /* 文件中的偏移量。 */
        Size      uint64 /* 大小以字節(jié)為單位 */
        Link      uint32 /* 相關(guān)部分的索引。 */
        Info      uint32 /* 取決于部分類型。 */
        Addralign uint64 /* 以字節(jié)為單位對齊。 */
        Entsize   uint64 /* 部分中每個條目的大小。*/}

type SectionFlag

節(jié)標志。

type SectionFlag uint32
const (
        SHF_WRITE            SectionFlag = 0x1        /* 節(jié)包含可寫數(shù)據(jù)。 */
        SHF_ALLOC            SectionFlag = 0x2        /* 節(jié)占據(jù)記憶。 */
        SHF_EXECINSTR        SectionFlag = 0x4        /* 節(jié)包含說明。 */
        SHF_MERGE            SectionFlag = 0x10       /* 節(jié)可以合并。 */
        SHF_STRINGS          SectionFlag = 0x20       /* 節(jié)包含字符串。 */
        SHF_INFO_LINK        SectionFlag = 0x40       /* sh_info保存部分索引。 */
        SHF_LINK_ORDER       SectionFlag = 0x80       /* 特殊訂購要求。 */
        SHF_OS_NONCONFORMING SectionFlag = 0x100      /* 需要特定于OS的處理。 */
        SHF_GROUP            SectionFlag = 0x200      /* 節(jié)組成員。 */
        SHF_TLS              SectionFlag = 0x400      /* 節(jié)包含TLS數(shù)據(jù)。 */
        SHF_COMPRESSED       SectionFlag = 0x800      /* 節(jié)是壓縮的。 */
        SHF_MASKOS           SectionFlag = 0x0ff00000 /* 特定于操作系統(tǒng)的語義。 */
        SHF_MASKPROC         SectionFlag = 0xf0000000 /* 特定于處理器的語義。 */)

func (SectionFlag) GoString

func (i SectionFlag) GoString() string

func (SectionFlag) String

func (i SectionFlag) String() string

type SectionHeader

SectionHeader 表示單個 ELF 節(jié)標題。

type SectionHeader struct {
        Name      string
        Type      SectionType
        Flags     SectionFlag
        Addr      uint64
        Offset    uint64
        Size      uint64
        Link      uint32
        Info      uint32
        Addralign uint64
        Entsize   uint64        // FileSize是文件中此部分的大?。ㄒ宰止?jié)為單位)。        // 如果某個部分被壓縮,則FileSize的大小為        // 壓縮數(shù)據(jù),而Size(上面)是大小
        FileSize uint64}

type SectionIndex

特節(jié)指數(shù)。

type SectionIndex int
const (
        SHN_UNDEF     SectionIndex = 0      /* 未定義,缺失,無關(guān)緊要。 */
        SHN_LORESERVE SectionIndex = 0xff00 /* 保留范圍的第一個。 */
        SHN_LOPROC    SectionIndex = 0xff00 /* 第一個特定于處理器。 */
        SHN_HIPROC    SectionIndex = 0xff1f /* 最后一個特定于處理器 */
        SHN_LOOS      SectionIndex = 0xff20 /* 第一個特定于操作系統(tǒng)。 */
        SHN_HIOS      SectionIndex = 0xff3f /* 最后一個特定于操作系統(tǒng)。 */
        SHN_ABS       SectionIndex = 0xfff1 /* 絕對值。 */
        SHN_COMMON    SectionIndex = 0xfff2 /* 常見數(shù)據(jù)。 */
        SHN_XINDEX    SectionIndex = 0xffff /* 轉(zhuǎn)義; 索引存儲在別處。 */
        SHN_HIRESERVE SectionIndex = 0xffff /* 最后保留的范圍。 */)

func (SectionIndex) GoString

func (i SectionIndex) GoString() string

func (SectionIndex) String

func (i SectionIndex) String() string

type SectionType

Section 類型。

type SectionType uint32
const (
        SHT_NULL           SectionType = 0          /* 待用 */
        SHT_PROGBITS       SectionType = 1          /* 程序定義的信息 */
        SHT_SYMTAB         SectionType = 2          /* 符號表部分 */
        SHT_STRTAB         SectionType = 3          /* 字符串表部分 */
        SHT_RELA           SectionType = 4          /* 帶加數(shù)的搬遷部分 */
        SHT_HASH           SectionType = 5          /* 符號哈希表部分 */
        SHT_DYNAMIC        SectionType = 6          /* 動態(tài)部分 */
        SHT_NOTE           SectionType = 7          /* 注意部分 */
        SHT_NOBITS         SectionType = 8          /* 沒有空間部分 */
        SHT_REL            SectionType = 9          /* 遷移部分 - 沒有加數(shù) */
        SHT_SHLIB          SectionType = 10         /* 保留 - 目的未知 */
        SHT_DYNSYM         SectionType = 11         /* 動態(tài)符號表部分 */
        SHT_INIT_ARRAY     SectionType = 14         /* 初始化函數(shù)指針。 */
        SHT_FINI_ARRAY     SectionType = 15         /* 終止函數(shù)指針。 */
        SHT_PREINIT_ARRAY  SectionType = 16         /* 預初始化函數(shù)ptrs。 */
        SHT_GROUP          SectionType = 17         /* 科組。 */
        SHT_SYMTAB_SHNDX   SectionType = 18         /* 節(jié)索引(參見SHN_XINDEX)。 */
        SHT_LOOS           SectionType = 0x60000000 /* OS特定語義的第一個 */
        SHT_GNU_ATTRIBUTES SectionType = 0x6ffffff5 /* GNU對象屬性 */
        SHT_GNU_HASH       SectionType = 0x6ffffff6 /* GNU哈希表 */
        SHT_GNU_LIBLIST    SectionType = 0x6ffffff7 /* GNU預鏈接庫列表 */
        SHT_GNU_VERDEF     SectionType = 0x6ffffffd /* GNU版本定義部分 */
        SHT_GNU_VERNEED    SectionType = 0x6ffffffe /* GNU版本需要部分 */
        SHT_GNU_VERSYM     SectionType = 0x6fffffff /* GNU版本符號表 */
        SHT_HIOS           SectionType = 0x6fffffff /* 最后的OS特定語義 */
        SHT_LOPROC         SectionType = 0x70000000 /* 處理器的保留范圍 */
        SHT_HIPROC         SectionType = 0x7fffffff /* 特定節(jié)頭類型 */
        SHT_LOUSER         SectionType = 0x80000000 /* 保留范圍的申請 */
        SHT_HIUSER         SectionType = 0xffffffff /* 具體指標 */)

func (SectionType) GoString

func (i SectionType) GoString() string

func (SectionType) String

func (i SectionType) String() string

type Sym32

ELF32 符號。

type Sym32 struct {
        Name  uint32
        Value uint32
        Size  uint32
        Info  uint8
        Other uint8
        Shndx uint16}

type Sym64

ELF64 符號表條目。

type Sym64 struct {
        Name  uint32 /* 字符串表索引的名稱。 */
        Info  uint8  /* 類型和綁定信息。*/
        Other uint8  /* 保留(未使用)。 */
        Shndx uint16 /* 符號的部分索引。 */
        Value uint64 /* 符號值。 */
        Size  uint64 /* 關(guān)聯(lián)對象的大小。 */}

type SymBind

Symbol Binding - ELFNN_ST_BIND - st_info

type SymBind int
const (
        STB_LOCAL  SymBind = 0  /* 本地符號 */
        STB_GLOBAL SymBind = 1  /* 全局符號 */
        STB_WEAK   SymBind = 2  /* 像全局 - 更低的優(yōu)先權(quán) */
        STB_LOOS   SymBind = 10 /* 操作系統(tǒng)的保留范圍 */
        STB_HIOS   SymBind = 12 /*   具體的語義。 */
        STB_LOPROC SymBind = 13 /* 處理器的保留范圍 */
        STB_HIPROC SymBind = 15 /*   具體的語義。 */)

func ST_BIND

func ST_BIND(info uint8) SymBind

func (SymBind) GoString

func (i SymBind) GoString() string

func (SymBind) String

func (i SymBind) String() string

type SymType

Symbol type - ELFNN_ST_TYPE - st_info

type SymType int
const (
        STT_NOTYPE  SymType = 0  /* 未指定的類型。 */
        STT_OBJECT  SymType = 1  /* 數(shù)據(jù)對象。 */
        STT_FUNC    SymType = 2  /* 函數(shù)。 */
        STT_SECTION SymType = 3  /* 部分。 */
        STT_FILE    SymType = 4  /* 源文件。 */
        STT_COMMON  SymType = 5  /* 未初始化的常見塊。 */
        STT_TLS     SymType = 6  /* TLS對象。 */
        STT_LOOS    SymType = 10 /* 操作系統(tǒng)的保留范圍 */
        STT_HIOS    SymType = 12 /*   具體的語義。 */
        STT_LOPROC  SymType = 13 /* 處理器的保留范圍 */
        STT_HIPROC  SymType = 15 /*   具體的語義。 */)

func ST_TYPE

func ST_TYPE(info uint8) SymType

func (SymType) GoString

func (i SymType) GoString() string

func (SymType) String

func (i SymType) String() string

type SymVis

Symbol visibility - ELFNN_ST_VISIBILITY - st_other

type SymVis int
const (
        STV_DEFAULT   SymVis = 0x0 /* 默認可見性(請參閱binding 綁定)。 */
        STV_INTERNAL  SymVis = 0x1 /* 可重定位對象的特殊含義。 */
        STV_HIDDEN    SymVis = 0x2 /* 不可見。 */
        STV_PROTECTED SymVis = 0x3 /* 可見但不可搶占。 */)

func ST_VISIBILITY

func ST_VISIBILITY(other uint8) SymVis

func (SymVis) GoString

func (i SymVis) GoString() string

func (SymVis) String

func (i SymVis) String() string

type Symbol

符號表示ELF符號表部分中的條目。

type Symbol struct {
        Name        string
        Info, Other byte
        Section     SectionIndex
        Value, Size uint64}

type Type

類型在 Header.Type 中找到。

type Type uint16
const (
        ET_NONE   Type = 0      /* 未知類型。 */
        ET_REL    Type = 1      /* 重定位。 */
        ET_EXEC   Type = 2      /* 可執(zhí)行文件。 */
        ET_DYN    Type = 3      /* 共享對象。 */
        ET_CORE   Type = 4      /* 核心文件。 */
        ET_LOOS   Type = 0xfe00 /* 第一個操作系統(tǒng)特定。 */
        ET_HIOS   Type = 0xfeff /* 最后一個特定于操作系統(tǒng)。 */
        ET_LOPROC Type = 0xff00 /* 第一個特定于處理器。 */
        ET_HIPROC Type = 0xffff /* 最后一個特定于處理器 */)

func (Type) GoString

func (i Type) GoString() string

func (Type) String

func (i Type) String() string

type Version

版本位于 Header.IdentEI_VERSION 和 Header.Version 中。

type Version byte
const (
        EV_NONE    Version = 0
        EV_CURRENT Version = 1)

func (Version) GoString

func (i Version) GoString() string

func (Version) String

func (i Version) String() string


Previous article: Next article: