aboutsummaryrefslogtreecommitdiff
path: root/src/debug/pe/string.go
diff options
context:
space:
mode:
authorAlex Brainman <alex.brainman@gmail.com>2016-05-03 16:37:33 +1000
committerAlex Brainman <alex.brainman@gmail.com>2016-05-05 00:20:45 +0000
commit57be1607d975ebec2f5faecea068f2db31abc041 (patch)
treef619f508f3505636c3dcdda42bc75422d0158a14 /src/debug/pe/string.go
parent27d0d849fe7802794c74d049f5e8e1b0be018f9a (diff)
downloadgo-57be1607d975ebec2f5faecea068f2db31abc041.tar.xz
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 <crawshaw@golang.org> Run-TryBot: Alex Brainman <alex.brainman@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
Diffstat (limited to 'src/debug/pe/string.go')
-rw-r--r--src/debug/pe/string.go10
1 files changed, 5 insertions, 5 deletions
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)