They also don't need to do anything for Adddynrel. So we can just
enable it.
Change-Id: If85fceca63a7b3cb5a09e5db224c3018060e86de
Reviewed-on: https://go-review.googlesource.com/c/go/+/229993
Run-TryBot: Cherry Zhang <cherryyz@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Than McIntosh <thanm@google.com>
// New dodata() is currently only implemented for selected targets.
switch {
case ctxt.IsElf():
- if !(ctxt.IsAMD64() || ctxt.Is386() ||
- ctxt.IsARM() || ctxt.IsARM64() || ctxt.IsS390X()) {
+ switch {
+ case ctxt.Is386(), ctxt.IsAMD64(), ctxt.IsARM(), ctxt.IsARM64(),
+ ctxt.IsMIPS(), ctxt.IsMIPS64(), ctxt.IsRISCV64(), ctxt.IsS390X():
+ // supported
+ default:
*flagnewDoData = false
}
case ctxt.IsDarwin():
return t.Arch.Family == sys.AMD64
}
+func (t *Target) IsMIPS() bool {
+ return t.Arch.Family == sys.MIPS
+}
+
+func (t *Target) IsMIPS64() bool {
+ return t.Arch.Family == sys.MIPS64
+}
+
func (t *Target) IsPPC64() bool {
return t.Arch.Family == sys.PPC64
}
+func (t *Target) IsRISCV64() bool {
+ return t.Arch.Family == sys.RISCV64
+}
+
func (t *Target) IsS390X() bool {
return t.Arch.Family == sys.S390X
}