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: external link for mips64 #12560

Closed
minux opened this issue Sep 10, 2015 · 6 comments
Closed

cmd/link: external link for mips64 #12560

minux opened this issue Sep 10, 2015 · 6 comments

Comments

@minux
Copy link
Member

minux commented Sep 10, 2015

No description provided.

@minux minux added this to the Go1.6 milestone Sep 10, 2015
@rsc rsc modified the milestones: Unplanned, Go1.6 Nov 5, 2015
@eswierk
Copy link

eswierk commented Jan 25, 2016

Implement external linking for mips64. This involves completing the functions needed for external linking in src/cmd/link/internal/mips64/asm.go, including elfreloc1 and archreloc.

(My original comment included cgo and internal linking. I have revised it to cover only external linking, and opened #14126 for complete cgo with external linking.)

@mwhudson
Copy link
Contributor

I think that's a little inaccurate and muddles implementing cgo and external linking. External linking mostly just requires elfreloc1 (it might also require changes to the entrypoint?). elfsetupplt, adddynsym, adddynrela are required for cgo with internal linking (they are not implemented for arm64, for example, which only supports cgo via external linking).

The runtime stuff in asm_mips64x.s is required for either flavour of cgo, but not external linking.

@eswierk
Copy link

eswierk commented Jan 27, 2016

Thanks @mwhudson for helping un-muddle my understanding of cgo vs. internal linking vs. external linking. So to build a Go program with embedded C code (via extern "C") that calls functions in an external library, I need just

  • cgo runtime support in asm_mips64x.s
  • external linking support in elfreloc1

but not the internal linking support in elfsetupplt, adddynsym, adddynrela. Is that correct?

@minux
Copy link
Member Author

minux commented Jan 27, 2016 via email

@eswierk
Copy link

eswierk commented Jan 27, 2016

I reverted the issue description to cover only external linking, and opened #14126 for complete cgo support.

@gopherbot
Copy link

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

@golang golang locked and limited conversation to collaborators May 1, 2017
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

5 participants