[dev.link] cmd/link: remove special dynlinkingGo case in pclntab pass

Now that we removed the "weird thing" about runtime.etext symbol,
we can remove this special case.

Change-Id: I2e4558367758d37e898a802bcd30671c7dd6fe89
Reviewed-on: https://go-review.googlesource.com/c/go/+/240066
Run-TryBot: Cherry Zhang <cherryyz@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Jeremy Faller <jeremy@golang.org>
diff --git a/src/cmd/link/internal/ld/pcln.go b/src/cmd/link/internal/ld/pcln.go
index 5bbfbb0..b23313d 100644
--- a/src/cmd/link/internal/ld/pcln.go
+++ b/src/cmd/link/internal/ld/pcln.go
@@ -324,16 +324,12 @@
 	}
 
 	setAddr := (*loader.SymbolBuilder).SetAddrPlus
-	if ctxt.IsExe() && ctxt.IsInternal() && !ctxt.DynlinkingGo() {
+	if ctxt.IsExe() && ctxt.IsInternal() {
 		// Internal linking static executable. At this point the function
 		// addresses are known, so we can just use them instead of emitting
 		// relocations.
 		// For other cases we are generating a relocatable binary so we
 		// still need to emit relocations.
-		//
-		// Also not do this optimization when using plugins (DynlinkingGo),
-		// as on darwin it does weird things with runtime.etext symbol.
-		// TODO: remove the weird thing and remove this condition.
 		setAddr = func(s *loader.SymbolBuilder, arch *sys.Arch, off int64, tgt loader.Sym, add int64) int64 {
 			if v := ldr.SymValue(tgt); v != 0 {
 				return s.SetUint(arch, off, uint64(v+add))