aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/internal/obj/link.go
diff options
context:
space:
mode:
authorCherry Zhang <cherryyz@google.com>2020-04-30 17:08:35 -0400
committerCherry Zhang <cherryyz@google.com>2020-04-30 17:08:35 -0400
commitd0754cfe4ac2b28caf969765e8d6f995c600daf7 (patch)
tree192c81ac8159e0030a735722d3129a8c1d3b7d2d /src/cmd/internal/obj/link.go
parent0f8fecaba762c352db481d4919edf404f5590d22 (diff)
parent76c6cce1160996e730d87e620ddb674b1d54f96e (diff)
downloadgo-d0754cfe4ac2b28caf969765e8d6f995c600daf7.tar.xz
cmd: merge branch 'dev.link' into master
In the dev.link branch we continued developing the new object file format support and the linker improvements described in https://golang.org/s/better-linker . Since the last merge, more progress has been made to improve the new linker. This is a clean merge. Change-Id: Ide5ad6fcec9cede99e9b21c4548929b4ba1f4185
Diffstat (limited to 'src/cmd/internal/obj/link.go')
-rw-r--r--src/cmd/internal/obj/link.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/cmd/internal/obj/link.go b/src/cmd/internal/obj/link.go
index 65e58887e6..32906a3e05 100644
--- a/src/cmd/internal/obj/link.go
+++ b/src/cmd/internal/obj/link.go
@@ -33,6 +33,7 @@ package obj
import (
"bufio"
"cmd/internal/dwarf"
+ "cmd/internal/goobj2"
"cmd/internal/objabi"
"cmd/internal/src"
"cmd/internal/sys"
@@ -666,7 +667,7 @@ type Link struct {
PosTable src.PosTable
InlTree InlTree // global inlining tree used by gc/inl.go
DwFixups *DwarfFixupTable
- Imports []string
+ Imports []goobj2.ImportedPkg
DiagFunc func(string, ...interface{})
DiagFlush func()
DebugInfo func(fn *LSym, info *LSym, curfn interface{}) ([]dwarf.Scope, dwarf.InlCalls) // if non-nil, curfn is a *gc.Node
@@ -699,6 +700,8 @@ type Link struct {
defs []*LSym // list of defined symbols in the current package
nonpkgdefs []*LSym // list of defined non-package symbols
nonpkgrefs []*LSym // list of referenced non-package symbols
+
+ Fingerprint goobj2.FingerprintType // fingerprint of symbol indices, to catch index mismatch
}
func (ctxt *Link) Diag(format string, args ...interface{}) {