go/src/cmd/link/internal/ld/pe.go

type IMAGE_IMPORT_DESCRIPTOR

type IMAGE_EXPORT_DIRECTORY

var PEBASE

var PESECTALIGN

var PEFILEALIGN

const IMAGE_SCN_CNT_CODE

const IMAGE_SCN_CNT_INITIALIZED_DATA

const IMAGE_SCN_CNT_UNINITIALIZED_DATA

const IMAGE_SCN_LNK_OTHER

const IMAGE_SCN_LNK_INFO

const IMAGE_SCN_LNK_REMOVE

const IMAGE_SCN_LNK_COMDAT

const IMAGE_SCN_GPREL

const IMAGE_SCN_MEM_PURGEABLE

const IMAGE_SCN_MEM_16BIT

const IMAGE_SCN_MEM_LOCKED

const IMAGE_SCN_MEM_PRELOAD

const IMAGE_SCN_ALIGN_1BYTES

const IMAGE_SCN_ALIGN_2BYTES

const IMAGE_SCN_ALIGN_4BYTES

const IMAGE_SCN_ALIGN_8BYTES

const IMAGE_SCN_ALIGN_16BYTES

const IMAGE_SCN_ALIGN_32BYTES

const IMAGE_SCN_ALIGN_64BYTES

const IMAGE_SCN_ALIGN_128BYTES

const IMAGE_SCN_ALIGN_256BYTES

const IMAGE_SCN_ALIGN_512BYTES

const IMAGE_SCN_ALIGN_1024BYTES

const IMAGE_SCN_ALIGN_2048BYTES

const IMAGE_SCN_ALIGN_4096BYTES

const IMAGE_SCN_ALIGN_8192BYTES

const IMAGE_SCN_LNK_NRELOC_OVFL

const IMAGE_SCN_MEM_DISCARDABLE

const IMAGE_SCN_MEM_NOT_CACHED

const IMAGE_SCN_MEM_NOT_PAGED

const IMAGE_SCN_MEM_SHARED

const IMAGE_SCN_MEM_EXECUTE

const IMAGE_SCN_MEM_READ

const IMAGE_SCN_MEM_WRITE

const IMAGE_SYM_TYPE_NULL

const IMAGE_SYM_TYPE_STRUCT

const IMAGE_SYM_DTYPE_FUNCTION

const IMAGE_SYM_DTYPE_ARRAY

const IMAGE_SYM_CLASS_EXTERNAL

const IMAGE_SYM_CLASS_STATIC

const IMAGE_REL_I386_DIR32

const IMAGE_REL_I386_DIR32NB

const IMAGE_REL_I386_SECREL

const IMAGE_REL_I386_REL32

const IMAGE_REL_AMD64_ADDR64

const IMAGE_REL_AMD64_ADDR32

const IMAGE_REL_AMD64_ADDR32NB

const IMAGE_REL_AMD64_REL32

const IMAGE_REL_AMD64_SECREL

const IMAGE_REL_ARM_ABSOLUTE

const IMAGE_REL_ARM_ADDR32

const IMAGE_REL_ARM_ADDR32NB

const IMAGE_REL_ARM_BRANCH24

const IMAGE_REL_ARM_BRANCH11

const IMAGE_REL_ARM_SECREL

const IMAGE_REL_ARM64_ABSOLUTE

const IMAGE_REL_ARM64_ADDR32

const IMAGE_REL_ARM64_ADDR32NB

const IMAGE_REL_ARM64_BRANCH26

const IMAGE_REL_ARM64_PAGEBASE_REL21

const IMAGE_REL_ARM64_REL21

const IMAGE_REL_ARM64_PAGEOFFSET_12A

const IMAGE_REL_ARM64_PAGEOFFSET_12L

const IMAGE_REL_ARM64_SECREL

const IMAGE_REL_ARM64_SECREL_LOW12A

const IMAGE_REL_ARM64_SECREL_HIGH12A

const IMAGE_REL_ARM64_SECREL_LOW12L

const IMAGE_REL_ARM64_TOKEN

const IMAGE_REL_ARM64_SECTION

const IMAGE_REL_ARM64_ADDR64

const IMAGE_REL_ARM64_BRANCH19

const IMAGE_REL_ARM64_BRANCH14

const IMAGE_REL_ARM64_REL32

const IMAGE_REL_BASED_HIGHLOW

const IMAGE_REL_BASED_DIR64

const PeMinimumTargetMajorVersion

const PeMinimumTargetMinorVersion

var dosstub

type Imp

type Dll

