Commit 1e94d79f authored by Cherry Zhang's avatar Cherry Zhang

cmd/compile: disable Duff's device on darwin/arm64

Darwin linker does not support BR26 reloc with non-zero addend.

Fixes #16724.

Change-Id: I1b5b4dc7159141bde3e273490f435c08c583afaf
Reviewed-on: https://go-review.googlesource.com/27081
Run-TryBot: Cherry Zhang <cherryyz@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: default avatarDave Cheney <dave@cheney.net>
parent 6fd2d2cf
......@@ -181,6 +181,7 @@ func NewConfig(arch string, fe Frontend, ctxt *obj.Link, optimize bool) *Config
c.fpRegMask = fpRegMaskARM64
c.FPReg = framepointerRegARM64
c.hasGReg = true
c.noDuffDevice = obj.Getgoos() == "darwin" // darwin linker cannot handle BR26 reloc with non-zero addend
case "ppc64le":
c.IntSize = 8
c.PtrSize = 8
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment