version: 1.10

package elf

import "debug/elf"

Overview

Package elf implements access to ELF object files.

Index

Package files

elf.go file.go reader.go

Constants

  1. const (
  2. EI_CLASS = 4 /* Class of machine. */
  3. EI_DATA = 5 /* Data format. */
  4. EI_VERSION = 6 /* ELF format version. */
  5. EI_OSABI = 7 /* Operating system / ABI identification */
  6. EI_ABIVERSION = 8 /* ABI version */
  7. EI_PAD = 9 /* Start of padding (per SVR4 ABI). */
  8. EI_NIDENT = 16 /* Size of e_ident array. */
  9. )

Indexes into the Header.Ident array.

  1. const ARM_MAGIC_TRAMP_NUMBER = 0x5c000003

Magic number for the elf trampoline, chosen wisely to be an immediate value.

  1. const ELFMAG = "\177ELF"

Initial magic number for ELF files.

  1. const Sym32Size = 16
  1. const Sym64Size = 24

Variables

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

ErrNoSymbols is returned by File.Symbols and File.DynamicSymbols if there is no
such section in the File.

func R_INFO

  1. func R_INFO(sym, typ uint32) uint64

func R_INFO32

  1. func R_INFO32(sym, typ uint32) uint32

func R_SYM32

  1. func R_SYM32(info uint32) uint32

func R_SYM64

  1. func R_SYM64(info uint64) uint32

func R_TYPE32

  1. func R_TYPE32(info uint32) uint32

func R_TYPE64

  1. func R_TYPE64(info uint64) uint32

func ST_INFO

  1. func ST_INFO(bind SymBind, typ SymType) uint8

type Chdr32

  1. type Chdr32 struct {
  2. Type uint32
  3. Size uint32
  4. Addralign uint32
  5. }

ELF32 Compression header.

type Chdr64

  1. type Chdr64 struct {
  2. Type uint32
  3.  
  4. Size uint64
  5. Addralign uint64
  6. // contains filtered or unexported fields
  7. }

ELF64 Compression header.

type Class

  1. type Class byte

Class is found in Header.Ident[EI_CLASS] and Header.Class.

  1. const (
  2. ELFCLASSNONE Class = 0 /* Unknown class. */
  3. ELFCLASS32 Class = 1 /* 32-bit architecture. */
  4. ELFCLASS64 Class = 2 /* 64-bit architecture. */
  5. )

func (Class) GoString

  1. func (i Class) GoString() string

func (Class) String

  1. func (i Class) String() string

type CompressionType

  1. type CompressionType int

Section compression type.

  1. const (
  2. COMPRESS_ZLIB CompressionType = 1 /* ZLIB compression. */
  3. COMPRESS_LOOS CompressionType = 0x60000000 /* First OS-specific. */
  4. COMPRESS_HIOS CompressionType = 0x6fffffff /* Last OS-specific. */
  5. COMPRESS_LOPROC CompressionType = 0x70000000 /* First processor-specific type. */
  6. COMPRESS_HIPROC CompressionType = 0x7fffffff /* Last processor-specific type. */
  7. )

func (CompressionType) GoString

  1. func (i CompressionType) GoString() string

func (CompressionType) String

  1. func (i CompressionType) String() string

type Data

  1. type Data byte

Data is found in Header.Ident[EI_DATA] and Header.Data.

  1. const (
  2. ELFDATANONE Data = 0 /* Unknown data format. */
  3. ELFDATA2LSB Data = 1 /* 2's complement little-endian. */
  4. ELFDATA2MSB Data = 2 /* 2's complement big-endian. */
  5. )

func (Data) GoString

  1. func (i Data) GoString() string

func (Data) String

  1. func (i Data) String() string

type Dyn32

  1. type Dyn32 struct {
  2. Tag int32 /* Entry type. */
  3. Val uint32 /* Integer/Address value. */
  4. }

ELF32 Dynamic structure. The “.dynamic” section contains an array of them.

type Dyn64

  1. type Dyn64 struct {
  2. Tag int64 /* Entry type. */
  3. Val uint64 /* Integer/address value */
  4. }

ELF64 Dynamic structure. The “.dynamic” section contains an array of them.

type DynFlag

  1. type DynFlag int

DT_FLAGS values.

  1. const (
  2. DF_ORIGIN DynFlag = 0x0001 /* Indicates that the object being loaded may
  3. make reference to the
  4. $ORIGIN substitution string */
  5. DF_SYMBOLIC DynFlag = 0x0002 /* Indicates "symbolic" linking. */
  6. DF_TEXTREL DynFlag = 0x0004 /* Indicates there may be relocations in non-writable segments. */
  7. DF_BIND_NOW DynFlag = 0x0008 /* Indicates that the dynamic linker should
  8. process all relocations for the object
  9. containing this entry before transferring
  10. control to the program. */
  11. DF_STATIC_TLS DynFlag = 0x0010 /* Indicates that the shared object or
  12. executable contains code using a static
  13. thread-local storage scheme. */
  14. )

func (DynFlag) GoString

  1. func (i DynFlag) GoString() string

func (DynFlag) String

  1. func (i DynFlag) String() string

type DynTag

  1. type DynTag int

Dyn.Tag

  1. const (
  2. DT_NULL DynTag = 0 /* Terminating entry. */
  3. DT_NEEDED DynTag = 1 /* String table offset of a needed shared library. */
  4. DT_PLTRELSZ DynTag = 2 /* Total size in bytes of PLT relocations. */
  5. DT_PLTGOT DynTag = 3 /* Processor-dependent address. */
  6. DT_HASH DynTag = 4 /* Address of symbol hash table. */
  7. DT_STRTAB DynTag = 5 /* Address of string table. */
  8. DT_SYMTAB DynTag = 6 /* Address of symbol table. */
  9. DT_RELA DynTag = 7 /* Address of ElfNN_Rela relocations. */
  10. DT_RELASZ DynTag = 8 /* Total size of ElfNN_Rela relocations. */
  11. DT_RELAENT DynTag = 9 /* Size of each ElfNN_Rela relocation entry. */
  12. DT_STRSZ DynTag = 10 /* Size of string table. */
  13. DT_SYMENT DynTag = 11 /* Size of each symbol table entry. */
  14. DT_INIT DynTag = 12 /* Address of initialization function. */
  15. DT_FINI DynTag = 13 /* Address of finalization function. */
  16. DT_SONAME DynTag = 14 /* String table offset of shared object name. */
  17. DT_RPATH DynTag = 15 /* String table offset of library path. [sup] */
  18. DT_SYMBOLIC DynTag = 16 /* Indicates "symbolic" linking. [sup] */
  19. DT_REL DynTag = 17 /* Address of ElfNN_Rel relocations. */
  20. DT_RELSZ DynTag = 18 /* Total size of ElfNN_Rel relocations. */
  21. DT_RELENT DynTag = 19 /* Size of each ElfNN_Rel relocation. */
  22. DT_PLTREL DynTag = 20 /* Type of relocation used for PLT. */
  23. DT_DEBUG DynTag = 21 /* Reserved (not used). */
  24. DT_TEXTREL DynTag = 22 /* Indicates there may be relocations in non-writable segments. [sup] */
  25. DT_JMPREL DynTag = 23 /* Address of PLT relocations. */
  26. DT_BIND_NOW DynTag = 24 /* [sup] */
  27. DT_INIT_ARRAY DynTag = 25 /* Address of the array of pointers to initialization functions */
  28. DT_FINI_ARRAY DynTag = 26 /* Address of the array of pointers to termination functions */
  29. DT_INIT_ARRAYSZ DynTag = 27 /* Size in bytes of the array of initialization functions. */
  30. DT_FINI_ARRAYSZ DynTag = 28 /* Size in bytes of the array of termination functions. */
  31. DT_RUNPATH DynTag = 29 /* String table offset of a null-terminated library search path string. */
  32. DT_FLAGS DynTag = 30 /* Object specific flag values. */
  33. DT_ENCODING DynTag = 32 /* Values greater than or equal to DT_ENCODING
  34. and less than DT_LOOS follow the rules for
  35. the interpretation of the d_un union
  36. as follows: even == 'd_ptr', even == 'd_val'
  37. or none */
  38. DT_PREINIT_ARRAY DynTag = 32 /* Address of the array of pointers to pre-initialization functions. */
  39. DT_PREINIT_ARRAYSZ DynTag = 33 /* Size in bytes of the array of pre-initialization functions. */
  40. DT_LOOS DynTag = 0x6000000d /* First OS-specific */
  41. DT_HIOS DynTag = 0x6ffff000 /* Last OS-specific */
  42. DT_VERSYM DynTag = 0x6ffffff0
  43. DT_VERNEED DynTag = 0x6ffffffe
  44. DT_VERNEEDNUM DynTag = 0x6fffffff
  45. DT_LOPROC DynTag = 0x70000000 /* First processor-specific type. */
  46. DT_HIPROC DynTag = 0x7fffffff /* Last processor-specific type. */
  47. )

func (DynTag) GoString

  1. func (i DynTag) GoString() string

func (DynTag) String

  1. func (i DynTag) String() string

type File

  1. type File struct {
  2. FileHeader
  3. Sections []*Section
  4. Progs []*Prog
  5. // contains filtered or unexported fields
  6. }

A File represents an open ELF file.

func NewFile

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

NewFile creates a new File for accessing an ELF binary in an underlying reader.
The ELF binary is expected to start at position 0 in the ReaderAt.

func Open

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

Open opens the named file using os.Open and prepares it for use as an ELF
binary.

func (*File) Close

  1. func (f *File) Close() error

Close closes the File. If the File was created using NewFile directly instead of
Open, Close has no effect.

func (*File) DWARF

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

func (*File) DynString

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

DynString returns the strings listed for the given tag in the file’s dynamic
section.

The tag must be one that takes string values: DT_NEEDED, DT_SONAME, DT_RPATH, or
DT_RUNPATH.

func (*File) DynamicSymbols

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

DynamicSymbols returns the dynamic symbol table for f. The symbols will be
listed in the order they appear in f.

For compatibility with Symbols, DynamicSymbols omits the null symbol at index 0.
After retrieving the symbols as symtab, an externally supplied index x
corresponds to symtab[x-1], not symtab[x].

func (*File) ImportedLibraries

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

ImportedLibraries returns the names of all libraries referred to by the binary f
that are expected to be linked with the binary at dynamic link time.

func (*File) ImportedSymbols

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

ImportedSymbols returns the names of all symbols referred to by the binary f
that are expected to be satisfied by other libraries at dynamic load time. It
does not return weak symbols.

func (*File) Section

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

Section returns a section with the given name, or nil if no such section exists.

func (*File) SectionByType

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

SectionByType returns the first section in f with the given type, or nil if
there is no such section.

func (*File) Symbols

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

Symbols returns the symbol table for f. The symbols will be listed in the order
they appear in f.

For compatibility with Go 1.0, Symbols omits the null symbol at index 0. After
retrieving the symbols as symtab, an externally supplied index x corresponds to
symtab[x-1], not symtab[x].

type FileHeader

  1. type FileHeader struct {
  2. Class Class
  3. Data Data
  4. Version Version
  5. OSABI OSABI
  6. ABIVersion uint8
  7. ByteOrder binary.ByteOrder
  8. Type Type
  9. Machine Machine
  10. Entry uint64
  11. }

A FileHeader represents an ELF file header.

