Index: src/cmd/link/internal/mips64/obj.go
--- src/cmd/link/internal/mips64/obj.go.orig
+++ src/cmd/link/internal/mips64/obj.go
@@ -49,6 +49,7 @@ func Init() (*sys.Arch, ld.Arch) {
 		Minalign:         minAlign,
 		Dwarfregsp:       dwarfRegSP,
 		Dwarfreglr:       dwarfRegLR,
+		Adddynrel:        adddynrel,
 		Archinit:         archinit,
 		Archreloc:        archreloc,
 		Archrelocvariant: archrelocvariant,
@@ -57,8 +58,16 @@ func Init() (*sys.Arch, ld.Arch) {
 		ElfrelocSize:     24,
 		Elfsetupplt:      elfsetupplt,
 		Gentext:          gentext,
+		FixUpSyms:        fixUpSyms,
 		Machoreloc1:      machoreloc1,
 
+		// TrampLimit is set such that we always run the trampoline
+		// generation code. This is necessary since calls to external
+		// symbols require the use of trampolines, regardless of the
+		// text size.
+		TrampLimit: 1,
+		Trampoline: trampoline,
+
 		Linuxdynld:     "/lib64/ld64.so.1",
 		Freebsddynld:   "XXX",
 		Openbsddynld:   "/usr/libexec/ld.so",
@@ -96,4 +105,9 @@ func archinit(ctxt *ld.Link) {
 			*ld.FlagRound = 0x10000
 		}
 	}
+
+	// .dynsym always has one NULL entry prior to any symbols being added.
+	dynSymCount = 1
+	gotLocalCount = 0
+	gotSymIndex = 0
 }
