From: Cherry Zhang Date: Tue, 16 Aug 2016 09:57:38 +0000 (-0400) Subject: cmd/compile: disable Duff's device on darwin/arm64 X-Git-Tag: go1.8beta1~1866 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=1e94d79f9dbe032d9c8c0f461ca6fb96e20c0b85;p=gostls13.git 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 TryBot-Result: Gobot Gobot Reviewed-by: Dave Cheney --- diff --git a/src/cmd/compile/internal/ssa/config.go b/src/cmd/compile/internal/ssa/config.go index 149ceae379..72122a7b44 100644 --- a/src/cmd/compile/internal/ssa/config.go +++ b/src/cmd/compile/internal/ssa/config.go @@ -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