Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

runtime: EABI support for netbsd/arm is insufficient #13806

Closed
oshimaya opened this issue Jan 3, 2016 · 2 comments
Closed

runtime: EABI support for netbsd/arm is insufficient #13806

oshimaya opened this issue Jan 3, 2016 · 2 comments
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done. OS-NetBSD
Milestone

Comments

@oshimaya
Copy link

oshimaya commented Jan 3, 2016

1 What version of Go are you using (go version)?

Go 1.4 and Go 1.5 (maybe Go 1.3, too)

2 What operating system and processor architecture are you using?

  • Host:
    • Linux(CentOS7) go version go1.4.2 linux/amd64

    • NetBSD/amd64 7.0 go version go1.5.1 netbsd/amd64

    • NetBSD/amd64 7.0 go version go1.4.3 netbsd/amd64

      This problem occurs on all host environments.

  • Target:
    • NetBSD/evbarm 7.0 (EABI, PAGE_SIZE=4K kernel)

3 What did you do?

Simple test program

  package main
  import "fmt"
  func main() {
          fmt.Println("Hello World")
  }

  $ GOOS=netbsd GOARCH=arm go build .hello.go
  $ file hello
  hello: ELF 32-bit LSB executable, ARM, version 1 (NetBSD), statically linked, for NetBSD 5.99, not stripped

4 What did you expect to see?

  $ ./hello
  Hello World

5 What did you see instead?
When run on NetBSD/arm

 $ ./hello
 (no response, send KILL signal from another tty)
 [1]   Killed                  ./hello
 $ gdb ./hello
 (gdb) r
  Starting program: /tmp/hello

  Program received signal SIGSEGV, Segmentation fault.
  0x000383c4 in runtime.newosproc ()
      at /usr/lib/golang/src/runtime/os_netbsd.c:228

The reason of this is because the EABI support is insufficient.
Previous changes (at Mar 2014) are only in syscall packages:
30d6093
However runtime package is also a need to be changed.
Go1.5: src/runtime/defs1_netbsd_arm.go
Go1.4: src/runtime/defs_netbsd_arm.h
I think some types need padding bytes - timespec, timeval, mcontextt, ucontextt, keventt,
In addition, ELF header is also required EABI flag as same as Linux / FreeBSD.

I attached these patch for go1.5.
go_netbsd_earm_diff.txt

@minux minux changed the title EABI support for netbsd/arm is insufficient. runtime: EABI support for netbsd/arm is insufficient Jan 4, 2016
@minux
Copy link
Member

minux commented Jan 4, 2016 via email

@ianlancetaylor ianlancetaylor added this to the Go1.7 milestone Jan 4, 2016
@rsc rsc modified the milestones: Go1.8, Go1.7 May 18, 2016
@quentinmit quentinmit added the NeedsFix The path to resolution is known, but the work has not been done. label Sep 29, 2016
@quentinmit quentinmit modified the milestones: Go1.8Maybe, Go1.8 Sep 29, 2016
@gopherbot
Copy link
Contributor

CL https://golang.org/cl/31651 mentions this issue.

@golang golang locked and limited conversation to collaborators Oct 24, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done. OS-NetBSD
Projects
None yet
Development

No branches or pull requests

6 participants