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

cmd/link: implement external linking for riscv64 #36739

Open
4a6f656c opened this issue Jan 24, 2020 · 7 comments
Open

cmd/link: implement external linking for riscv64 #36739

4a6f656c opened this issue Jan 24, 2020 · 7 comments
Milestone

Comments

@4a6f656c
Copy link
Contributor

@4a6f656c 4a6f656c commented Jan 24, 2020

There is currently no support for external linking on riscv64 - this is a tracking bug for adding support.

@gopherbot
Copy link

@gopherbot gopherbot commented Jan 24, 2020

Change https://golang.org/cl/216258 mentions this issue: cmd/objdump: disable unsupported tests on riscv64

@gopherbot
Copy link

@gopherbot gopherbot commented Jan 24, 2020

Change https://golang.org/cl/216259 mentions this issue: cmd/go: disable link syso test on linux/riscv64

@toothrot toothrot added the NeedsFix label Jan 24, 2020
@toothrot toothrot added this to the Backlog milestone Jan 24, 2020
gopherbot pushed a commit that referenced this issue Jan 25, 2020
Updates #27532, #36738 and #36739.

Change-Id: If10031c6fd2c8ec2aa8c37f7edb148d8f26f8697
Reviewed-on: https://go-review.googlesource.com/c/go/+/216258
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
gopherbot pushed a commit that referenced this issue Jan 25, 2020
This test requires support for external linking, which does not currently
exist on linux/riscv64.

Updates #27532 and #36739

Change-Id: Ia0cdf69f1830b995f2882b47d1bc0be82c4b3039
Reviewed-on: https://go-review.googlesource.com/c/go/+/216259
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
@gopherbot
Copy link

@gopherbot gopherbot commented Jan 25, 2020

Change https://golang.org/cl/216263 mentions this issue: test: adjust tests for riscv64

gopherbot pushed a commit that referenced this issue Jan 25, 2020
This disables some tests that are unsupported on riscv64 and adds support
for risc64 to test/nosplit.

Updates #27532, #36739 and #36765

Change-Id: I0a57797a05bc80236709fc240c0a0efb0ee0d16b
Reviewed-on: https://go-review.googlesource.com/c/go/+/216263
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
@tklauser tklauser added the arch-riscv label Jan 28, 2020
@4a6f656c
Copy link
Contributor Author

@4a6f656c 4a6f656c commented May 18, 2020

I have external linking support implemented for linux/riscv64 - I'll attempt to get this cleaned up for the next development cycle:

$ ~/src/go/bin/go build -ldflags=-linkmode=external hello.go
$ ldd hello
        linux-vdso.so.1 (0x0000001555571000)
        libpthread.so.0 => /lib/riscv64-linux-gnu/libpthread.so.0 (0x000000155557a000)
        libc.so.6 => /lib/riscv64-linux-gnu/libc.so.6 (0x0000001555595000)
        /lib/ld-linux-riscv64-lp64d.so.1 (0x0000001555556000)
$ ./hello
Hello, World!
@xnox
Copy link

@xnox xnox commented May 29, 2020

I have external linking support implemented for linux/riscv64 - I'll attempt to get this cleaned up for the next development cycle:

$ ~/src/go/bin/go build -ldflags=-linkmode=external hello.go
$ ldd hello
        linux-vdso.so.1 (0x0000001555571000)
        libpthread.so.0 => /lib/riscv64-linux-gnu/libpthread.so.0 (0x000000155557a000)
        libc.so.6 => /lib/riscv64-linux-gnu/libc.so.6 (0x0000001555595000)
        /lib/ld-linux-riscv64-lp64d.so.1 (0x0000001555556000)
$ ./hello
Hello, World!

Do you have code for this somehwere? even if not clean?

@4a6f656c
Copy link
Contributor Author

@4a6f656c 4a6f656c commented May 30, 2020

@xnox - there is a commit on top of Go 1.14.2 here. This will need reworking somewhat for upstreaming, given the linker changes during the current development cycle (what is due to become Go 1.15).

@gopherbot
Copy link

@gopherbot gopherbot commented Jul 19, 2020

Change https://golang.org/cl/243517 mentions this issue: cmd/link: add support for external linking on linux/riscv64

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
5 participants
You can’t perform that action at this time.