go/src/debug/macho/file.go

type File

type Load

type LoadBytes

func (b LoadBytes) Raw() []byte {}

type SegmentHeader

type Segment

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

// Open returns a new ReadSeeker reading the segment.
func (s *Segment) Open() io.ReadSeeker {}

type SectionHeader

type Reloc

type Section

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

// Open returns a new ReadSeeker reading the Mach-O section.
func (s *Section) Open() io.ReadSeeker {}

type Dylib

type Symtab

type Dysymtab

type Rpath

type Symbol

type FormatError

func (e *FormatError) Error() string {}

// Open opens the named file using [os.Open] and prepares it for use as a Mach-O 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 {}

// NewFile creates a new [File] for accessing a Mach-O binary in an underlying reader.
// The Mach-O binary is expected to start at position 0 in the ReaderAt.
func NewFile(r io.ReaderAt) (*File, error) {}

func (f *File) parseSymtab(symdat, strtab, cmddat []byte, hdr *SymtabCmd, offset int64) (*Symtab, error) {}

type relocInfo

func (f *File) pushSection(sh *Section, r io.ReaderAt) error {}

func cstring(b []byte) string {}

// Segment returns the first Segment with the given name, or nil if no such segment exists.
func (f *File) Segment(name string) *Segment {}

// Section returns the first section with the given name, or nil if no such
// section exists.
func (f *File) Section(name string) *Section {}

// DWARF returns the DWARF debug information for the Mach-O file.
func (f *File) DWARF() (*dwarf.Data, 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.
func (f *File) ImportedSymbols() ([]string, error) {}

// ImportedLibraries returns the paths 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) {}