-
Notifications
You must be signed in to change notification settings - Fork 17.9k
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: Xcode 8.3 dsymutil rejects our binaries #19772
Comments
CL https://golang.org/cl/38747 mentions this issue. |
I bisected https://github.com/llvm-mirror/llvm The problem with go compiler starts at llvm-mirror/llvm@9a41e59 |
Also please notice apple's and llvm's dsymutil is different binaries. Apple dsymutil default output is:
llvml dsymutil default output is:
I don't know how Apple use llvm in Xcode. But I can compile go binaries with cgo on mac os 10.12.3 using llvm's dsymutil before 9a41e59, and can't compile with llvm's dsymutil after this change. |
@gregory-m, thanks for tracking that down. I've got a fix pending and it is definitely related to the alignment of the DWARF segment having changed. |
CL https://golang.org/cl/38855 mentions this issue. |
@rsc could this be backported for 1.8.1? |
Heh, yet the issue is closed. |
Ah, there's #19734. |
Be the bot you want to see in the world. |
ETA on go 1.8.1 release, so Mac developers can stop worrying about Xcode versions? |
We hope this week. |
CL https://golang.org/cl/39605 mentions this issue. |
Cherry-picked. |
…mutil will accept Right now, at least with Xcode 8.3, we invoke dsymutil and dutifully copy what it produces back into the binary, but it has actually dropped all the DWARF information that we wanted, because it didn't like the look of go.o. Make it like the look of go.o. DWARF is tested in other ways, but typically indirectly and not for cgo programs. Add a direct test, and one that exercises cgo. This detects missing dwarf information in cgo-using binaries on macOS, at least with Xcode 8.3, and possibly earlier versions as well. Fixes #19772. The backport to Go 1.8 disables TestDWARF on Windows because Windows DWARF support is new in Go 1.9. Change-Id: I0082e52c0bc8fc4e289770ec3dc02f39fd61e743 Reviewed-on: https://go-review.googlesource.com/39605 Run-TryBot: Austin Clements <austin@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Russ Cox <rsc@golang.org>
In src/runtime/testdata/testprogcgo, running the final parts of a link by hand:
The resulting binary is malformed.
This is the root cause of #19734, but we'll treat that issue as fixed by the workaround of not trusting dsymutil's exit status when it prints "warnings" (for backport to Go 1.8).
This issue is to fix our object files to be compatible with dsymutil, for Go 1.9.
The text was updated successfully, but these errors were encountered: