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: internal linking support for arm64 #10373

Open
minux opened this Issue Apr 8, 2015 · 8 comments

Comments

Projects
None yet
6 participants
@minux
Member

minux commented Apr 8, 2015

when we have race detector support on arm64, we should have this.

@minux minux added repo-main labels Apr 8, 2015

@minux minux added this to the Unplanned milestone Apr 8, 2015

minux added a commit that referenced this issue Apr 8, 2015

cmd/internal/ld: force external linking on linux/arm64 with cgo
Update #10373.

Change-Id: I309e3df7608b9eef9339196fdc50dedf5f9439f5
Reviewed-on: https://go-review.googlesource.com/8452
Reviewed-by: Aram Hăvărneanu <aram@mgk.ro>
Reviewed-by: David Crawshaw <crawshaw@golang.org>

@rsc rsc removed arch-arm64 labels Apr 10, 2015

@rsc rsc changed the title from cmd/7l: internal linking support to cmd/link: internal linking support for arm64 Jun 8, 2015

@bradfitz

This comment has been minimized.

Member

bradfitz commented Sep 17, 2016

@williamweixiao

This comment has been minimized.

Member

williamweixiao commented May 12, 2017

We are investigating whether to enable internal linking for ARM64 but it seems that the real problem is race detector for ARM64 according to Minux's description. Could you please give me more information about the background?

@ianlancetaylor

This comment has been minimized.

Contributor

ianlancetaylor commented May 12, 2017

I think that @minux meant is that in order to properly implement the race detector on ARM64, internal linking needs to be working. Internal linking does not depend on the race detector. It's the other way around.

@williamweixiao

This comment has been minimized.

Member

williamweixiao commented May 15, 2017

Thanks for the clarification!
So for ARM64, we have at least following work to do:

  1. enable internal linking (mainly cgo internal linking, right?)
  2. implement race detector based on fully enabled link
@williamweixiao

This comment has been minimized.

Member

williamweixiao commented May 17, 2017

I'm a little confused after glancing at link source code. I find that there is actually some basic support for ARM64 already. So I have 3 basic questions:

  1. What's the advantage of internal link comparing to external link (i.e. invoking gcc to do link)?
  2. Why internal link can work for race detector while external link can't?
  3. Which parts are missing for ARM64? Just more relocation types?
@ianlancetaylor

This comment has been minimized.

Contributor

ianlancetaylor commented May 17, 2017

What's the advantage of internal link comparing to external link (i.e. invoking gcc to do link)?

People can build Go programs without having to have a C compiler installed.

Why internal link can work for race detector while external link can't?

Well, now that you ask that, I'm not sure. Maybe I'm misunderstanding this. @minux ?

Which parts are missing for ARM64? Just more relocation types?

Probably, but possibly also support for generating required linker stubs.

@vielmetti

This comment has been minimized.

vielmetti commented Jun 28, 2018

This issue has been open for a while as unplanned, but it came up again in the context of bazelbuild/rules_go#1574 where Bazel needs explicit instructions to invoke a linker to support building Go on arm64.

@williamweixiao

This comment has been minimized.

Member

williamweixiao commented Jun 29, 2018

Yes, we have finished a prototype development internally and will submit it in the next cycle.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment