]> Cypherpunks repositories - gostls13.git/commit
cmd/internal/obj/mips: don't emit spurious CALLIND relocations
authorCherry Zhang <cherryyz@google.com>
Fri, 3 Apr 2020 02:12:38 +0000 (22:12 -0400)
committerCherry Zhang <cherryyz@google.com>
Fri, 3 Apr 2020 13:43:12 +0000 (13:43 +0000)
commit5dde10c3044f75fbcc29193608a7b7156a3c9ef6
treed24b4ee14612fa6d66edac83272bc12d11b5258d
parent6117275788ae5f63a1229cf058baf55a818a34c1
cmd/internal/obj/mips: don't emit spurious CALLIND relocations

Generate a CALLIND relocation only for indirect calls, not for
indirect jumps. In particular, the RET instruction is lowered to
JMP (LR), an indirect jump, and occurs frequently. The large
amount of spurious relocations causes the linker to do a lot of
extra work.

Change-Id: Ie0edc04609788f5a687fd00c22558c3f83867697
Reviewed-on: https://go-review.googlesource.com/c/go/+/227079
Run-TryBot: Cherry Zhang <cherryyz@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Than McIntosh <thanm@google.com>
Reviewed-by: David Chase <drchase@google.com>
src/cmd/internal/obj/mips/asm0.go