mirror of
https://github.com/golang/go
synced 2024-11-13 13:30:24 -07:00
cmd/link: raise pe export cap to 65535
fixes #68405
Change-Id: I043e16f43daa336005695f82a53f9a52cd770656
GitHub-Last-Rev: 69f1ae8b64
GitHub-Pull-Request: golang/go#68409
Reviewed-on: https://go-review.googlesource.com/c/go/+/597956
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Reviewed-by: Zxilly Chou <zxilly@outlook.com>
Reviewed-by: Than McIntosh <thanm@google.com>
This commit is contained in:
parent
5f073d361f
commit
78c0ea5df7
@ -16,6 +16,7 @@ import (
|
||||
"encoding/binary"
|
||||
"fmt"
|
||||
"internal/buildcfg"
|
||||
"math"
|
||||
"sort"
|
||||
"strconv"
|
||||
"strings"
|
||||
@ -307,7 +308,7 @@ var (
|
||||
pe64 int
|
||||
dr *Dll
|
||||
|
||||
dexport = make([]loader.Sym, 0, 1024)
|
||||
dexport []loader.Sym
|
||||
)
|
||||
|
||||
// peStringTable is a COFF string table.
|
||||
@ -1390,7 +1391,7 @@ func initdynexport(ctxt *Link) {
|
||||
if !ldr.AttrReachable(s) || !ldr.AttrCgoExportDynamic(s) {
|
||||
continue
|
||||
}
|
||||
if len(dexport)+1 > cap(dexport) {
|
||||
if len(dexport) >= math.MaxUint16 {
|
||||
ctxt.Errorf(s, "pe dynexport table is full")
|
||||
errorexit()
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user