type FormatError

  1. type FormatError struct {
  2. // contains filtered or unexported fields
  3. }

func (*FormatError) Error

  1. func (e *FormatError) Error() string

type Header32

  1. type Header32 struct {
  2. Ident [EI_NIDENT]byte /* File identification. */
  3. Type uint16 /* File type. */
  4. Machine uint16 /* Machine architecture. */
  5. Version uint32 /* ELF format version. */
  6. Entry uint32 /* Entry point. */
  7. Phoff uint32 /* Program header file offset. */
  8. Shoff uint32 /* Section header file offset. */
  9. Flags uint32 /* Architecture-specific flags. */
  10. Ehsize uint16 /* Size of ELF header in bytes. */
  11. Phentsize uint16 /* Size of program header entry. */
  12. Phnum uint16 /* Number of program header entries. */
  13. Shentsize uint16 /* Size of section header entry. */
  14. Shnum uint16 /* Number of section header entries. */
  15. Shstrndx uint16 /* Section name strings section. */
  16. }

ELF32 File header.

type Header64

  1. type Header64 struct {
  2. Ident [EI_NIDENT]byte /* File identification. */
  3. Type uint16 /* File type. */
  4. Machine uint16 /* Machine architecture. */
  5. Version uint32 /* ELF format version. */
  6. Entry uint64 /* Entry point. */
  7. Phoff uint64 /* Program header file offset. */
  8. Shoff uint64 /* Section header file offset. */
  9. Flags uint32 /* Architecture-specific flags. */
  10. Ehsize uint16 /* Size of ELF header in bytes. */
  11. Phentsize uint16 /* Size of program header entry. */
  12. Phnum uint16 /* Number of program header entries. */
  13. Shentsize uint16 /* Size of section header entry. */
  14. Shnum uint16 /* Number of section header entries. */
  15. Shstrndx uint16 /* Section name strings section. */
  16. }

ELF64 file header.

type ImportedSymbol

  1. type ImportedSymbol struct {
  2. Name string
  3. Version string
  4. Library string
  5. }

type Machine

  1. type Machine uint16

Machine is found in Header.Machine.

  1. const (
  2. EM_NONE Machine = 0 /* Unknown machine. */
  3. EM_M32 Machine = 1 /* AT&T WE32100. */
  4. EM_SPARC Machine = 2 /* Sun SPARC. */
  5. EM_386 Machine = 3 /* Intel i386. */
  6. EM_68K Machine = 4 /* Motorola 68000. */
  7. EM_88K Machine = 5 /* Motorola 88000. */
  8. EM_860 Machine = 7 /* Intel i860. */
  9. EM_MIPS Machine = 8 /* MIPS R3000 Big-Endian only. */
  10. EM_S370 Machine = 9 /* IBM System/370. */
  11. EM_MIPS_RS3_LE Machine = 10 /* MIPS R3000 Little-Endian. */
  12. EM_PARISC Machine = 15 /* HP PA-RISC. */
  13. EM_VPP500 Machine = 17 /* Fujitsu VPP500. */
  14. EM_SPARC32PLUS Machine = 18 /* SPARC v8plus. */
  15. EM_960 Machine = 19 /* Intel 80960. */
  16. EM_PPC Machine = 20 /* PowerPC 32-bit. */
  17. EM_PPC64 Machine = 21 /* PowerPC 64-bit. */
  18. EM_S390 Machine = 22 /* IBM System/390. */
  19. EM_V800 Machine = 36 /* NEC V800. */
  20. EM_FR20 Machine = 37 /* Fujitsu FR20. */
  21. EM_RH32 Machine = 38 /* TRW RH-32. */
  22. EM_RCE Machine = 39 /* Motorola RCE. */
  23. EM_ARM Machine = 40 /* ARM. */
  24. EM_SH Machine = 42 /* Hitachi SH. */
  25. EM_SPARCV9 Machine = 43 /* SPARC v9 64-bit. */
  26. EM_TRICORE Machine = 44 /* Siemens TriCore embedded processor. */
  27. EM_ARC Machine = 45 /* Argonaut RISC Core. */
  28. EM_H8_300 Machine = 46 /* Hitachi H8/300. */
  29. EM_H8_300H Machine = 47 /* Hitachi H8/300H. */
  30. EM_H8S Machine = 48 /* Hitachi H8S. */
  31. EM_H8_500 Machine = 49 /* Hitachi H8/500. */
  32. EM_IA_64 Machine = 50 /* Intel IA-64 Processor. */
  33. EM_MIPS_X Machine = 51 /* Stanford MIPS-X. */
  34. EM_COLDFIRE Machine = 52 /* Motorola ColdFire. */
  35. EM_68HC12 Machine = 53 /* Motorola M68HC12. */
  36. EM_MMA Machine = 54 /* Fujitsu MMA. */
  37. EM_PCP Machine = 55 /* Siemens PCP. */
  38. EM_NCPU Machine = 56 /* Sony nCPU. */
  39. EM_NDR1 Machine = 57 /* Denso NDR1 microprocessor. */
  40. EM_STARCORE Machine = 58 /* Motorola Star*Core processor. */
  41. EM_ME16 Machine = 59 /* Toyota ME16 processor. */
  42. EM_ST100 Machine = 60 /* STMicroelectronics ST100 processor. */
  43. EM_TINYJ Machine = 61 /* Advanced Logic Corp. TinyJ processor. */
  44. EM_X86_64 Machine = 62 /* Advanced Micro Devices x86-64 */
  45. EM_AARCH64 Machine = 183 /* ARM 64-bit Architecture (AArch64) */
  46.  
  47. /* Non-standard or deprecated. */
  48. EM_486 Machine = 6 /* Intel i486. */
  49. EM_MIPS_RS4_BE Machine = 10 /* MIPS R4000 Big-Endian */
  50. EM_ALPHA_STD Machine = 41 /* Digital Alpha (standard value). */
  51. EM_ALPHA Machine = 0x9026 /* Alpha (written in the absence of an ABI) */
  52. )

func (Machine) GoString

  1. func (i Machine) GoString() string

func (Machine) String

  1. func (i Machine) String() string

type NType

  1. type NType int

NType values; used in core files.

  1. const (
  2. NT_PRSTATUS NType = 1 /* Process status. */
  3. NT_FPREGSET NType = 2 /* Floating point registers. */
  4. NT_PRPSINFO NType = 3 /* Process state info. */
  5. )

func (NType) GoString

  1. func (i NType) GoString() string

func (NType) String

  1. func (i NType) String() string

type OSABI

  1. type OSABI byte

OSABI is found in Header.Ident[EI_OSABI] and Header.OSABI.

  1. const (
  2. ELFOSABI_NONE OSABI = 0 /* UNIX System V ABI */
  3. ELFOSABI_HPUX OSABI = 1 /* HP-UX operating system */
  4. ELFOSABI_NETBSD OSABI = 2 /* NetBSD */
  5. ELFOSABI_LINUX OSABI = 3 /* GNU/Linux */
  6. ELFOSABI_HURD OSABI = 4 /* GNU/Hurd */
  7. ELFOSABI_86OPEN OSABI = 5 /* 86Open common IA32 ABI */
  8. ELFOSABI_SOLARIS OSABI = 6 /* Solaris */
  9. ELFOSABI_AIX OSABI = 7 /* AIX */
  10. ELFOSABI_IRIX OSABI = 8 /* IRIX */
  11. ELFOSABI_FREEBSD OSABI = 9 /* FreeBSD */
  12. ELFOSABI_TRU64 OSABI = 10 /* TRU64 UNIX */
  13. ELFOSABI_MODESTO OSABI = 11 /* Novell Modesto */
  14. ELFOSABI_OPENBSD OSABI = 12 /* OpenBSD */
  15. ELFOSABI_OPENVMS OSABI = 13 /* Open VMS */
  16. ELFOSABI_NSK OSABI = 14 /* HP Non-Stop Kernel */
  17. ELFOSABI_ARM OSABI = 97 /* ARM */
  18. ELFOSABI_STANDALONE OSABI = 255 /* Standalone (embedded) application */
  19. )

func (OSABI) GoString

  1. func (i OSABI) GoString() string

func (OSABI) String

  1. func (i OSABI) String() string

type Prog

  1. type Prog struct {
  2. ProgHeader
  3.  
  4. // Embed ReaderAt for ReadAt method.
  5. // Do not embed SectionReader directly
  6. // to avoid having Read and Seek.
  7. // If a client wants Read and Seek it must use
  8. // Open() to avoid fighting over the seek offset
  9. // with other clients.
  10. io.ReaderAt
  11. // contains filtered or unexported fields
  12. }

A Prog represents a single ELF program header in an ELF binary.

func (*Prog) Open

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

Open returns a new ReadSeeker reading the ELF program body.

type Prog32

  1. type Prog32 struct {
  2. Type uint32 /* Entry type. */
  3. Off uint32 /* File offset of contents. */
  4. Vaddr uint32 /* Virtual address in memory image. */
  5. Paddr uint32 /* Physical address (not used). */
  6. Filesz uint32 /* Size of contents in file. */
  7. Memsz uint32 /* Size of contents in memory. */
  8. Flags uint32 /* Access permission flags. */
  9. Align uint32 /* Alignment in memory and file. */
  10. }

ELF32 Program header.

type Prog64

  1. type Prog64 struct {
  2. Type uint32 /* Entry type. */
  3. Flags uint32 /* Access permission flags. */
  4. Off uint64 /* File offset of contents. */
  5. Vaddr uint64 /* Virtual address in memory image. */
  6. Paddr uint64 /* Physical address (not used). */
  7. Filesz uint64 /* Size of contents in file. */
  8. Memsz uint64 /* Size of contents in memory. */
  9. Align uint64 /* Alignment in memory and file. */
  10. }

ELF64 Program header.

type ProgFlag

  1. type ProgFlag uint32

Prog.Flag

  1. const (
  2. PF_X ProgFlag = 0x1 /* Executable. */
  3. PF_W ProgFlag = 0x2 /* Writable. */
  4. PF_R ProgFlag = 0x4 /* Readable. */
  5. PF_MASKOS ProgFlag = 0x0ff00000 /* Operating system-specific. */
  6. PF_MASKPROC ProgFlag = 0xf0000000 /* Processor-specific. */
  7. )

func (ProgFlag) GoString

  1. func (i ProgFlag) GoString() string

func (ProgFlag) String

  1. func (i ProgFlag) String() string

type ProgHeader

  1. type ProgHeader struct {
  2. Type ProgType
  3. Flags ProgFlag
  4. Off uint64
  5. Vaddr uint64
  6. Paddr uint64
  7. Filesz uint64
  8. Memsz uint64
  9. Align uint64
  10. }

A ProgHeader represents a single ELF program header.

type ProgType

  1. type ProgType int

Prog.Type

  1. const (
  2. PT_NULL ProgType = 0 /* Unused entry. */
  3. PT_LOAD ProgType = 1 /* Loadable segment. */
  4. PT_DYNAMIC ProgType = 2 /* Dynamic linking information segment. */
  5. PT_INTERP ProgType = 3 /* Pathname of interpreter. */
  6. PT_NOTE ProgType = 4 /* Auxiliary information. */
  7. PT_SHLIB ProgType = 5 /* Reserved (not used). */
  8. PT_PHDR ProgType = 6 /* Location of program header itself. */
  9. PT_TLS ProgType = 7 /* Thread local storage segment */
  10. PT_LOOS ProgType = 0x60000000 /* First OS-specific. */
  11. PT_HIOS ProgType = 0x6fffffff /* Last OS-specific. */
  12. PT_LOPROC ProgType = 0x70000000 /* First processor-specific type. */
  13. PT_HIPROC ProgType = 0x7fffffff /* Last processor-specific type. */
  14. )

