package plan9obj

Import Path
	debug/plan9obj (on and

Dependency Relation
	imports 5 packages, and imported by 0 packages

Involved Source Files
	d-> file.go

Exported Type Names

type File (struct) A File represents an open Plan 9 a.out file. FileHeader FileHeader FileHeader.Bss uint32 FileHeader.Entry uint64 FileHeader.HdrSize uint64 FileHeader.LoadAddress uint64 FileHeader.Magic uint32 FileHeader.PtrSize int Sections []*Section Close closes the File. If the File was created using NewFile directly instead of Open, Close has no effect. Section returns a section with the given name, or nil if no such section exists. Symbols returns the symbol table for f. *T : io.Closer func NewFile(r io.ReaderAt) (*File, error) func Open(name string) (*File, error)
type FileHeader (struct) A FileHeader represents a Plan 9 a.out file header. Bss uint32 Entry uint64 HdrSize uint64 LoadAddress uint64 Magic uint32 PtrSize int
type Section (struct) A Section represents a single section in a Plan 9 a.out file. Embed ReaderAt for ReadAt method. Do not embed SectionReader directly to avoid having Read and Seek. If a client wants Read and Seek it must use Open() to avoid fighting over the seek offset with other clients. SectionHeader SectionHeader SectionHeader.Name string SectionHeader.Offset uint32 SectionHeader.Size uint32 Data reads and returns the contents of the Plan 9 a.out section. Open returns a new ReadSeeker reading the Plan 9 a.out section. ( T) ReadAt(p []byte, off int64) (n int, err error) T : io.ReaderAt func (*File).Section(name string) *Section
type SectionHeader (struct) A SectionHeader represents a single Plan 9 a.out section header. This structure doesn't exist on-disk, but eases navigation through the object file. Name string Offset uint32 Size uint32
type Sym (struct) A Symbol represents an entry in a Plan 9 a.out symbol table section. Name string Type rune Value uint64 func (*File).Symbols() ([]Sym, error)
Exported Values
const Magic386 = 491
const Magic64 = 32768 // 64-bit expanded header
const MagicAMD64 = 35479
const MagicARM = 1607
func NewFile(r io.ReaderAt) (*File, error) NewFile creates a new File for accessing a Plan 9 binary in an underlying reader. The Plan 9 binary is expected to start at position 0 in the ReaderAt.
func Open(name string) (*File, error) Open opens the named file using os.Open and prepares it for use as a Plan 9 a.out binary.