aboutsummaryrefslogtreecommitdiff
path: root/src/debug/pe/section.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/section.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/section.go')
-rw-r--r--src/debug/pe/section.go12
1 files changed, 6 insertions, 6 deletions
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