Commit 44211c14 authored by Alex Brainman's avatar Alex Brainman

cmd/link: remove pensect

Change-Id: Ia4abb76a8fa9e9ab280cd9162238ebd3fba79e4d
Reviewed-on: https://go-review.googlesource.com/56318Reviewed-by: default avatarIan Lance Taylor <iant@golang.org>
parent 97246527
...@@ -322,8 +322,6 @@ var PEFILEHEADR int32 ...@@ -322,8 +322,6 @@ var PEFILEHEADR int32
var pe64 int var pe64 int
var pensect int
var nextsectoff int var nextsectoff int
var nextfileoff int var nextfileoff int
...@@ -471,7 +469,6 @@ func (f *peFile) addSection(name string, sectsize int, filesize int) *peSection ...@@ -471,7 +469,6 @@ func (f *peFile) addSection(name string, sectsize int, filesize int) *peSection
nextfileoff += int(sect.SizeOfRawData) nextfileoff += int(sect.SizeOfRawData)
} }
f.sections = append(f.sections, sect) f.sections = append(f.sections, sect)
pensect++
return sect return sect
} }
...@@ -1269,7 +1266,7 @@ func Asmbpe(ctxt *Link) { ...@@ -1269,7 +1266,7 @@ func Asmbpe(ctxt *Link) {
peemitreloc(ctxt, t, d, c) peemitreloc(ctxt, t, d, c)
} }
fh.NumberOfSections = uint16(pensect) fh.NumberOfSections = uint16(len(pefile.sections))
// Being able to produce identical output for identical input is // Being able to produce identical output for identical input is
// much more beneficial than having build timestamp in the header. // much more beneficial than having build timestamp in the header.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment