1
0
mirror of https://github.com/golang/go synced 2024-11-17 22:14:43 -07:00

cmd/link: link go.o first

Does not fix #12327 but nicer anyway.

Change-Id: I4ad730a4ca833d76957b7571895b3a08a6a530d4
Reviewed-on: https://go-review.googlesource.com/16964
Reviewed-by: Ian Lance Taylor <iant@golang.org>
This commit is contained in:
Russ Cox 2015-11-16 15:45:12 -05:00
parent 918a2644f2
commit 6bf794a36d

View File

@ -1003,8 +1003,8 @@ func archive() {
mayberemoveoutfile()
argv := []string{"ar", "-q", "-c", "-s", outfile}
argv = append(argv, hostobjCopy()...)
argv = append(argv, fmt.Sprintf("%s/go.o", tmpdir))
argv = append(argv, hostobjCopy()...)
if Debug['v'] != 0 {
fmt.Fprintf(&Bso, "archive: %s\n", strings.Join(argv, " "))
@ -1116,8 +1116,8 @@ func hostlink() {
argv = append(argv, "-Qunused-arguments")
}
argv = append(argv, hostobjCopy()...)
argv = append(argv, fmt.Sprintf("%s/go.o", tmpdir))
argv = append(argv, hostobjCopy()...)
if Linkshared {
seenDirs := make(map[string]bool)