-
Notifications
You must be signed in to change notification settings - Fork 18k
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: illegal text-relocation for c-archive darwin/amd64 #14217
Labels
Milestone
Comments
Proposed CL is here: https://go-review.googlesource.com/#/c/19206 |
CL https://golang.org/cl/19206 mentions this issue. |
would it be possible to include this for go 1.6.1? It's kind of blocking my team |
I doubt this meets the bar for point releases, but the CL in question is
pretty small, so you can just apply it to your tree locally without waiting
for a release
|
CL https://golang.org/cl/22046 mentions this issue. |
gopherbot
pushed a commit
that referenced
this issue
Apr 14, 2016
The existing implementation deals with absolute relocations in __TEXT for darwin/amd64 in build-mode c-shared, but it ignores c-archive. This results in issues when trying to use a c-archive in an iOS app on the 64-bit simulator. This patch adds c-archive to the handling of this issue. Fixes #14217 Change-Id: I2e4d5193caa531171ad22fd0cd420a8bfb4646a6 Reviewed-on: https://go-review.googlesource.com/19206 Reviewed-by: David Crawshaw <crawshaw@golang.org> Run-TryBot: David Crawshaw <crawshaw@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-on: https://go-review.googlesource.com/22046
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
When compiling using buildmode c-archive on darwin/amd64 (targeting the iOS simulator), I run into this error when trying to link the resulting archive to my Swift code:
ld: illegal text-relocation to 'type..eq.[0]encoding/xml.Attr' in .../lib.a(go.o) from 'runtime.rodata' in .../lib.a(go.o) for architecture x86_64
Looking at the cmd/link/internal/ld/macho.go, it seems that it currently is only checking for shared archives on amd64 when it chooses to use the DATA segment over TEXT.
The text was updated successfully, but these errors were encountered: