cmd/link: process data symbols with slices

First (and largest single) step to switching cmd/link from linked
lists of symbols to slices.

Sort sections independently and concurrently.
This reduces jujud link times on linux/amd64 by ~4%.

Updates #15374

Change-Id: I452bc8f33081039468636502fe3c1cc8d6ed9efa
Reviewed-on: https://go-review.googlesource.com/22205
Reviewed-by: Michael Hudson-Doyle <michael.hudson@canonical.com>
This commit is contained in:
David Crawshaw 2016-04-18 14:50:14 -04:00
parent cda0aa1680
commit ed41054b6d
5 changed files with 380 additions and 296 deletions

View file

@ -130,7 +130,6 @@ func (r *Rpath) String() string {
var (
Thearch Arch
datap *LSym
Debug [128]int
Lcsize int32
rpath Rpath
@ -2109,7 +2108,7 @@ func undef() {
for s := Ctxt.Textp; s != nil; s = s.Next {
undefsym(s)
}
for s := datap; s != nil; s = s.Next {
for _, s := range datap {
undefsym(s)
}
if nerrors > 0 {