func (ProgType) GoString

  1. func (i ProgType) GoString() string

func (ProgType) String

  1. func (i ProgType) String() string

type R_386

  1. type R_386 int

Relocation types for 386.

  1. const (
  2. R_386_NONE R_386 = 0 /* No relocation. */
  3. R_386_32 R_386 = 1 /* Add symbol value. */
  4. R_386_PC32 R_386 = 2 /* Add PC-relative symbol value. */
  5. R_386_GOT32 R_386 = 3 /* Add PC-relative GOT offset. */
  6. R_386_PLT32 R_386 = 4 /* Add PC-relative PLT offset. */
  7. R_386_COPY R_386 = 5 /* Copy data from shared object. */
  8. R_386_GLOB_DAT R_386 = 6 /* Set GOT entry to data address. */
  9. R_386_JMP_SLOT R_386 = 7 /* Set GOT entry to code address. */
  10. R_386_RELATIVE R_386 = 8 /* Add load address of shared object. */
  11. R_386_GOTOFF R_386 = 9 /* Add GOT-relative symbol address. */
  12. R_386_GOTPC R_386 = 10 /* Add PC-relative GOT table address. */
  13. R_386_32PLT R_386 = 11
  14. R_386_TLS_TPOFF R_386 = 14 /* Negative offset in static TLS block */
  15. R_386_TLS_IE R_386 = 15 /* Absolute address of GOT for -ve static TLS */
  16. R_386_TLS_GOTIE R_386 = 16 /* GOT entry for negative static TLS block */
  17. R_386_TLS_LE R_386 = 17 /* Negative offset relative to static TLS */
  18. R_386_TLS_GD R_386 = 18 /* 32 bit offset to GOT (index,off) pair */
  19. R_386_TLS_LDM R_386 = 19 /* 32 bit offset to GOT (index,zero) pair */
  20. R_386_16 R_386 = 20
  21. R_386_PC16 R_386 = 21
  22. R_386_8 R_386 = 22
  23. R_386_PC8 R_386 = 23
  24. R_386_TLS_GD_32 R_386 = 24 /* 32 bit offset to GOT (index,off) pair */
  25. R_386_TLS_GD_PUSH R_386 = 25 /* pushl instruction for Sun ABI GD sequence */
  26. R_386_TLS_GD_CALL R_386 = 26 /* call instruction for Sun ABI GD sequence */
  27. R_386_TLS_GD_POP R_386 = 27 /* popl instruction for Sun ABI GD sequence */
  28. R_386_TLS_LDM_32 R_386 = 28 /* 32 bit offset to GOT (index,zero) pair */
  29. R_386_TLS_LDM_PUSH R_386 = 29 /* pushl instruction for Sun ABI LD sequence */
  30. R_386_TLS_LDM_CALL R_386 = 30 /* call instruction for Sun ABI LD sequence */
  31. R_386_TLS_LDM_POP R_386 = 31 /* popl instruction for Sun ABI LD sequence */
  32. R_386_TLS_LDO_32 R_386 = 32 /* 32 bit offset from start of TLS block */
  33. R_386_TLS_IE_32 R_386 = 33 /* 32 bit offset to GOT static TLS offset entry */
  34. R_386_TLS_LE_32 R_386 = 34 /* 32 bit offset within static TLS block */
  35. R_386_TLS_DTPMOD32 R_386 = 35 /* GOT entry containing TLS index */
  36. R_386_TLS_DTPOFF32 R_386 = 36 /* GOT entry containing TLS offset */
  37. R_386_TLS_TPOFF32 R_386 = 37 /* GOT entry of -ve static TLS offset */
  38. R_386_SIZE32 R_386 = 38
  39. R_386_TLS_GOTDESC R_386 = 39
  40. R_386_TLS_DESC_CALL R_386 = 40
  41. R_386_TLS_DESC R_386 = 41
  42. R_386_IRELATIVE R_386 = 42
  43. R_386_GOT32X R_386 = 43
  44. )

func (R_386) GoString

  1. func (i R_386) GoString() string

func (R_386) String

  1. func (i R_386) String() string

type R_390

  1. type R_390 int

Relocation types for s390x processors.

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

func (R_390) GoString

  1. func (i R_390) GoString() string

func (R_390) String

  1. func (i R_390) String() string

type R_AARCH64

  1. type R_AARCH64 int

Relocation types for AArch64 (aka arm64)

  1. const (
  2. R_AARCH64_NONE R_AARCH64 = 0
  3. R_AARCH64_P32_ABS32 R_AARCH64 = 1
  4. R_AARCH64_P32_ABS16 R_AARCH64 = 2
  5. R_AARCH64_P32_PREL32 R_AARCH64 = 3
  6. R_AARCH64_P32_PREL16 R_AARCH64 = 4
  7. R_AARCH64_P32_MOVW_UABS_G0 R_AARCH64 = 5
  8. R_AARCH64_P32_MOVW_UABS_G0_NC R_AARCH64 = 6
  9. R_AARCH64_P32_MOVW_UABS_G1 R_AARCH64 = 7
  10. R_AARCH64_P32_MOVW_SABS_G0 R_AARCH64 = 8
  11. R_AARCH64_P32_LD_PREL_LO19 R_AARCH64 = 9
  12. R_AARCH64_P32_ADR_PREL_LO21 R_AARCH64 = 10
  13. R_AARCH64_P32_ADR_PREL_PG_HI21 R_AARCH64 = 11
  14. R_AARCH64_P32_ADD_ABS_LO12_NC R_AARCH64 = 12
  15. R_AARCH64_P32_LDST8_ABS_LO12_NC R_AARCH64 = 13
  16. R_AARCH64_P32_LDST16_ABS_LO12_NC R_AARCH64 = 14
  17. R_AARCH64_P32_LDST32_ABS_LO12_NC R_AARCH64 = 15
  18. R_AARCH64_P32_LDST64_ABS_LO12_NC R_AARCH64 = 16
  19. R_AARCH64_P32_LDST128_ABS_LO12_NC R_AARCH64 = 17
  20. R_AARCH64_P32_TSTBR14 R_AARCH64 = 18
  21. R_AARCH64_P32_CONDBR19 R_AARCH64 = 19
  22. R_AARCH64_P32_JUMP26 R_AARCH64 = 20
  23. R_AARCH64_P32_CALL26 R_AARCH64 = 21
  24. R_AARCH64_P32_GOT_LD_PREL19 R_AARCH64 = 25
  25. R_AARCH64_P32_ADR_GOT_PAGE R_AARCH64 = 26
  26. R_AARCH64_P32_LD32_GOT_LO12_NC R_AARCH64 = 27
  27. R_AARCH64_P32_TLSGD_ADR_PAGE21 R_AARCH64 = 81
  28. R_AARCH64_P32_TLSGD_ADD_LO12_NC R_AARCH64 = 82
  29. R_AARCH64_P32_TLSIE_ADR_GOTTPREL_PAGE21 R_AARCH64 = 103
  30. R_AARCH64_P32_TLSIE_LD32_GOTTPREL_LO12_NC R_AARCH64 = 104
  31. R_AARCH64_P32_TLSIE_LD_GOTTPREL_PREL19 R_AARCH64 = 105
  32. R_AARCH64_P32_TLSLE_MOVW_TPREL_G1 R_AARCH64 = 106
  33. R_AARCH64_P32_TLSLE_MOVW_TPREL_G0 R_AARCH64 = 107
  34. R_AARCH64_P32_TLSLE_MOVW_TPREL_G0_NC R_AARCH64 = 108
  35. R_AARCH64_P32_TLSLE_ADD_TPREL_HI12 R_AARCH64 = 109
  36. R_AARCH64_P32_TLSLE_ADD_TPREL_LO12 R_AARCH64 = 110
  37. R_AARCH64_P32_TLSLE_ADD_TPREL_LO12_NC R_AARCH64 = 111
  38. R_AARCH64_P32_TLSDESC_LD_PREL19 R_AARCH64 = 122
  39. R_AARCH64_P32_TLSDESC_ADR_PREL21 R_AARCH64 = 123
  40. R_AARCH64_P32_TLSDESC_ADR_PAGE21 R_AARCH64 = 124
  41. R_AARCH64_P32_TLSDESC_LD32_LO12_NC R_AARCH64 = 125
  42. R_AARCH64_P32_TLSDESC_ADD_LO12_NC R_AARCH64 = 126
  43. R_AARCH64_P32_TLSDESC_CALL R_AARCH64 = 127
  44. R_AARCH64_P32_COPY R_AARCH64 = 180
  45. R_AARCH64_P32_GLOB_DAT R_AARCH64 = 181
  46. R_AARCH64_P32_JUMP_SLOT R_AARCH64 = 182
  47. R_AARCH64_P32_RELATIVE R_AARCH64 = 183
  48. R_AARCH64_P32_TLS_DTPMOD R_AARCH64 = 184
  49. R_AARCH64_P32_TLS_DTPREL R_AARCH64 = 185
  50. R_AARCH64_P32_TLS_TPREL R_AARCH64 = 186
  51. R_AARCH64_P32_TLSDESC R_AARCH64 = 187
  52. R_AARCH64_P32_IRELATIVE R_AARCH64 = 188
  53. R_AARCH64_NULL R_AARCH64 = 256
  54. R_AARCH64_ABS64 R_AARCH64 = 257
  55. R_AARCH64_ABS32 R_AARCH64 = 258
  56. R_AARCH64_ABS16 R_AARCH64 = 259
  57. R_AARCH64_PREL64 R_AARCH64 = 260
  58. R_AARCH64_PREL32 R_AARCH64 = 261
  59. R_AARCH64_PREL16 R_AARCH64 = 262
  60. R_AARCH64_MOVW_UABS_G0 R_AARCH64 = 263
  61. R_AARCH64_MOVW_UABS_G0_NC R_AARCH64 = 264
  62. R_AARCH64_MOVW_UABS_G1 R_AARCH64 = 265
  63. R_AARCH64_MOVW_UABS_G1_NC R_AARCH64 = 266
  64. R_AARCH64_MOVW_UABS_G2 R_AARCH64 = 267
  65. R_AARCH64_MOVW_UABS_G2_NC R_AARCH64 = 268
  66. R_AARCH64_MOVW_UABS_G3 R_AARCH64 = 269
  67. R_AARCH64_MOVW_SABS_G0 R_AARCH64 = 270
  68. R_AARCH64_MOVW_SABS_G1 R_AARCH64 = 271
  69. R_AARCH64_MOVW_SABS_G2 R_AARCH64 = 272
  70. R_AARCH64_LD_PREL_LO19 R_AARCH64 = 273
  71. R_AARCH64_ADR_PREL_LO21 R_AARCH64 = 274
  72. R_AARCH64_ADR_PREL_PG_HI21 R_AARCH64 = 275
  73. R_AARCH64_ADR_PREL_PG_HI21_NC R_AARCH64 = 276
  74. R_AARCH64_ADD_ABS_LO12_NC R_AARCH64 = 277
  75. R_AARCH64_LDST8_ABS_LO12_NC R_AARCH64 = 278
  76. R_AARCH64_TSTBR14 R_AARCH64 = 279
  77. R_AARCH64_CONDBR19 R_AARCH64 = 280
  78. R_AARCH64_JUMP26 R_AARCH64 = 282
  79. R_AARCH64_CALL26 R_AARCH64 = 283
  80. R_AARCH64_LDST16_ABS_LO12_NC R_AARCH64 = 284
  81. R_AARCH64_LDST32_ABS_LO12_NC R_AARCH64 = 285
  82. R_AARCH64_LDST64_ABS_LO12_NC R_AARCH64 = 286
  83. R_AARCH64_LDST128_ABS_LO12_NC R_AARCH64 = 299
  84. R_AARCH64_GOT_LD_PREL19 R_AARCH64 = 309
  85. R_AARCH64_LD64_GOTOFF_LO15 R_AARCH64 = 310
  86. R_AARCH64_ADR_GOT_PAGE R_AARCH64 = 311
  87. R_AARCH64_LD64_GOT_LO12_NC R_AARCH64 = 312
  88. R_AARCH64_LD64_GOTPAGE_LO15 R_AARCH64 = 313
  89. R_AARCH64_TLSGD_ADR_PREL21 R_AARCH64 = 512
  90. R_AARCH64_TLSGD_ADR_PAGE21 R_AARCH64 = 513
  91. R_AARCH64_TLSGD_ADD_LO12_NC R_AARCH64 = 514
  92. R_AARCH64_TLSGD_MOVW_G1 R_AARCH64 = 515
  93. R_AARCH64_TLSGD_MOVW_G0_NC R_AARCH64 = 516
  94. R_AARCH64_TLSLD_ADR_PREL21 R_AARCH64 = 517
  95. R_AARCH64_TLSLD_ADR_PAGE21 R_AARCH64 = 518
  96. R_AARCH64_TLSIE_MOVW_GOTTPREL_G1 R_AARCH64 = 539
  97. R_AARCH64_TLSIE_MOVW_GOTTPREL_G0_NC R_AARCH64 = 540
  98. R_AARCH64_TLSIE_ADR_GOTTPREL_PAGE21 R_AARCH64 = 541
  99. R_AARCH64_TLSIE_LD64_GOTTPREL_LO12_NC R_AARCH64 = 542
  100. R_AARCH64_TLSIE_LD_GOTTPREL_PREL19 R_AARCH64 = 543
  101. R_AARCH64_TLSLE_MOVW_TPREL_G2 R_AARCH64 = 544
  102. R_AARCH64_TLSLE_MOVW_TPREL_G1 R_AARCH64 = 545
  103. R_AARCH64_TLSLE_MOVW_TPREL_G1_NC R_AARCH64 = 546
  104. R_AARCH64_TLSLE_MOVW_TPREL_G0 R_AARCH64 = 547
  105. R_AARCH64_TLSLE_MOVW_TPREL_G0_NC R_AARCH64 = 548
  106. R_AARCH64_TLSLE_ADD_TPREL_HI12 R_AARCH64 = 549
  107. R_AARCH64_TLSLE_ADD_TPREL_LO12 R_AARCH64 = 550
  108. R_AARCH64_TLSLE_ADD_TPREL_LO12_NC R_AARCH64 = 551
  109. R_AARCH64_TLSDESC_LD_PREL19 R_AARCH64 = 560
  110. R_AARCH64_TLSDESC_ADR_PREL21 R_AARCH64 = 561
  111. R_AARCH64_TLSDESC_ADR_PAGE21 R_AARCH64 = 562
  112. R_AARCH64_TLSDESC_LD64_LO12_NC R_AARCH64 = 563
  113. R_AARCH64_TLSDESC_ADD_LO12_NC R_AARCH64 = 564
  114. R_AARCH64_TLSDESC_OFF_G1 R_AARCH64 = 565
  115. R_AARCH64_TLSDESC_OFF_G0_NC R_AARCH64 = 566
  116. R_AARCH64_TLSDESC_LDR R_AARCH64 = 567
  117. R_AARCH64_TLSDESC_ADD R_AARCH64 = 568
  118. R_AARCH64_TLSDESC_CALL R_AARCH64 = 569
  119. R_AARCH64_TLSLE_LDST128_TPREL_LO12 R_AARCH64 = 570
  120. R_AARCH64_TLSLE_LDST128_TPREL_LO12_NC R_AARCH64 = 571
  121. R_AARCH64_TLSLD_LDST128_DTPREL_LO12 R_AARCH64 = 572
  122. R_AARCH64_TLSLD_LDST128_DTPREL_LO12_NC R_AARCH64 = 573
  123. R_AARCH64_COPY R_AARCH64 = 1024
  124. R_AARCH64_GLOB_DAT R_AARCH64 = 1025
  125. R_AARCH64_JUMP_SLOT R_AARCH64 = 1026
  126. R_AARCH64_RELATIVE R_AARCH64 = 1027
  127. R_AARCH64_TLS_DTPMOD64 R_AARCH64 = 1028
  128. R_AARCH64_TLS_DTPREL64 R_AARCH64 = 1029
  129. R_AARCH64_TLS_TPREL64 R_AARCH64 = 1030
  130. R_AARCH64_TLSDESC R_AARCH64 = 1031
  131. R_AARCH64_IRELATIVE R_AARCH64 = 1032
  132. )

