Documentation
¶
Overview ¶
Package elfwriter is a package to write ELF files without having their entire contents in memory at any one time.
Original work started from https://github.com/go-delve/delve/blob/master/pkg/elfwriter/writer.go and additional functionality added on top.
This package does not provide completeness guarantees, only features needed to write core files are implemented, notably missing: - Consistency and soundness of relocations - Consistency and preservation of linked sections (when target removed (sh_link)) - partially supported - Consistency and existence of overlapping segments when a section removed (offset, range check)
Index ¶
Constants ¶
This section is empty.
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 { Progs []*elf.Prog Sections []*elf.Section // contains filtered or unexported fields }
Writer writes ELF files.
func New ¶
func New(w WriteCloserSeeker, fhdr *elf.FileHeader, opts ...Option) (*Writer, error)
New creates a new Writer.
func (*Writer) WriteNotes ¶
func (w *Writer) WriteNotes(notes []Note) *elf.ProgHeader
WriteNotes writes notes to the current location, returns a ProgHeader describing the notes.