# package pe

`import "debug/pe"`

Package pe implements access to PE (Microsoft Windows Portable Executable) files.

file.go pe.go section.go string.go symbol.go

## Constants

## type COFFSymbol

COFFSymbol represents single COFF symbol table record.

### func (*COFFSymbol) FullName

FullName finds real name of symbol sym. Normally name is stored in sym.Name, but if it is longer then 8 characters, it is stored in COFF string table st instead.

## type DataDirectory

## type File

A File represents an open PE file.

### func NewFile

NewFile creates a new File for accessing a PE binary in an underlying reader.

### func Open

Open opens the named file using os.Open and prepares it for use as a PE binary.

### func (*File) Close

Close closes the File. If the File was created using NewFile directly instead of Open, Close has no effect.

### func (*File) DWARF

### func (*File) ImportedLibraries

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 (*File) ImportedSymbols

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 (*File) Section

Section returns the first section with the given name, or nil if no such section exists.

## type FileHeader

## type FormatError

FormatError is unused. The type is retained for compatibility.

### func (*FormatError) Error

## type ImportDirectory

## type OptionalHeader32

## type OptionalHeader64

## type Reloc

Reloc represents a PE COFF relocation. Each section contains its own relocation list.

## type Section

Section provides access to PE COFF section.

### func (*Section) Data

Data reads and returns the contents of the PE section s.

### func (*Section) Open

Open returns a new ReadSeeker reading the PE section s.

## type SectionHeader

SectionHeader is similar to SectionHeader32 with Name field replaced by Go string.

## type SectionHeader32

SectionHeader32 represents real PE COFF section header.

## type StringTable

StringTable is a COFF string table.

### func (StringTable) String

String extracts string from COFF string table st at offset start.

## type Symbol

Symbol is similar to COFFSymbol with Name field replaced by Go string. Symbol also does not have NumberOfAuxSymbols.