func (R_AARCH64) GoString

  1. func (i R_AARCH64) GoString() string

func (R_AARCH64) String

  1. func (i R_AARCH64) String() string

type R_ALPHA

  1. type R_ALPHA int

Relocation types for Alpha.

  1. const (
  2. R_ALPHA_NONE R_ALPHA = 0 /* No reloc */
  3. R_ALPHA_REFLONG R_ALPHA = 1 /* Direct 32 bit */
  4. R_ALPHA_REFQUAD R_ALPHA = 2 /* Direct 64 bit */
  5. R_ALPHA_GPREL32 R_ALPHA = 3 /* GP relative 32 bit */
  6. R_ALPHA_LITERAL R_ALPHA = 4 /* GP relative 16 bit w/optimization */
  7. R_ALPHA_LITUSE R_ALPHA = 5 /* Optimization hint for LITERAL */
  8. R_ALPHA_GPDISP R_ALPHA = 6 /* Add displacement to GP */
  9. R_ALPHA_BRADDR R_ALPHA = 7 /* PC+4 relative 23 bit shifted */
  10. R_ALPHA_HINT R_ALPHA = 8 /* PC+4 relative 16 bit shifted */
  11. R_ALPHA_SREL16 R_ALPHA = 9 /* PC relative 16 bit */
  12. R_ALPHA_SREL32 R_ALPHA = 10 /* PC relative 32 bit */
  13. R_ALPHA_SREL64 R_ALPHA = 11 /* PC relative 64 bit */
  14. R_ALPHA_OP_PUSH R_ALPHA = 12 /* OP stack push */
  15. R_ALPHA_OP_STORE R_ALPHA = 13 /* OP stack pop and store */
  16. R_ALPHA_OP_PSUB R_ALPHA = 14 /* OP stack subtract */
  17. R_ALPHA_OP_PRSHIFT R_ALPHA = 15 /* OP stack right shift */
  18. R_ALPHA_GPVALUE R_ALPHA = 16
  19. R_ALPHA_GPRELHIGH R_ALPHA = 17
  20. R_ALPHA_GPRELLOW R_ALPHA = 18
  21. R_ALPHA_IMMED_GP_16 R_ALPHA = 19
  22. R_ALPHA_IMMED_GP_HI32 R_ALPHA = 20
  23. R_ALPHA_IMMED_SCN_HI32 R_ALPHA = 21
  24. R_ALPHA_IMMED_BR_HI32 R_ALPHA = 22
  25. R_ALPHA_IMMED_LO32 R_ALPHA = 23
  26. R_ALPHA_COPY R_ALPHA = 24 /* Copy symbol at runtime */
  27. R_ALPHA_GLOB_DAT R_ALPHA = 25 /* Create GOT entry */
  28. R_ALPHA_JMP_SLOT R_ALPHA = 26 /* Create PLT entry */
  29. R_ALPHA_RELATIVE R_ALPHA = 27 /* Adjust by program base */
  30. )

func (R_ALPHA) GoString

  1. func (i R_ALPHA) GoString() string

func (R_ALPHA) String

  1. func (i R_ALPHA) String() string

type R_ARM

  1. type R_ARM int

