mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
[dev.link] cmd/link: ensure deterministic order in dynexp
dynexp is used for generating the dynamic symbol table. It is created from a map. Sort it to ensure deterministic order. Should fix solaris build. Change-Id: I561b9da3a4136a7ea41139073f76c98fb069d4fa Reviewed-on: https://go-review.googlesource.com/c/go/+/204378 Run-TryBot: Cherry Zhang <cherryyz@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Than McIntosh <thanm@google.com>
This commit is contained in:
parent
851b1f40b4
commit
43d25a61c1
2 changed files with 9 additions and 0 deletions
|
|
@ -58,6 +58,7 @@ import (
|
|||
"os/exec"
|
||||
"path/filepath"
|
||||
"runtime"
|
||||
"sort"
|
||||
"strings"
|
||||
"sync"
|
||||
)
|
||||
|
|
@ -540,6 +541,7 @@ func setupdynexp(ctxt *Link) {
|
|||
s := ctxt.Syms.Lookup(exp, 0)
|
||||
dynexp = append(dynexp, s)
|
||||
}
|
||||
sort.Sort(byName(dynexp))
|
||||
|
||||
// Resolve ABI aliases in the list of cgo-exported functions.
|
||||
// This is necessary because we load the ABI0 symbol for all
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue