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

Comments

Projects
None yet
5 participants
@minux
Copy link
Member

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

This comment has been minimized.

Copy link

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

This comment has been minimized.

Copy link
Contributor

commented Jan 26, 2016

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

This comment has been minimized.

Copy link

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

This comment has been minimized.

Copy link
Member Author

commented Jan 27, 2016

@eswierk

This comment has been minimized.

Copy link

commented Jan 27, 2016

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

@gopherbot

This comment has been minimized.

Copy link

commented Feb 21, 2016

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

eswierk added a commit to skyportsystems/go that referenced this issue Feb 23, 2016

cmd/link, runtime: add external linking support for linux/mips64x
Fixes golang#12560

Change-Id: Ic2004fc7b09f2dbbf83c41f8c6307757c0e1676d

eswierk added a commit to skyportsystems/go that referenced this issue Feb 27, 2016

cmd/link, runtime: add external linking support for linux/mips64x
Fixes golang#12560

Change-Id: Ic2004fc7b09f2dbbf83c41f8c6307757c0e1676d

@gopherbot gopherbot closed this in 073d292 May 1, 2016

@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.
You can’t perform that action at this time.