runtime: remove thunk.s

Replace with uses of //go:linkname in Go files, direct use of name in .s files.
The only one that really truly needs a jump is reflect.call; the jump is now
next to the runtime.reflectcall assembly implementations.

Change-Id: Ie7ff3020a8f60a8e4c8645fe236e7883a3f23f46
Reviewed-on: https://go-review.googlesource.com/1962
Reviewed-by: Austin Clements <austin@google.com>
diff --git a/src/runtime/time.go b/src/runtime/time.go
index 11862c7..5917d7c 100644
--- a/src/runtime/time.go
+++ b/src/runtime/time.go
@@ -43,7 +43,8 @@
 
 // time.now is implemented in assembly.
 
-// Sleep puts the current goroutine to sleep for at least ns nanoseconds.
+// timeSleep puts the current goroutine to sleep for at least ns nanoseconds.
+//go:linkname timeSleep time.Sleep
 func timeSleep(ns int64) {
 	if ns <= 0 {
 		return
@@ -59,6 +60,7 @@
 }
 
 // startTimer adds t to the timer heap.
+//go:linkname startTimer time.startTimer
 func startTimer(t *timer) {
 	if raceenabled {
 		racerelease(unsafe.Pointer(t))
@@ -68,6 +70,7 @@
 
 // stopTimer removes t from the timer heap if it is there.
 // It returns true if t was removed, false if t wasn't even there.
+//go:linkname stopTimer time.stopTimer
 func stopTimer(t *timer) bool {
 	return deltimer(t)
 }
@@ -287,3 +290,15 @@
 		i = c
 	}
 }
+
+// Entry points for net, time to call nanotime.
+
+//go:linkname net_runtimeNano net.runtimeNano
+func net_runtimeNano() int64 {
+	return nanotime()
+}
+
+//go:linkname time_runtimeNano time.runtimeNano
+func time_runtimeNano() int64 {
+	return nanotime()
+}