Documentation ¶
Overview ¶
elfwriter is a package to write ELF files without having their entire contents in memory at any one time. This package is incomplete, only features needed to write core files are implemented, notably missing: - program headers at the beginning of the file
Index ¶
Constants ¶
const ( DelveHeaderNoteType = 0x444C5645 // DLVE DelveThreadNodeType = 0x444C5654 // DLVT DelveHeaderTargetPidPrefix = "Target Pid: " DelveHeaderEntryPointPrefix = "Entry Point: " )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type WriteCloserSeeker ¶
WriteCloserSeeker is the union of io.Writer, io.Closer and io.Seeker.
type Writer ¶
type Writer struct { Err error Progs []*elf.ProgHeader Sections []*elf.SectionHeader // contains filtered or unexported fields }
Writer writes ELF files.
func (*Writer) Align ¶
Align writes as many padding bytes as needed to make the current file offset a multiple of align.
func (*Writer) WriteNotes ¶
func (w *Writer) WriteNotes(notes []Note) *elf.ProgHeader
WriteNotes writes notes to the current location, returns a ProgHeader describing the notes.
func (*Writer) WriteProgramHeaders ¶
func (w *Writer) WriteProgramHeaders()
WriteProgramHeaders writes the program headers at the current location and patches the file header accordingly.
func (*Writer) WriteSectionHeaders ¶
func (w *Writer) WriteSectionHeaders()
WriteSectionHeaders writes the section headers at the current location and patches the file header accordingly.