Relocation types for ARM.

  1. const (
  2. R_ARM_NONE R_ARM = 0 /* No relocation. */
  3. R_ARM_PC24 R_ARM = 1
  4. R_ARM_ABS32 R_ARM = 2
  5. R_ARM_REL32 R_ARM = 3
  6. R_ARM_PC13 R_ARM = 4
  7. R_ARM_ABS16 R_ARM = 5
  8. R_ARM_ABS12 R_ARM = 6
  9. R_ARM_THM_ABS5 R_ARM = 7
  10. R_ARM_ABS8 R_ARM = 8
  11. R_ARM_SBREL32 R_ARM = 9
  12. R_ARM_THM_PC22 R_ARM = 10
  13. R_ARM_THM_PC8 R_ARM = 11
  14. R_ARM_AMP_VCALL9 R_ARM = 12
  15. R_ARM_SWI24 R_ARM = 13
  16. R_ARM_THM_SWI8 R_ARM = 14
  17. R_ARM_XPC25 R_ARM = 15
  18. R_ARM_THM_XPC22 R_ARM = 16
  19. R_ARM_TLS_DTPMOD32 R_ARM = 17
  20. R_ARM_TLS_DTPOFF32 R_ARM = 18
  21. R_ARM_TLS_TPOFF32 R_ARM = 19
  22. R_ARM_COPY R_ARM = 20 /* Copy data from shared object. */
  23. R_ARM_GLOB_DAT R_ARM = 21 /* Set GOT entry to data address. */
  24. R_ARM_JUMP_SLOT R_ARM = 22 /* Set GOT entry to code address. */
  25. R_ARM_RELATIVE R_ARM = 23 /* Add load address of shared object. */
  26. R_ARM_GOTOFF R_ARM = 24 /* Add GOT-relative symbol address. */
  27. R_ARM_GOTPC R_ARM = 25 /* Add PC-relative GOT table address. */
  28. R_ARM_GOT32 R_ARM = 26 /* Add PC-relative GOT offset. */
  29. R_ARM_PLT32 R_ARM = 27 /* Add PC-relative PLT offset. */
  30. R_ARM_CALL R_ARM = 28
  31. R_ARM_JUMP24 R_ARM = 29
  32. R_ARM_THM_JUMP24 R_ARM = 30
  33. R_ARM_BASE_ABS R_ARM = 31
  34. R_ARM_ALU_PCREL_7_0 R_ARM = 32
  35. R_ARM_ALU_PCREL_15_8 R_ARM = 33
  36. R_ARM_ALU_PCREL_23_15 R_ARM = 34
  37. R_ARM_LDR_SBREL_11_10_NC R_ARM = 35
  38. R_ARM_ALU_SBREL_19_12_NC R_ARM = 36
  39. R_ARM_ALU_SBREL_27_20_CK R_ARM = 37
  40. R_ARM_TARGET1 R_ARM = 38
  41. R_ARM_SBREL31 R_ARM = 39
  42. R_ARM_V4BX R_ARM = 40
  43. R_ARM_TARGET2 R_ARM = 41
  44. R_ARM_PREL31 R_ARM = 42
  45. R_ARM_MOVW_ABS_NC R_ARM = 43
  46. R_ARM_MOVT_ABS R_ARM = 44
  47. R_ARM_MOVW_PREL_NC R_ARM = 45
  48. R_ARM_MOVT_PREL R_ARM = 46
  49. R_ARM_THM_MOVW_ABS_NC R_ARM = 47
  50. R_ARM_THM_MOVT_ABS R_ARM = 48
  51. R_ARM_THM_MOVW_PREL_NC R_ARM = 49
  52. R_ARM_THM_MOVT_PREL R_ARM = 50
  53. R_ARM_THM_JUMP19 R_ARM = 51
  54. R_ARM_THM_JUMP6 R_ARM = 52
  55. R_ARM_THM_ALU_PREL_11_0 R_ARM = 53
  56. R_ARM_THM_PC12 R_ARM = 54
  57. R_ARM_ABS32_NOI R_ARM = 55
  58. R_ARM_REL32_NOI R_ARM = 56
  59. R_ARM_ALU_PC_G0_NC R_ARM = 57
  60. R_ARM_ALU_PC_G0 R_ARM = 58
  61. R_ARM_ALU_PC_G1_NC R_ARM = 59
  62. R_ARM_ALU_PC_G1 R_ARM = 60
  63. R_ARM_ALU_PC_G2 R_ARM = 61
  64. R_ARM_LDR_PC_G1 R_ARM = 62
  65. R_ARM_LDR_PC_G2 R_ARM = 63
  66. R_ARM_LDRS_PC_G0 R_ARM = 64
  67. R_ARM_LDRS_PC_G1 R_ARM = 65
  68. R_ARM_LDRS_PC_G2 R_ARM = 66
  69. R_ARM_LDC_PC_G0 R_ARM = 67
  70. R_ARM_LDC_PC_G1 R_ARM = 68
  71. R_ARM_LDC_PC_G2 R_ARM = 69
  72. R_ARM_ALU_SB_G0_NC R_ARM = 70
  73. R_ARM_ALU_SB_G0 R_ARM = 71
  74. R_ARM_ALU_SB_G1_NC R_ARM = 72
  75. R_ARM_ALU_SB_G1 R_ARM = 73
  76. R_ARM_ALU_SB_G2 R_ARM = 74
  77. R_ARM_LDR_SB_G0 R_ARM = 75
  78. R_ARM_LDR_SB_G1 R_ARM = 76
  79. R_ARM_LDR_SB_G2 R_ARM = 77
  80. R_ARM_LDRS_SB_G0 R_ARM = 78
  81. R_ARM_LDRS_SB_G1 R_ARM = 79
  82. R_ARM_LDRS_SB_G2 R_ARM = 80
  83. R_ARM_LDC_SB_G0 R_ARM = 81
  84. R_ARM_LDC_SB_G1 R_ARM = 82
  85. R_ARM_LDC_SB_G2 R_ARM = 83
  86. R_ARM_MOVW_BREL_NC R_ARM = 84
  87. R_ARM_MOVT_BREL R_ARM = 85
  88. R_ARM_MOVW_BREL R_ARM = 86
  89. R_ARM_THM_MOVW_BREL_NC R_ARM = 87
  90. R_ARM_THM_MOVT_BREL R_ARM = 88
  91. R_ARM_THM_MOVW_BREL R_ARM = 89
  92. R_ARM_TLS_GOTDESC R_ARM = 90
  93. R_ARM_TLS_CALL R_ARM = 91
  94. R_ARM_TLS_DESCSEQ R_ARM = 92
  95. R_ARM_THM_TLS_CALL R_ARM = 93
  96. R_ARM_PLT32_ABS R_ARM = 94
  97. R_ARM_GOT_ABS R_ARM = 95
  98. R_ARM_GOT_PREL R_ARM = 96
  99. R_ARM_GOT_BREL12 R_ARM = 97
  100. R_ARM_GOTOFF12 R_ARM = 98
  101. R_ARM_GOTRELAX R_ARM = 99
  102. R_ARM_GNU_VTENTRY R_ARM = 100
  103. R_ARM_GNU_VTINHERIT R_ARM = 101
  104. R_ARM_THM_JUMP11 R_ARM = 102
  105. R_ARM_THM_JUMP8 R_ARM = 103
  106. R_ARM_TLS_GD32 R_ARM = 104
  107. R_ARM_TLS_LDM32 R_ARM = 105
  108. R_ARM_TLS_LDO32 R_ARM = 106
  109. R_ARM_TLS_IE32 R_ARM = 107
  110. R_ARM_TLS_LE32 R_ARM = 108
  111. R_ARM_TLS_LDO12 R_ARM = 109
  112. R_ARM_TLS_LE12 R_ARM = 110
  113. R_ARM_TLS_IE12GP R_ARM = 111
  114. R_ARM_PRIVATE_0 R_ARM = 112
  115. R_ARM_PRIVATE_1 R_ARM = 113
  116. R_ARM_PRIVATE_2 R_ARM = 114
  117. R_ARM_PRIVATE_3 R_ARM = 115
  118. R_ARM_PRIVATE_4 R_ARM = 116
  119. R_ARM_PRIVATE_5 R_ARM = 117
  120. R_ARM_PRIVATE_6 R_ARM = 118
  121. R_ARM_PRIVATE_7 R_ARM = 119
  122. R_ARM_PRIVATE_8 R_ARM = 120
  123. R_ARM_PRIVATE_9 R_ARM = 121
  124. R_ARM_PRIVATE_10 R_ARM = 122
  125. R_ARM_PRIVATE_11 R_ARM = 123
  126. R_ARM_PRIVATE_12 R_ARM = 124
  127. R_ARM_PRIVATE_13 R_ARM = 125
  128. R_ARM_PRIVATE_14 R_ARM = 126
  129. R_ARM_PRIVATE_15 R_ARM = 127
  130. R_ARM_ME_TOO R_ARM = 128
  131. R_ARM_THM_TLS_DESCSEQ16 R_ARM = 129
  132. R_ARM_THM_TLS_DESCSEQ32 R_ARM = 130
  133. R_ARM_THM_GOT_BREL12 R_ARM = 131
  134. R_ARM_THM_ALU_ABS_G0_NC R_ARM = 132
  135. R_ARM_THM_ALU_ABS_G1_NC R_ARM = 133
  136. R_ARM_THM_ALU_ABS_G2_NC R_ARM = 134
  137. R_ARM_THM_ALU_ABS_G3 R_ARM = 135
  138. R_ARM_IRELATIVE R_ARM = 160
  139. R_ARM_RXPC25 R_ARM = 249
  140. R_ARM_RSBREL32 R_ARM = 250
  141. R_ARM_THM_RPC22 R_ARM = 251
  142. R_ARM_RREL32 R_ARM = 252
  143. R_ARM_RABS32 R_ARM = 253
  144. R_ARM_RPC24 R_ARM = 254
  145. R_ARM_RBASE R_ARM = 255
  146. )

func (R_ARM) GoString

  1. func (i R_ARM) GoString() string

func (R_ARM) String

  1. func (i R_ARM) String() string

type R_MIPS

  1. type R_MIPS int

Relocation types for MIPS.

  1. const (
  2. R_MIPS_NONE R_MIPS = 0
  3. R_MIPS_16 R_MIPS = 1
  4. R_MIPS_32 R_MIPS = 2
  5. R_MIPS_REL32 R_MIPS = 3
  6. R_MIPS_26 R_MIPS = 4
  7. R_MIPS_HI16 R_MIPS = 5 /* high 16 bits of symbol value */
  8. R_MIPS_LO16 R_MIPS = 6 /* low 16 bits of symbol value */
  9. R_MIPS_GPREL16 R_MIPS = 7 /* GP-relative reference */
  10. R_MIPS_LITERAL R_MIPS = 8 /* Reference to literal section */
  11. R_MIPS_GOT16 R_MIPS = 9 /* Reference to global offset table */
  12. R_MIPS_PC16 R_MIPS = 10 /* 16 bit PC relative reference */
  13. R_MIPS_CALL16 R_MIPS = 11 /* 16 bit call through glbl offset tbl */
  14. R_MIPS_GPREL32 R_MIPS = 12
  15. R_MIPS_SHIFT5 R_MIPS = 16
  16. R_MIPS_SHIFT6 R_MIPS = 17
  17. R_MIPS_64 R_MIPS = 18
  18. R_MIPS_GOT_DISP R_MIPS = 19
  19. R_MIPS_GOT_PAGE R_MIPS = 20
  20. R_MIPS_GOT_OFST R_MIPS = 21
  21. R_MIPS_GOT_HI16 R_MIPS = 22
  22. R_MIPS_GOT_LO16 R_MIPS = 23
  23. R_MIPS_SUB R_MIPS = 24
  24. R_MIPS_INSERT_A R_MIPS = 25
  25. R_MIPS_INSERT_B R_MIPS = 26
  26. R_MIPS_DELETE R_MIPS = 27
  27. R_MIPS_HIGHER R_MIPS = 28
  28. R_MIPS_HIGHEST R_MIPS = 29
  29. R_MIPS_CALL_HI16 R_MIPS = 30
  30. R_MIPS_CALL_LO16 R_MIPS = 31
  31. R_MIPS_SCN_DISP R_MIPS = 32
  32. R_MIPS_REL16 R_MIPS = 33
  33. R_MIPS_ADD_IMMEDIATE R_MIPS = 34
  34. R_MIPS_PJUMP R_MIPS = 35
  35. R_MIPS_RELGOT R_MIPS = 36
  36. R_MIPS_JALR R_MIPS = 37
  37.  
  38. R_MIPS_TLS_DTPMOD32 R_MIPS = 38 /* Module number 32 bit */
  39. R_MIPS_TLS_DTPREL32 R_MIPS = 39 /* Module-relative offset 32 bit */
  40. R_MIPS_TLS_DTPMOD64 R_MIPS = 40 /* Module number 64 bit */
  41. R_MIPS_TLS_DTPREL64 R_MIPS = 41 /* Module-relative offset 64 bit */
  42. R_MIPS_TLS_GD R_MIPS = 42 /* 16 bit GOT offset for GD */
  43. R_MIPS_TLS_LDM R_MIPS = 43 /* 16 bit GOT offset for LDM */
  44. R_MIPS_TLS_DTPREL_HI16 R_MIPS = 44 /* Module-relative offset, high 16 bits */
  45. R_MIPS_TLS_DTPREL_LO16 R_MIPS = 45 /* Module-relative offset, low 16 bits */
  46. R_MIPS_TLS_GOTTPREL R_MIPS = 46 /* 16 bit GOT offset for IE */
  47. R_MIPS_TLS_TPREL32 R_MIPS = 47 /* TP-relative offset, 32 bit */
  48. R_MIPS_TLS_TPREL64 R_MIPS = 48 /* TP-relative offset, 64 bit */
  49. R_MIPS_TLS_TPREL_HI16 R_MIPS = 49 /* TP-relative offset, high 16 bits */
  50. R_MIPS_TLS_TPREL_LO16 R_MIPS = 50 /* TP-relative offset, low 16 bits */
  51. )

func (R_MIPS) GoString

  1. func (i R_MIPS) GoString() string

func (R_MIPS) String

  1. func (i R_MIPS) String() string

type R_PPC

  1. type R_PPC int

