1
0
mirror of https://github.com/golang/go synced 2024-11-18 15:44:41 -07:00

[dev.link] cmd/link: sort DynidSyms

Sort DynidSyms to ensure a deterministic build.

Fix Solaris build.

Change-Id: I6c01cb3dec5e46b3d881e720e3c2079643b5c7c7
Reviewed-on: https://go-review.googlesource.com/c/go/+/230277
Run-TryBot: Cherry Zhang <cherryyz@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Than McIntosh <thanm@google.com>
Reviewed-by: Jeremy Faller <jeremy@golang.org>
This commit is contained in:
Cherry Zhang 2020-04-26 13:19:32 -04:00
parent d5c9327628
commit e77639f3a4

View File

@ -1276,6 +1276,7 @@ func (l *Loader) DynidSyms() []Sym {
for s := range l.dynid {
sl = append(sl, s)
}
sort.Slice(sl, func(i, j int) bool { return sl[i] < sl[j] })
return sl
}