var rsrcsyms

var PESECTHEADR

var PEFILEHEADR

var pe64

var dr

var dexport

type peStringTable

// size returns size of string table t.
func (t *peStringTable) size() int {}

// add adds string str to string table t.
func (t *peStringTable) add(str string) int {}

// write writes string table t into the output file.
func (t *peStringTable) write(out *OutBuf) {}

type peSection

// checkOffset verifies COFF section sect offset in the file.
func (sect *peSection) checkOffset(off int64) {}

// checkSegment verifies COFF section sect matches address
// and file offset provided in segment seg.
func (sect *peSection) checkSegment(seg *sym.Segment) {}

// pad adds zeros to the section sect. It writes as many bytes
// as necessary to make section sect.SizeOfRawData bytes long.
// It assumes that n bytes are already written to the file.
func (sect *peSection) pad(out *OutBuf, n uint32) {}

// write writes COFF section sect into the output file.
func (sect *peSection) write(out *OutBuf, linkmode LinkMode) error {}

// emitRelocations emits the relocation entries for the sect.
// The actual relocations are emitted by relocfn.
// This updates the corresponding PE section table entry
// with the relocation offset and count.
func (sect *peSection) emitRelocations(out *OutBuf, relocfn func() int) {}

type peFile

// addSection adds section to the COFF file f.
func (f *peFile) addSection(name string, sectsize int, filesize int) *peSection {}

// addDWARFSection adds DWARF section to the COFF file f.
// This function is similar to addSection, but DWARF section names are
// longer than 8 characters, so they need to be stored in the string table.
func (f *peFile) addDWARFSection(name string, size int) *peSection {}

// addDWARF adds DWARF information to the COFF file f.
func (f *peFile) addDWARF() {}

// addSEH adds SEH information to the COFF file f.
func (f *peFile) addSEH(ctxt *Link) {}

// addInitArray adds .ctors COFF section to the file f.
func (f *peFile) addInitArray(ctxt *Link) *peSection {}

// emitRelocations emits relocation entries for go.o in external linking.
func (f *peFile) emitRelocations(ctxt *Link) {}

// writeSymbol appends symbol s to file f symbol table.
// It also sets s.Dynid to written symbol number.
func (f *peFile) writeSymbol(out *OutBuf, ldr *loader.Loader, s loader.Sym, name string, value int64, sectidx int, typ uint16, class uint8) {}

// mapToPESection searches peFile f for s symbol's location.
// It returns PE section index, and offset within that section.
func (f *peFile) mapToPESection(ldr *loader.Loader, s loader.Sym, linkmode LinkMode) (pesectidx int, offset int64, err error) {}

var isLabel

func AddPELabelSym(ldr *loader.Loader, s loader.Sym) {}

// writeSymbols writes all COFF symbol table records.
func (f *peFile) writeSymbols(ctxt *Link) {}

// writeSymbolTableAndStringTable writes out symbol and string tables for peFile f.
func (f *peFile) writeSymbolTableAndStringTable(ctxt *Link) {}

// writeFileHeader writes COFF file header for peFile f.
func (f *peFile) writeFileHeader(ctxt *Link) {}

// writeOptionalHeader writes COFF optional header for peFile f.
func (f *peFile) writeOptionalHeader(ctxt *Link) {}

var pefile

func Peinit(ctxt *Link) {}

func pewrite(ctxt *Link) {}

func strput(out *OutBuf, s string) {}

func initdynimport(ctxt *Link) *Dll {}

// peimporteddlls returns the gcc command line argument to link all imported
// DLLs.
func peimporteddlls() []string {}

func addimports(ctxt *Link, datsect *peSection) {}

func initdynexport(ctxt *Link) {}

func addexports(ctxt *Link) {}

type peBaseRelocEntry

type peBaseRelocBlock

type pePages

type peBaseRelocTable

func (rt *peBaseRelocTable) init(ctxt *Link) {}

func (rt *peBaseRelocTable) addentry(ldr *loader.Loader, s loader.Sym, r *loader.Reloc) {}

func (rt *peBaseRelocTable) write(ctxt *Link) {}

func addPEBaseRelocSym(ldr *loader.Loader, s loader.Sym, rt *peBaseRelocTable) {}

func needPEBaseReloc(ctxt *Link) bool {}

func addPEBaseReloc(ctxt *Link) {}

func (ctxt *Link) dope() {}

func setpersrc(ctxt *Link, syms []loader.Sym) {}

func addpersrc(ctxt *Link) {}

func asmbPe(ctxt *Link) {}