go/src/internal/xcoff/file.go

type SectionHeader

type Section

type AuxiliaryCSect

type AuxiliaryFcn

type Symbol

type Reloc

type ImportedSymbol

type FileHeader

type File

// Open opens the named file using os.Open and prepares it for use as an XCOFF binary.
func Open(name string) (*File, error) {}

// Close closes the File.
// If the File was created using NewFile directly instead of Open,
// Close has no effect.
func (f *File) Close() error {}

// Section returns the first section with the given name, or nil if no such
// section exists.
// Xcoff have section's name limited to 8 bytes. Some sections like .gosymtab
// can be trunked but this method will still find them.
func (f *File) Section(name string) *Section {}

// SectionByType returns the first section in f with the
// given type, or nil if there is no such section.
func (f *File) SectionByType(typ uint32) *Section {}

// cstring converts ASCII byte sequence b to string.
// It stops once it finds 0 or reaches end of b.
func cstring(b []byte) string {}

// getString extracts a string from an XCOFF string table.
func getString(st []byte, offset uint32) (string, bool) {}

// NewFile creates a new File for accessing an XCOFF binary in an underlying reader.
func NewFile(r io.ReaderAt) (*File, error) {}

type nobitsSectionReader

func (*nobitsSectionReader) ReadAt(p []byte, off int64) (n int, err error) {}

// Data reads and returns the contents of the XCOFF section s.
func (s *Section) Data() ([]byte, error) {}

// CSect reads and returns the contents of a csect.
func (f *File) CSect(name string) []byte {}

func (f *File) DWARF() (*dwarf.Data, error) {}

// readImportID returns the import file IDs stored inside the .loader section.
// Library name pattern is either path/base/member or base/member
func (f *File) readImportIDs(s *Section) ([]string, error) {}

// ImportedSymbols returns the names of all symbols
// referred to by the binary f that are expected to be
// satisfied by other libraries at dynamic load time.
// It does not return weak symbols.
func (f *File) ImportedSymbols() ([]ImportedSymbol, error) {}

// ImportedLibraries returns the names of all libraries
// referred to by the binary f that are expected to be
// linked with the binary at dynamic link time.
func (f *File) ImportedLibraries() ([]string, error) {}