Relocation types for PowerPC.

Values that are shared by both RPPC and R_PPC64 are prefixed with R_POWERPC in
the ELF standard. For the RPPC type, the relevant shared relocations have been
renamed with the prefix R_PPC
. The original name follows the value in a
comment.

  1. const (
  2. R_PPC_NONE R_PPC = 0 // R_POWERPC_NONE
  3. R_PPC_ADDR32 R_PPC = 1 // R_POWERPC_ADDR32
  4. R_PPC_ADDR24 R_PPC = 2 // R_POWERPC_ADDR24
  5. R_PPC_ADDR16 R_PPC = 3 // R_POWERPC_ADDR16
  6. R_PPC_ADDR16_LO R_PPC = 4 // R_POWERPC_ADDR16_LO
  7. R_PPC_ADDR16_HI R_PPC = 5 // R_POWERPC_ADDR16_HI
  8. R_PPC_ADDR16_HA R_PPC = 6 // R_POWERPC_ADDR16_HA
  9. R_PPC_ADDR14 R_PPC = 7 // R_POWERPC_ADDR14
  10. R_PPC_ADDR14_BRTAKEN R_PPC = 8 // R_POWERPC_ADDR14_BRTAKEN
  11. R_PPC_ADDR14_BRNTAKEN R_PPC = 9 // R_POWERPC_ADDR14_BRNTAKEN
  12. R_PPC_REL24 R_PPC = 10 // R_POWERPC_REL24
  13. R_PPC_REL14 R_PPC = 11 // R_POWERPC_REL14
  14. R_PPC_REL14_BRTAKEN R_PPC = 12 // R_POWERPC_REL14_BRTAKEN
  15. R_PPC_REL14_BRNTAKEN R_PPC = 13 // R_POWERPC_REL14_BRNTAKEN
  16. R_PPC_GOT16 R_PPC = 14 // R_POWERPC_GOT16
  17. R_PPC_GOT16_LO R_PPC = 15 // R_POWERPC_GOT16_LO
  18. R_PPC_GOT16_HI R_PPC = 16 // R_POWERPC_GOT16_HI
  19. R_PPC_GOT16_HA R_PPC = 17 // R_POWERPC_GOT16_HA
  20. R_PPC_PLTREL24 R_PPC = 18
  21. R_PPC_COPY R_PPC = 19 // R_POWERPC_COPY
  22. R_PPC_GLOB_DAT R_PPC = 20 // R_POWERPC_GLOB_DAT
  23. R_PPC_JMP_SLOT R_PPC = 21 // R_POWERPC_JMP_SLOT
  24. R_PPC_RELATIVE R_PPC = 22 // R_POWERPC_RELATIVE
  25. R_PPC_LOCAL24PC R_PPC = 23
  26. R_PPC_UADDR32 R_PPC = 24 // R_POWERPC_UADDR32
  27. R_PPC_UADDR16 R_PPC = 25 // R_POWERPC_UADDR16
  28. R_PPC_REL32 R_PPC = 26 // R_POWERPC_REL32
  29. R_PPC_PLT32 R_PPC = 27 // R_POWERPC_PLT32
  30. R_PPC_PLTREL32 R_PPC = 28 // R_POWERPC_PLTREL32
  31. R_PPC_PLT16_LO R_PPC = 29 // R_POWERPC_PLT16_LO
  32. R_PPC_PLT16_HI R_PPC = 30 // R_POWERPC_PLT16_HI
  33. R_PPC_PLT16_HA R_PPC = 31 // R_POWERPC_PLT16_HA
  34. R_PPC_SDAREL16 R_PPC = 32
  35. R_PPC_SECTOFF R_PPC = 33 // R_POWERPC_SECTOFF
  36. R_PPC_SECTOFF_LO R_PPC = 34 // R_POWERPC_SECTOFF_LO
  37. R_PPC_SECTOFF_HI R_PPC = 35 // R_POWERPC_SECTOFF_HI
  38. R_PPC_SECTOFF_HA R_PPC = 36 // R_POWERPC_SECTOFF_HA
  39. R_PPC_TLS R_PPC = 67 // R_POWERPC_TLS
  40. R_PPC_DTPMOD32 R_PPC = 68 // R_POWERPC_DTPMOD32
  41. R_PPC_TPREL16 R_PPC = 69 // R_POWERPC_TPREL16
  42. R_PPC_TPREL16_LO R_PPC = 70 // R_POWERPC_TPREL16_LO
  43. R_PPC_TPREL16_HI R_PPC = 71 // R_POWERPC_TPREL16_HI
  44. R_PPC_TPREL16_HA R_PPC = 72 // R_POWERPC_TPREL16_HA
  45. R_PPC_TPREL32 R_PPC = 73 // R_POWERPC_TPREL32
  46. R_PPC_DTPREL16 R_PPC = 74 // R_POWERPC_DTPREL16
  47. R_PPC_DTPREL16_LO R_PPC = 75 // R_POWERPC_DTPREL16_LO
  48. R_PPC_DTPREL16_HI R_PPC = 76 // R_POWERPC_DTPREL16_HI
  49. R_PPC_DTPREL16_HA R_PPC = 77 // R_POWERPC_DTPREL16_HA
  50. R_PPC_DTPREL32 R_PPC = 78 // R_POWERPC_DTPREL32
  51. R_PPC_GOT_TLSGD16 R_PPC = 79 // R_POWERPC_GOT_TLSGD16
  52. R_PPC_GOT_TLSGD16_LO R_PPC = 80 // R_POWERPC_GOT_TLSGD16_LO
  53. R_PPC_GOT_TLSGD16_HI R_PPC = 81 // R_POWERPC_GOT_TLSGD16_HI
  54. R_PPC_GOT_TLSGD16_HA R_PPC = 82 // R_POWERPC_GOT_TLSGD16_HA
  55. R_PPC_GOT_TLSLD16 R_PPC = 83 // R_POWERPC_GOT_TLSLD16
  56. R_PPC_GOT_TLSLD16_LO R_PPC = 84 // R_POWERPC_GOT_TLSLD16_LO
  57. R_PPC_GOT_TLSLD16_HI R_PPC = 85 // R_POWERPC_GOT_TLSLD16_HI
  58. R_PPC_GOT_TLSLD16_HA R_PPC = 86 // R_POWERPC_GOT_TLSLD16_HA
  59. R_PPC_GOT_TPREL16 R_PPC = 87 // R_POWERPC_GOT_TPREL16
  60. R_PPC_GOT_TPREL16_LO R_PPC = 88 // R_POWERPC_GOT_TPREL16_LO
  61. R_PPC_GOT_TPREL16_HI R_PPC = 89 // R_POWERPC_GOT_TPREL16_HI
  62. R_PPC_GOT_TPREL16_HA R_PPC = 90 // R_POWERPC_GOT_TPREL16_HA
  63. R_PPC_EMB_NADDR32 R_PPC = 101
  64. R_PPC_EMB_NADDR16 R_PPC = 102
  65. R_PPC_EMB_NADDR16_LO R_PPC = 103
  66. R_PPC_EMB_NADDR16_HI R_PPC = 104
  67. R_PPC_EMB_NADDR16_HA R_PPC = 105
  68. R_PPC_EMB_SDAI16 R_PPC = 106
  69. R_PPC_EMB_SDA2I16 R_PPC = 107
  70. R_PPC_EMB_SDA2REL R_PPC = 108
  71. R_PPC_EMB_SDA21 R_PPC = 109
  72. R_PPC_EMB_MRKREF R_PPC = 110
  73. R_PPC_EMB_RELSEC16 R_PPC = 111
  74. R_PPC_EMB_RELST_LO R_PPC = 112
  75. R_PPC_EMB_RELST_HI R_PPC = 113
  76. R_PPC_EMB_RELST_HA R_PPC = 114
  77. R_PPC_EMB_BIT_FLD R_PPC = 115
  78. R_PPC_EMB_RELSDA R_PPC = 116
  79. )

func (R_PPC) GoString

  1. func (i R_PPC) GoString() string

func (R_PPC) String

  1. func (i R_PPC) String() string

type R_PPC64

  1. type R_PPC64 int

Relocation types for 64-bit PowerPC or Power Architecture processors.

