Documentation
¶
Overview ¶
Package safeelf provides safe (from panics) wrappers around ELF parsing
Index ¶
Constants ¶
View Source
const ELFCLASS32 = elf.ELFCLASS32
View Source
const ELFCLASS64 = elf.ELFCLASS64
View Source
const EM_AARCH64 = elf.EM_AARCH64
View Source
const EM_X86_64 = elf.EM_X86_64
View Source
const ET_DYN = elf.ET_DYN
View Source
const ET_EXEC = elf.ET_EXEC
View Source
const PF_R = elf.PF_R
View Source
const PF_W = elf.PF_W
View Source
const PF_X = elf.PF_X
View Source
const PT_LOAD = elf.PT_LOAD
View Source
const PT_TLS = elf.PT_TLS
View Source
const SHF_ALLOC = elf.SHF_ALLOC
View Source
const SHF_COMPRESSED = elf.SHF_COMPRESSED
View Source
const SHF_EXECINSTR = elf.SHF_EXECINSTR
View Source
const SHF_WRITE = elf.SHF_WRITE
View Source
const SHN_ABS = elf.SHN_ABS
View Source
const SHN_COMMON = elf.SHN_COMMON
View Source
const SHN_UNDEF = elf.SHN_UNDEF
View Source
const SHT_DYNAMIC = elf.SHT_DYNAMIC
View Source
const SHT_DYNSYM = elf.SHT_DYNSYM
View Source
const SHT_GNU_HASH = elf.SHT_GNU_HASH
View Source
const SHT_GNU_VERDEF = elf.SHT_GNU_VERDEF
View Source
const SHT_GNU_VERNEED = elf.SHT_GNU_VERNEED
View Source
const SHT_GNU_VERSYM = elf.SHT_GNU_VERSYM
View Source
const SHT_HASH = elf.SHT_HASH
View Source
const SHT_NOBITS = elf.SHT_NOBITS
View Source
const SHT_NOTE = elf.SHT_NOTE
View Source
const SHT_PROGBITS = elf.SHT_PROGBITS
View Source
const SHT_REL = elf.SHT_REL
View Source
const SHT_RELA = elf.SHT_RELA //nolint:misspell
View Source
const SHT_SYMTAB = elf.SHT_SYMTAB
View Source
const STB_GLOBAL = elf.STB_GLOBAL
View Source
const STB_WEAK = elf.STB_WEAK
View Source
const STT_FILE = elf.STT_FILE
View Source
const STT_FUNC = elf.STT_FUNC
View Source
const STT_OBJECT = elf.STT_OBJECT
View Source
const Sym32Size = elf.Sym32Size
View Source
const Sym64Size = elf.Sym64Size
Variables ¶
View Source
var ErrNoSymbols = elf.ErrNoSymbols
Functions ¶
This section is empty.
Types ¶
type File ¶
File is a safe wrapper around *elf.File that handles any panics in parsing
func NewFile ¶
NewFile reads an ELF safely.
Any panic during parsing is turned into an error. This is necessary since there are a bunch of unfixed bugs in debug/elf.
https://github.com/golang/go/issues?q=is%3Aissue+is%3Aopen+debug%2Felf+in%3Atitle
func Open ¶
Open reads an ELF from a file.
It works like NewFile, with the exception that safe.Close will close the underlying file.
func (*File) DynamicSymbols ¶
DynamicSymbols is the safe version of elf.File.DynamicSymbols.
func (*File) SectionsByType ¶
func (se *File) SectionsByType(typ elf.SectionType) []*elf.Section
SectionsByType returns all sections in the file with the specified section type.
type SectionFlag ¶
type SectionFlag = elf.SectionFlag
type SectionHeader ¶
type SectionHeader = elf.SectionHeader
type SectionIndex ¶
type SectionIndex = elf.SectionIndex
type SectionType ¶
type SectionType = elf.SectionType
Click to show internal directories.
Click to hide internal directories.