]> Cypherpunks repositories - gostls13.git/commit
[dev.link] cmd/internal/goobj2: separate Autolib from Pkglist in new object file
authorCherry Zhang <cherryyz@google.com>
Wed, 9 Oct 2019 14:22:02 +0000 (10:22 -0400)
committerCherry Zhang <cherryyz@google.com>
Mon, 14 Oct 2019 22:28:25 +0000 (22:28 +0000)
commit928623ca953151451d7c780d3b634da3b792f038
tree20b84b3ff3cbbe426a5a29415383dfa3317a1add
parentcfa421c9a62e171db3c0cd5f0ba9de255e0514d6
[dev.link] cmd/internal/goobj2: separate Autolib from Pkglist in new object file

In CL 196030 we decided to combine the imported package list
(Autolib) and referenced package list (PkgIdx, or Pkglist).
However, in some cases the Autolib list may contain file name,
instead of package path, e.g.
https://go.googlesource.com/go/+/refs/heads/dev.link/src/cmd/compile/internal/gc/main.go#1181
And the linker needs that to locate the file. This mostly happens
with direct invocation of the compiler and linker (i.e., not
through "go build").

Instead of letting the linker make guess of the file name based
on the package path, make Autolib a separate list.

Change-Id: If195a69462d04db515346ee67cdec925f5a69e2e
Reviewed-on: https://go-review.googlesource.com/c/go/+/200157
Run-TryBot: Cherry Zhang <cherryyz@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Jeremy Faller <jeremy@golang.org>
src/cmd/internal/goobj/readnew.go
src/cmd/internal/goobj2/objfile.go
src/cmd/internal/obj/objfile2.go
src/cmd/link/internal/objfile/objfile2.go