Values that are shared by both RPPC and R_PPC64 are prefixed with R_POWERPC in
the ELF standard. For the RPPC64 type, the relevant shared relocations have
been renamed with the prefix R_PPC64
. The original name follows the value in a
comment.

  1. const (
  2. R_PPC64_NONE R_PPC64 = 0 // R_POWERPC_NONE
  3. R_PPC64_ADDR32 R_PPC64 = 1 // R_POWERPC_ADDR32
  4. R_PPC64_ADDR24 R_PPC64 = 2 // R_POWERPC_ADDR24
  5. R_PPC64_ADDR16 R_PPC64 = 3 // R_POWERPC_ADDR16
  6. R_PPC64_ADDR16_LO R_PPC64 = 4 // R_POWERPC_ADDR16_LO
  7. R_PPC64_ADDR16_HI R_PPC64 = 5 // R_POWERPC_ADDR16_HI
  8. R_PPC64_ADDR16_HA R_PPC64 = 6 // R_POWERPC_ADDR16_HA
  9. R_PPC64_ADDR14 R_PPC64 = 7 // R_POWERPC_ADDR14
  10. R_PPC64_ADDR14_BRTAKEN R_PPC64 = 8 // R_POWERPC_ADDR14_BRTAKEN
  11. R_PPC64_ADDR14_BRNTAKEN R_PPC64 = 9 // R_POWERPC_ADDR14_BRNTAKEN
  12. R_PPC64_REL24 R_PPC64 = 10 // R_POWERPC_REL24
  13. R_PPC64_REL14 R_PPC64 = 11 // R_POWERPC_REL14
  14. R_PPC64_REL14_BRTAKEN R_PPC64 = 12 // R_POWERPC_REL14_BRTAKEN
  15. R_PPC64_REL14_BRNTAKEN R_PPC64 = 13 // R_POWERPC_REL14_BRNTAKEN
  16. R_PPC64_GOT16 R_PPC64 = 14 // R_POWERPC_GOT16
  17. R_PPC64_GOT16_LO R_PPC64 = 15 // R_POWERPC_GOT16_LO
  18. R_PPC64_GOT16_HI R_PPC64 = 16 // R_POWERPC_GOT16_HI
  19. R_PPC64_GOT16_HA R_PPC64 = 17 // R_POWERPC_GOT16_HA
  20. R_PPC64_JMP_SLOT R_PPC64 = 21 // R_POWERPC_JMP_SLOT
  21. R_PPC64_REL32 R_PPC64 = 26 // R_POWERPC_REL32
  22. R_PPC64_ADDR64 R_PPC64 = 38
  23. R_PPC64_ADDR16_HIGHER R_PPC64 = 39
  24. R_PPC64_ADDR16_HIGHERA R_PPC64 = 40
  25. R_PPC64_ADDR16_HIGHEST R_PPC64 = 41
  26. R_PPC64_ADDR16_HIGHESTA R_PPC64 = 42
  27. R_PPC64_REL64 R_PPC64 = 44
  28. R_PPC64_TOC16 R_PPC64 = 47
  29. R_PPC64_TOC16_LO R_PPC64 = 48
  30. R_PPC64_TOC16_HI R_PPC64 = 49
  31. R_PPC64_TOC16_HA R_PPC64 = 50
  32. R_PPC64_TOC R_PPC64 = 51
  33. R_PPC64_PLTGOT16 R_PPC64 = 52
  34. R_PPC64_PLTGOT16_LO R_PPC64 = 53
  35. R_PPC64_PLTGOT16_HI R_PPC64 = 54
  36. R_PPC64_PLTGOT16_HA R_PPC64 = 55
  37. R_PPC64_ADDR16_DS R_PPC64 = 56
  38. R_PPC64_ADDR16_LO_DS R_PPC64 = 57
  39. R_PPC64_GOT16_DS R_PPC64 = 58
  40. R_PPC64_GOT16_LO_DS R_PPC64 = 59
  41. R_PPC64_PLT16_LO_DS R_PPC64 = 60
  42. R_PPC64_SECTOFF_DS R_PPC64 = 61
  43. R_PPC64_SECTOFF_LO_DS R_PPC64 = 61
  44. R_PPC64_TOC16_DS R_PPC64 = 63
  45. R_PPC64_TOC16_LO_DS R_PPC64 = 64
  46. R_PPC64_PLTGOT16_DS R_PPC64 = 65
  47. R_PPC64_PLTGOT_LO_DS R_PPC64 = 66
  48. R_PPC64_TLS R_PPC64 = 67 // R_POWERPC_TLS
  49. R_PPC64_DTPMOD64 R_PPC64 = 68 // R_POWERPC_DTPMOD64
  50. R_PPC64_TPREL16 R_PPC64 = 69 // R_POWERPC_TPREL16
  51. R_PPC64_TPREL16_LO R_PPC64 = 70 // R_POWERPC_TPREL16_LO
  52. R_PPC64_TPREL16_HI R_PPC64 = 71 // R_POWERPC_TPREL16_HI
  53. R_PPC64_TPREL16_HA R_PPC64 = 72 // R_POWERPC_TPREL16_HA
  54. R_PPC64_TPREL64 R_PPC64 = 73 // R_POWERPC_TPREL64
  55. R_PPC64_DTPREL16 R_PPC64 = 74 // R_POWERPC_DTPREL16
  56. R_PPC64_DTPREL16_LO R_PPC64 = 75 // R_POWERPC_DTPREL16_LO
  57. R_PPC64_DTPREL16_HI R_PPC64 = 76 // R_POWERPC_DTPREL16_HI
  58. R_PPC64_DTPREL16_HA R_PPC64 = 77 // R_POWERPC_DTPREL16_HA
  59. R_PPC64_DTPREL64 R_PPC64 = 78 // R_POWERPC_DTPREL64
  60. R_PPC64_GOT_TLSGD16 R_PPC64 = 79 // R_POWERPC_GOT_TLSGD16
  61. R_PPC64_GOT_TLSGD16_LO R_PPC64 = 80 // R_POWERPC_GOT_TLSGD16_LO
  62. R_PPC64_GOT_TLSGD16_HI R_PPC64 = 81 // R_POWERPC_GOT_TLSGD16_HI
  63. R_PPC64_GOT_TLSGD16_HA R_PPC64 = 82 // R_POWERPC_GOT_TLSGD16_HA
  64. R_PPC64_GOT_TLSLD16 R_PPC64 = 83 // R_POWERPC_GOT_TLSLD16
  65. R_PPC64_GOT_TLSLD16_LO R_PPC64 = 84 // R_POWERPC_GOT_TLSLD16_LO
  66. R_PPC64_GOT_TLSLD16_HI R_PPC64 = 85 // R_POWERPC_GOT_TLSLD16_HI
  67. R_PPC64_GOT_TLSLD16_HA R_PPC64 = 86 // R_POWERPC_GOT_TLSLD16_HA
  68. R_PPC64_GOT_TPREL16_DS R_PPC64 = 87 // R_POWERPC_GOT_TPREL16_DS
  69. R_PPC64_GOT_TPREL16_LO_DS R_PPC64 = 88 // R_POWERPC_GOT_TPREL16_LO_DS
  70. R_PPC64_GOT_TPREL16_HI R_PPC64 = 89 // R_POWERPC_GOT_TPREL16_HI
  71. R_PPC64_GOT_TPREL16_HA R_PPC64 = 90 // R_POWERPC_GOT_TPREL16_HA
  72. R_PPC64_GOT_DTPREL16_DS R_PPC64 = 91 // R_POWERPC_GOT_DTPREL16_DS
  73. R_PPC64_GOT_DTPREL16_LO_DS R_PPC64 = 92 // R_POWERPC_GOT_DTPREL16_LO_DS
  74. R_PPC64_GOT_DTPREL16_HI R_PPC64 = 93 // R_POWERPC_GOT_DTPREL16_HI
  75. R_PPC64_GOT_DTPREL16_HA R_PPC64 = 94 // R_POWERPC_GOT_DTPREL16_HA
  76. R_PPC64_TPREL16_DS R_PPC64 = 95
  77. R_PPC64_TPREL16_LO_DS R_PPC64 = 96
  78. R_PPC64_TPREL16_HIGHER R_PPC64 = 97
  79. R_PPC64_TPREL16_HIGHERA R_PPC64 = 98
  80. R_PPC64_TPREL16_HIGHEST R_PPC64 = 99
  81. R_PPC64_TPREL16_HIGHESTA R_PPC64 = 100
  82. R_PPC64_DTPREL16_DS R_PPC64 = 101
  83. R_PPC64_DTPREL16_LO_DS R_PPC64 = 102
  84. R_PPC64_DTPREL16_HIGHER R_PPC64 = 103
  85. R_PPC64_DTPREL16_HIGHERA R_PPC64 = 104
  86. R_PPC64_DTPREL16_HIGHEST R_PPC64 = 105
  87. R_PPC64_DTPREL16_HIGHESTA R_PPC64 = 106
  88. R_PPC64_TLSGD R_PPC64 = 107
  89. R_PPC64_TLSLD R_PPC64 = 108
  90. R_PPC64_TOCSAVE R_PPC64 = 109
  91. R_PPC64_ADDR16_HIGH R_PPC64 = 110
  92. R_PPC64_ADDR16_HIGHA R_PPC64 = 111
  93. R_PPC64_TPREL16_HIGH R_PPC64 = 112
  94. R_PPC64_TPREL16_HIGHA R_PPC64 = 113
  95. R_PPC64_DTPREL16_HIGH R_PPC64 = 114
  96. R_PPC64_DTPREL16_HIGHA R_PPC64 = 115
  97. R_PPC64_REL24_NOTOC R_PPC64 = 116
  98. R_PPC64_ADDR64_LOCAL R_PPC64 = 117
  99. R_PPC64_ENTRY R_PPC64 = 118
  100. R_PPC64_REL16DX_HA R_PPC64 = 246 // R_POWERPC_REL16DX_HA
  101. R_PPC64_JMP_IREL R_PPC64 = 247
  102. R_PPC64_IRELATIVE R_PPC64 = 248 // R_POWERPC_IRELATIVE
  103. R_PPC64_REL16 R_PPC64 = 249 // R_POWERPC_REL16
  104. R_PPC64_REL16_LO R_PPC64 = 250 // R_POWERPC_REL16_LO
  105. R_PPC64_REL16_HI R_PPC64 = 251 // R_POWERPC_REL16_HI
  106. R_PPC64_REL16_HA R_PPC64 = 252 // R_POWERPC_REL16_HA
  107. )

func (R_PPC64) GoString

func (i R_PPC64) GoString() string

func (R_PPC64) String

func (i R_PPC64) String() string

type R_SPARC

type R_SPARC int

Relocation types for SPARC.

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

type R_X86_64 int

Relocation types for x86-64.

const (
    R_X86_64_NONE            R_X86_64 = 0  /* No relocation. */
    R_X86_64_64              R_X86_64 = 1  /* Add 64 bit symbol value. */
    R_X86_64_PC32            R_X86_64 = 2  /* PC-relative 32 bit signed sym value. */
    R_X86_64_GOT32           R_X86_64 = 3  /* PC-relative 32 bit GOT offset. */
    R_X86_64_PLT32           R_X86_64 = 4  /* PC-relative 32 bit PLT offset. */
    R_X86_64_COPY            R_X86_64 = 5  /* Copy data from shared object. */
    R_X86_64_GLOB_DAT        R_X86_64 = 6  /* Set GOT entry to data address. */
    R_X86_64_JMP_SLOT        R_X86_64 = 7  /* Set GOT entry to code address. */
    R_X86_64_RELATIVE        R_X86_64 = 8  /* Add load address of shared object. */
    R_X86_64_GOTPCREL        R_X86_64 = 9  /* Add 32 bit signed pcrel offset to GOT. */
    R_X86_64_32              R_X86_64 = 10 /* Add 32 bit zero extended symbol value */
    R_X86_64_32S             R_X86_64 = 11 /* Add 32 bit sign extended symbol value */
    R_X86_64_16              R_X86_64 = 12 /* Add 16 bit zero extended symbol value */
    R_X86_64_PC16            R_X86_64 = 13 /* Add 16 bit signed extended pc relative symbol value */
    R_X86_64_8               R_X86_64 = 14 /* Add 8 bit zero extended symbol value */
    R_X86_64_PC8             R_X86_64 = 15 /* Add 8 bit signed extended pc relative symbol value */
    R_X86_64_DTPMOD64        R_X86_64 = 16 /* ID of module containing symbol */
    R_X86_64_DTPOFF64        R_X86_64 = 17 /* Offset in TLS block */
    R_X86_64_TPOFF64         R_X86_64 = 18 /* Offset in static TLS block */
    R_X86_64_TLSGD           R_X86_64 = 19 /* PC relative offset to GD GOT entry */
    R_X86_64_TLSLD           R_X86_64 = 20 /* PC relative offset to LD GOT entry */
    R_X86_64_DTPOFF32        R_X86_64 = 21 /* Offset in TLS block */
    R_X86_64_GOTTPOFF        R_X86_64 = 22 /* PC relative offset to IE GOT entry */
    R_X86_64_TPOFF32         R_X86_64 = 23 /* Offset in static TLS block */
    R_X86_64_PC64            R_X86_64 = 24 /* PC relative 64-bit sign extended symbol value. */
    R_X86_64_GOTOFF64        R_X86_64 = 25
    R_X86_64_GOTPC32         R_X86_64 = 26
    R_X86_64_GOT64           R_X86_64 = 27
    R_X86_64_GOTPCREL64      R_X86_64 = 28
    R_X86_64_GOTPC64         R_X86_64 = 29
    R_X86_64_GOTPLT64        R_X86_64 = 30
    R_X86_64_PLTOFF64        R_X86_64 = 31
    R_X86_64_SIZE32          R_X86_64 = 32
    R_X86_64_SIZE64          R_X86_64 = 33
    R_X86_64_GOTPC32_TLSDESC R_X86_64 = 34
    R_X86_64_TLSDESC_CALL    R_X86_64 = 35
    R_X86_64_TLSDESC         R_X86_64 = 36
    R_X86_64_IRELATIVE       R_X86_64 = 37
    R_X86_64_RELATIVE64      R_X86_64 = 38
    R_X86_64_PC32_BND        R_X86_64 = 39
    R_X86_64_PLT32_BND       R_X86_64 = 40
    R_X86_64_GOTPCRELX       R_X86_64 = 41
    R_X86_64_REX_GOTPCRELX   R_X86_64 = 42
)

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

