]> Cypherpunks repositories - gostls13.git/commitdiff
[dev.link] cmd/link: sort DynidSyms
authorCherry Zhang <cherryyz@google.com>
Sun, 26 Apr 2020 17:19:32 +0000 (13:19 -0400)
committerCherry Zhang <cherryyz@google.com>
Mon, 27 Apr 2020 13:55:35 +0000 (13:55 +0000)
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>
src/cmd/link/internal/loader/loader.go

index 5d62690f8269e6a7a177ad54aa8d4f5f34b7a280..30121d4cbaed9d7be2e3584f5d096c2c77347cf1 100644 (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
 }