Commit 8419c85e authored by Russ Cox's avatar Russ Cox

runtime, cmd/link: fix netbsd/arm EABI support

Fixes reported by oshimaya (see #13806).

Fixes #13806.

Change-Id: I9b659ab918a34bc5f7c58f3d7f59058115b7f776
Reviewed-on: https://go-review.googlesource.com/31651Reviewed-by: 's avatarMinux Ma <minux@golang.org>
parent 19adf8ae
......@@ -945,11 +945,10 @@ func Elfinit(ctxt *Link) {
ehdr.phentsize = ELF64PHDRSIZE /* Must be ELF64PHDRSIZE */
ehdr.shentsize = ELF64SHDRSIZE /* Must be ELF64SHDRSIZE */
// we use EABI on both linux/arm and freebsd/arm.
// 32-bit architectures
case sys.ARM:
// we use EABI on both linux/arm and freebsd/arm.
if Headtype == obj.Hlinux || Headtype == obj.Hfreebsd {
// we use EABI on linux/arm, freebsd/arm, netbsd/arm.
if Headtype == obj.Hlinux || Headtype == obj.Hfreebsd || Headtype == obj.Hnetbsd {
// We set a value here that makes no indication of which
// float ABI the object uses, because this is information
// used by the dynamic linker to compare executables and
......
......@@ -104,6 +104,7 @@ type stackt struct {
type timespec struct {
tv_sec int64
tv_nsec int32
_ [4]byte // EABI
}
func (ts *timespec) set_sec(x int32) {
......@@ -117,6 +118,7 @@ func (ts *timespec) set_nsec(x int32) {
type timeval struct {
tv_sec int64
tv_usec int32
_ [4]byte // EABI
}
func (tv *timeval) set_usec(x int32) {
......@@ -129,10 +131,11 @@ type itimerval struct {
}
type mcontextt struct {
__gregs [17]uint32
__fpu [4 + 8*32 + 4]byte // EABI
// __fpu [4+4*33+4]byte // not EABI
__gregs [17]uint32
_ [4]byte // EABI
__fpu [272]byte // EABI
_mc_tlsbase uint32
_ [4]byte // EABI
}
type ucontextt struct {
......@@ -140,6 +143,7 @@ type ucontextt struct {
uc_link *ucontextt
uc_sigmask sigset
uc_stack stackt
_ [4]byte // EABI
uc_mcontext mcontextt
__uc_pad [2]int32
}
......@@ -151,6 +155,7 @@ type keventt struct {
fflags uint32
data int64
udata *byte
_ [4]byte // EABI
}
// created by cgo -cdefs and then converted to Go
......
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