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/cgo: cgo with external linking for linux/mips64 #14126

Closed
eswierk opened this issue Jan 27, 2016 · 4 comments
Closed

cmd/cgo: cgo with external linking for linux/mips64 #14126

eswierk opened this issue Jan 27, 2016 · 4 comments

Comments

@eswierk
Copy link

eswierk commented Jan 27, 2016

Implement cgo with external linking for linux/mips64 and linux/mips64le (MIPS N64 ELF ABI, big- and little-endian). Work includes:

Initial testing can be done using qemu-user for mips64 and mips64le targets running on any host. Skyport Systems (my employer) can also provide access to mips64le hardware for testing.

See #8912 for a description of similar work for ppc64 (though internal linking support is optional/extra credit). For a working example, browse the current arm64 code, which supports exactly the functionality sought for mips64 (cgo with external linking, not internal linking).

@eswierk
Copy link
Author

eswierk commented Jan 28, 2016

Background info, for the benefit of a potential bounty hunter...

How cgo works, from the horse’s mouth. Plus an explanation of golang's odd x86-ish assembly language. Some of the links to Plan9 docs are broken; use this archive instead.

The Altoros blog series on golang internals has lots of useful info about code generation, linking, relocations, assembly.

Explanation of golang’s clever conditional compilation features (build tags and magic filenames).

For brushing up on MIPS trivia: N32/N64 ABI and other ABIs, ELF relocation types.

There is probably some overlap with the voodoo that needs to be added to libffi to support closures with gccgo on mips64.

@minux
Copy link
Member

minux commented Jan 28, 2016 via email

@eswierk
Copy link
Author

eswierk commented Jan 28, 2016

@minux We only have little endian mips64 currently. Would that be useful to you?

@gopherbot
Copy link

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants