mirror of
https://github.com/golang/go
synced 2024-11-23 22:40:04 -07:00
[dev.link] cmd/link: use new dodata on MIPS(64) and RISCV64
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>
This commit is contained in:
parent
5ea431fb63
commit
aa74fce005
@ -204,8 +204,11 @@ func Main(arch *sys.Arch, theArch Arch) {
|
||||
// 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():
|
||||
|
@ -100,10 +100,22 @@ func (t *Target) IsAMD64() bool {
|
||||
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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user