From 57be1607d975ebec2f5faecea068f2db31abc041 Mon Sep 17 00:00:00 2001 From: Alex Brainman Date: Tue, 3 May 2016 16:37:33 +1000 Subject: debug/pe: unexport newly introduced identifiers CLs 22181, 22332 and 22336 intorduced new functionality to be used in cmd/link (see issue #15345 for details). But we didn't have chance to use new functionality yet. Unexport newly introduced identifiers, so we don't have to commit to the API until we actually tried it. Rename File.COFFSymbols into File._COFFSymbols, COFFSymbol.FullName into COFFSymbol._FullName, Section.Relocs into Section._Relocs, Reloc into _Relocs, File.StringTable into File._StringTable and StringTable into _StringTable. Updates #15345 Change-Id: I770eeb61f855de85e0c175225d5d1c006869b9ec Reviewed-on: https://go-review.googlesource.com/22720 Reviewed-by: David Crawshaw Run-TryBot: Alex Brainman TryBot-Result: Gobot Gobot --- src/debug/pe/section.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/debug/pe/section.go') diff --git a/src/debug/pe/section.go b/src/debug/pe/section.go index 5d881577d3..8e6690f082 100644 --- a/src/debug/pe/section.go +++ b/src/debug/pe/section.go @@ -28,7 +28,7 @@ type SectionHeader32 struct { // fullName finds real name of section sh. Normally name is stored // in sh.Name, but if it is longer then 8 characters, it is stored // in COFF string table st instead. -func (sh *SectionHeader32) fullName(st StringTable) (string, error) { +func (sh *SectionHeader32) fullName(st _StringTable) (string, error) { if sh.Name[0] != '/' { return cstring(sh.Name[:]), nil } @@ -41,15 +41,15 @@ func (sh *SectionHeader32) fullName(st StringTable) (string, error) { // TODO(brainman): copy all IMAGE_REL_* consts from ldpe.go here -// Reloc represents a PE COFF relocation. +// _Reloc represents a PE COFF relocation. // Each section contains its own relocation list. -type Reloc struct { +type _Reloc struct { VirtualAddress uint32 SymbolTableIndex uint32 Type uint16 } -func readRelocs(sh *SectionHeader, r io.ReadSeeker) ([]Reloc, error) { +func readRelocs(sh *SectionHeader, r io.ReadSeeker) ([]_Reloc, error) { if sh.NumberOfRelocations <= 0 { return nil, nil } @@ -57,7 +57,7 @@ func readRelocs(sh *SectionHeader, r io.ReadSeeker) ([]Reloc, error) { if err != nil { return nil, fmt.Errorf("fail to seek to %q section relocations: %v", sh.Name, err) } - relocs := make([]Reloc, sh.NumberOfRelocations) + relocs := make([]_Reloc, sh.NumberOfRelocations) err = binary.Read(r, binary.LittleEndian, relocs) if err != nil { return nil, fmt.Errorf("fail to read section relocations: %v", err) @@ -83,7 +83,7 @@ type SectionHeader struct { // Section provides access to PE COFF section. type Section struct { SectionHeader - Relocs []Reloc + _Relocs []_Reloc // Embed ReaderAt for ReadAt method. // Do not embed SectionReader directly -- cgit v1.3-5-g9baa