Documentation
¶
Index ¶
- Constants
- func CustomError(original FileError, msg string, args ...any) error
- type File
- func (ef *File) AsBytes() []byte
- func (ef *File) HasSection(name string) bool
- func (ef *File) ReadSection(name string) ([]byte, error)
- func (ef *File) SectionAddress(name string) (uint64, error)
- func (ef *File) SectionSize(name string) (uint64, error)
- func (ef *File) Sections() []string
- func (ef *File) WriteSection(name string, data []byte, offset uint64) error
- type FileError
Constants ¶
View Source
const ( FileOpenErr = FileError("cannot open the file with the passed file name") NoSuchSectionErr = FileError("there is no such section in the passed elf file") OutOfBoundsErr = FileError("attempting to write out of the section bounds") )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type File ¶
type File struct {
// contains filtered or unexported fields
}
File represents the contents of an elf binary file
func (*File) HasSection ¶
HasSection returns whether an elf file has a section named 'name'
func (*File) ReadSection ¶
ReadSection reads the whole specified elf section
func (*File) SectionAddress ¶ added in v0.4.0
SectionAddress returns the address of the section, if it exists
func (*File) SectionSize ¶ added in v0.4.0
SectionSize returns the size of the section, if it exists
Click to show internal directories.
Click to hide internal directories.