]> Cypherpunks.ru repositories - gostls13.git/blobdiff - src/cmd/link/internal/ld/data.go
[dev.regabi] all: merge master (5faf941) into dev.regabi
[gostls13.git] / src / cmd / link / internal / ld / data.go
index 2fb790a6ea540b2458fb01d08f0dfa909aec857c..92d38bb63e54aa04c441d18a6613273a6a91ce24 100644 (file)
@@ -107,14 +107,12 @@ func trampoline(ctxt *Link, s loader.Sym) {
                }
                rs = ldr.ResolveABIAlias(rs)
                if ldr.SymValue(rs) == 0 && (ldr.SymType(rs) != sym.SDYNIMPORT && ldr.SymType(rs) != sym.SUNDEFEXT) {
-                       if ldr.SymPkg(rs) != ldr.SymPkg(s) {
-                               if !isRuntimeDepPkg(ldr.SymPkg(s)) || !isRuntimeDepPkg(ldr.SymPkg(rs)) {
-                                       ctxt.Errorf(s, "unresolved inter-package jump to %s(%s) from %s", ldr.SymName(rs), ldr.SymPkg(rs), ldr.SymPkg(s))
-                               }
-                               // runtime and its dependent packages may call to each other.
-                               // they are fine, as they will be laid down together.
+                       if ldr.SymPkg(rs) == ldr.SymPkg(s) {
+                               continue // symbols in the same package are laid out together
+                       }
+                       if isRuntimeDepPkg(ldr.SymPkg(s)) && isRuntimeDepPkg(ldr.SymPkg(rs)) {
+                               continue // runtime packages are laid out together
                        }
-                       continue
                }
 
                thearch.Trampoline(ctxt, ldr, ri, rs, s)