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/string.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/debug/pe/string.go') diff --git a/src/debug/pe/string.go b/src/debug/pe/string.go index e00bd97dd4..f5cd130b53 100644 --- a/src/debug/pe/string.go +++ b/src/debug/pe/string.go @@ -19,10 +19,10 @@ func cstring(b []byte) string { return string(b[:i]) } -// StringTable is a COFF string table. -type StringTable []byte +// _StringTable is a COFF string table. +type _StringTable []byte -func readStringTable(fh *FileHeader, r io.ReadSeeker) (StringTable, error) { +func readStringTable(fh *FileHeader, r io.ReadSeeker) (_StringTable, error) { // COFF string table is located right after COFF symbol table. offset := fh.PointerToSymbolTable + COFFSymbolSize*fh.NumberOfSymbols _, err := r.Seek(int64(offset), io.SeekStart) @@ -44,13 +44,13 @@ func readStringTable(fh *FileHeader, r io.ReadSeeker) (StringTable, error) { if err != nil { return nil, fmt.Errorf("fail to read string table: %v", err) } - return StringTable(buf), nil + return _StringTable(buf), nil } // TODO(brainman): decide if start parameter should be int instead of uint32 // String extracts string from COFF string table st at offset start. -func (st StringTable) String(start uint32) (string, error) { +func (st _StringTable) String(start uint32) (string, error) { // start includes 4 bytes of string table length if start < 4 { return "", fmt.Errorf("offset %d is before the start of string table", start) -- cgit v1.3