import "debug/elf"
Package elf implements access to ELF object files.
Indexes into the Header.Ident array.
Magic number for the elf trampoline, chosen wisely to be an immediate value.
Initial magic number for ELF files.
ErrNoSymbols is returned by File.Symbols and File.DynamicSymbols if there is no such section in the File.
ELF32 Compression header.
ELF64 Compression header.
Class is found in Header.Ident[EI_CLASS] and Header.Class.
Section compression type.
Data is found in Header.Ident[EI_DATA] and Header.Data.
ELF32 Dynamic structure. The ".dynamic" section contains an array of them.
ELF64 Dynamic structure. The ".dynamic" section contains an array of them.
DT_FLAGS values.
Dyn.Tag
A File represents an open ELF file.
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.
Open opens the named file using os.Open and prepares it for use as an ELF binary.
Close closes the File. If the File was created using NewFile directly instead of Open, Close has no effect.
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.
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].
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.
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.
Section returns a section with the given name, or nil if no such section exists.
SectionByType returns the first section in f with the given type, or nil if there is no such section.
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].
A FileHeader represents an ELF file header.
ELF32 File header.
ELF64 file header.
Machine is found in Header.Machine.
NType values; used in core files.
OSABI is found in Header.Ident[EI_OSABI] and Header.OSABI.
A Prog represents a single ELF program header in an ELF binary.
Open returns a new ReadSeeker reading the ELF program body.
ELF32 Program header.
ELF64 Program header.
Prog.Flag
A ProgHeader represents a single ELF program header.
Prog.Type
Relocation types for 386.
Relocation types for s390x processors.
Relocation types for AArch64 (aka arm64)
Relocation types for Alpha.
Relocation types for ARM.
Relocation types for MIPS.
Relocation types for PowerPC.
Relocation types for 64-bit PowerPC or Power Architecture processors.
Relocation types for SPARC.
Relocation types for x86-64.
ELF32 Relocations that don't need an addend field.
ELF64 relocations that don't need an addend field.
ELF32 Relocations that need an addend field.
ELF64 relocations that need an addend field.
A Section represents a single section in an ELF file.
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.
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.
ELF32 Section header.
ELF64 Section header.
Section flags.
A SectionHeader represents a single ELF section header.
Special section indices.
Section type.
ELF32 Symbol.
ELF64 symbol table entries.
Symbol Binding - ELFNN_ST_BIND - st_info
Symbol type - ELFNN_ST_TYPE - st_info
Symbol visibility - ELFNN_ST_VISIBILITY - st_other
A Symbol represents an entry in an ELF symbol table section.
Type is found in Header.Type.
Version is found in Header.Ident[EI_VERSION] and Header.Version.