type Rel32 struct {
    Off  uint32 /* Location to be relocated. */
    Info uint32 /* Relocation type and symbol index. */
}

ELF32 Relocations that don’t need an addend field.

type Rel64

type Rel64 struct {
    Off  uint64 /* Location to be relocated. */
    Info uint64 /* Relocation type and symbol index. */
}

ELF64 relocations that don’t need an addend field.

type Rela32

type Rela32 struct {
    Off    uint32 /* Location to be relocated. */
    Info   uint32 /* Relocation type and symbol index. */
    Addend int32  /* Addend. */
}

ELF32 Relocations that need an addend field.

type Rela64

type Rela64 struct {
    Off    uint64 /* Location to be relocated. */
    Info   uint64 /* Relocation type and symbol index. */
    Addend int64  /* Addend. */
}

ELF64 relocations that need an addend field.

type Section

type Section struct {
    SectionHeader

    // Embed ReaderAt for ReadAt method.
    // Do not embed SectionReader directly
    // to avoid having Read and Seek.
    // If a client wants Read and Seek it must use
    // Open() to avoid fighting over the seek offset
    // with other clients.
    //
    // ReaderAt may be nil if the section is not easily available
    // in a random-access form. For example, a compressed section
    // may have a nil ReaderAt.
    io.ReaderAt
    // contains filtered or unexported fields
}

A Section represents a single section in an ELF file.

func (*Section) Data

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

Data reads and returns the contents of the ELF section. Even if the section is
stored compressed in the ELF file, Data returns uncompressed data.

func (*Section) Open

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

Open returns a new ReadSeeker reading the ELF section. Even if the section is
stored compressed in the ELF file, the ReadSeeker reads uncompressed data.

type Section32

type Section32 struct {
    Name      uint32 /* Section name (index into the section header string table). */
    Type      uint32 /* Section type. */
    Flags     uint32 /* Section flags. */
    Addr      uint32 /* Address in memory image. */
    Off       uint32 /* Offset in file. */
    Size      uint32 /* Size in bytes. */
    Link      uint32 /* Index of a related section. */
    Info      uint32 /* Depends on section type. */
    Addralign uint32 /* Alignment in bytes. */
    Entsize   uint32 /* Size of each entry in section. */
}

ELF32 Section header.

type Section64

type Section64 struct {
    Name      uint32 /* Section name (index into the section header string table). */
    Type      uint32 /* Section type. */
    Flags     uint64 /* Section flags. */
    Addr      uint64 /* Address in memory image. */
    Off       uint64 /* Offset in file. */
    Size      uint64 /* Size in bytes. */
    Link      uint32 /* Index of a related section. */
    Info      uint32 /* Depends on section type. */
    Addralign uint64 /* Alignment in bytes. */
    Entsize   uint64 /* Size of each entry in section. */
}

ELF64 Section header.

type SectionFlag

type SectionFlag uint32

Section flags.

const (
    SHF_WRITE            SectionFlag = 0x1        /* Section contains writable data. */
    SHF_ALLOC            SectionFlag = 0x2        /* Section occupies memory. */
    SHF_EXECINSTR        SectionFlag = 0x4        /* Section contains instructions. */
    SHF_MERGE            SectionFlag = 0x10       /* Section may be merged. */
    SHF_STRINGS          SectionFlag = 0x20       /* Section contains strings. */
    SHF_INFO_LINK        SectionFlag = 0x40       /* sh_info holds section index. */
    SHF_LINK_ORDER       SectionFlag = 0x80       /* Special ordering requirements. */
    SHF_OS_NONCONFORMING SectionFlag = 0x100      /* OS-specific processing required. */
    SHF_GROUP            SectionFlag = 0x200      /* Member of section group. */
    SHF_TLS              SectionFlag = 0x400      /* Section contains TLS data. */
    SHF_COMPRESSED       SectionFlag = 0x800      /* Section is compressed. */
    SHF_MASKOS           SectionFlag = 0x0ff00000 /* OS-specific semantics. */
    SHF_MASKPROC         SectionFlag = 0xf0000000 /* Processor-specific semantics. */
)

func (SectionFlag) GoString

func (i SectionFlag) GoString() string

func (SectionFlag) String

func (i SectionFlag) String() string

type SectionHeader

type SectionHeader struct {
    Name      string
    Type      SectionType
    Flags     SectionFlag
    Addr      uint64
    Offset    uint64
    Size      uint64
    Link      uint32
    Info      uint32
    Addralign uint64
    Entsize   uint64

    // FileSize is the size of this section in the file in bytes.
    // If a section is compressed, FileSize is the size of the
    // compressed data, while Size (above) is the size of the
    // uncompressed data.
    FileSize uint64
}

A SectionHeader represents a single ELF section header.

type SectionIndex

type SectionIndex int

Special section indices.

const (
    SHN_UNDEF     SectionIndex = 0      /* Undefined, missing, irrelevant. */
    SHN_LORESERVE SectionIndex = 0xff00 /* First of reserved range. */
    SHN_LOPROC    SectionIndex = 0xff00 /* First processor-specific. */
    SHN_HIPROC    SectionIndex = 0xff1f /* Last processor-specific. */
    SHN_LOOS      SectionIndex = 0xff20 /* First operating system-specific. */
    SHN_HIOS      SectionIndex = 0xff3f /* Last operating system-specific. */
    SHN_ABS       SectionIndex = 0xfff1 /* Absolute values. */
    SHN_COMMON    SectionIndex = 0xfff2 /* Common data. */
    SHN_XINDEX    SectionIndex = 0xffff /* Escape; index stored elsewhere. */
    SHN_HIRESERVE SectionIndex = 0xffff /* Last of reserved range. */
)

func (SectionIndex) GoString

func (i SectionIndex) GoString() string

func (SectionIndex) String

func (i SectionIndex) String() string

type SectionType

type SectionType uint32

Section type.

const (
    SHT_NULL           SectionType = 0          /* inactive */
    SHT_PROGBITS       SectionType = 1          /* program defined information */
    SHT_SYMTAB         SectionType = 2          /* symbol table section */
    SHT_STRTAB         SectionType = 3          /* string table section */
    SHT_RELA           SectionType = 4          /* relocation section with addends */
    SHT_HASH           SectionType = 5          /* symbol hash table section */
    SHT_DYNAMIC        SectionType = 6          /* dynamic section */
    SHT_NOTE           SectionType = 7          /* note section */
    SHT_NOBITS         SectionType = 8          /* no space section */
    SHT_REL            SectionType = 9          /* relocation section - no addends */
    SHT_SHLIB          SectionType = 10         /* reserved - purpose unknown */
    SHT_DYNSYM         SectionType = 11         /* dynamic symbol table section */
    SHT_INIT_ARRAY     SectionType = 14         /* Initialization function pointers. */
    SHT_FINI_ARRAY     SectionType = 15         /* Termination function pointers. */
    SHT_PREINIT_ARRAY  SectionType = 16         /* Pre-initialization function ptrs. */
    SHT_GROUP          SectionType = 17         /* Section group. */
    SHT_SYMTAB_SHNDX   SectionType = 18         /* Section indexes (see SHN_XINDEX). */
    SHT_LOOS           SectionType = 0x60000000 /* First of OS specific semantics */
    SHT_GNU_ATTRIBUTES SectionType = 0x6ffffff5 /* GNU object attributes */
    SHT_GNU_HASH       SectionType = 0x6ffffff6 /* GNU hash table */
    SHT_GNU_LIBLIST    SectionType = 0x6ffffff7 /* GNU prelink library list */
    SHT_GNU_VERDEF     SectionType = 0x6ffffffd /* GNU version definition section */
    SHT_GNU_VERNEED    SectionType = 0x6ffffffe /* GNU version needs section */
    SHT_GNU_VERSYM     SectionType = 0x6fffffff /* GNU version symbol table */
    SHT_HIOS           SectionType = 0x6fffffff /* Last of OS specific semantics */
    SHT_LOPROC         SectionType = 0x70000000 /* reserved range for processor */
    SHT_HIPROC         SectionType = 0x7fffffff /* specific section header types */
    SHT_LOUSER         SectionType = 0x80000000 /* reserved range for application */
    SHT_HIUSER         SectionType = 0xffffffff /* specific indexes */
)

func (SectionType) GoString

func (i SectionType) GoString() string

func (SectionType) String

func (i SectionType) String() string

type Sym32

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

ELF32 Symbol.

type Sym64

type Sym64 struct {
    Name  uint32 /* String table index of name. */
    Info  uint8  /* Type and binding information. */
    Other uint8  /* Reserved (not used). */
    Shndx uint16 /* Section index of symbol. */
    Value uint64 /* Symbol value. */
    Size  uint64 /* Size of associated object. */
}

ELF64 symbol table entries.

type SymBind

type SymBind int

Symbol Binding - ELFNN_ST_BIND - st_info

const (
    STB_LOCAL  SymBind = 0  /* Local symbol */
    STB_GLOBAL SymBind = 1  /* Global symbol */
    STB_WEAK   SymBind = 2  /* like global - lower precedence */
    STB_LOOS   SymBind = 10 /* Reserved range for operating system */
    STB_HIOS   SymBind = 12 /*   specific semantics. */
    STB_LOPROC SymBind = 13 /* reserved range for processor */
    STB_HIPROC SymBind = 15 /*   specific semantics. */
)

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

type SymType int

Symbol type - ELFNN_ST_TYPE - st_info

const (
    STT_NOTYPE  SymType = 0  /* Unspecified type. */
    STT_OBJECT  SymType = 1  /* Data object. */
    STT_FUNC    SymType = 2  /* Function. */
    STT_SECTION SymType = 3  /* Section. */
    STT_FILE    SymType = 4  /* Source file. */
    STT_COMMON  SymType = 5  /* Uninitialized common block. */
    STT_TLS     SymType = 6  /* TLS object. */
    STT_LOOS    SymType = 10 /* Reserved range for operating system */
    STT_HIOS    SymType = 12 /*   specific semantics. */
    STT_LOPROC  SymType = 13 /* reserved range for processor */
    STT_HIPROC  SymType = 15 /*   specific semantics. */
)

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

type SymVis int

Symbol visibility - ELFNN_ST_VISIBILITY - st_other

const (
    STV_DEFAULT   SymVis = 0x0 /* Default visibility (see binding). */
    STV_INTERNAL  SymVis = 0x1 /* Special meaning in relocatable objects. */
    STV_HIDDEN    SymVis = 0x2 /* Not visible. */
    STV_PROTECTED SymVis = 0x3 /* Visible but not preemptible. */
)

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

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

A Symbol represents an entry in an ELF symbol table section.

type Type

type Type uint16

Type is found in Header.Type.

const (
    ET_NONE   Type = 0      /* Unknown type. */
    ET_REL    Type = 1      /* Relocatable. */
    ET_EXEC   Type = 2      /* Executable. */
    ET_DYN    Type = 3      /* Shared object. */
    ET_CORE   Type = 4      /* Core file. */
    ET_LOOS   Type = 0xfe00 /* First operating system specific. */
    ET_HIOS   Type = 0xfeff /* Last operating system-specific. */
    ET_LOPROC Type = 0xff00 /* First processor-specific. */
    ET_HIPROC Type = 0xffff /* Last processor-specific. */
)

func (Type) GoString

func (i Type) GoString() string

func (Type) String

func (i Type) String() string

type Version

type Version byte

Version is found in Header.Ident[EI_VERSION] and Header.Version.

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