-
Notifications
You must be signed in to change notification settings - Fork 18k
cmd/compile: incomplete relocation support on ppc64le #53345
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
Comments
@golang/ppc64 @laboger |
Hi @nehaljwani, thank you for reporting. Would you be able to share the gcc flags used to compile the C code? A simplified test case would help me. I suspect it just needs to make libc call with the compiler options used on the project. I am still digging through the linked CI logs trying to understand how the linked utility is being compiled. A trivial workaround is to explicitly request external linking on ppc64le. This was the behavior prior 1.18 with any cgo usage. I will try to implement these relocs. They are fairly new (introduced with ELFv2 1.5), but I suspect we need to handle with newer GCC. |
@nehaljwani is one of the CFLAG options |
Hello @pmur, we use:
|
Change https://go.dev/cl/412715 mentions this issue: |
Change https://go.dev/cl/412714 mentions this issue: |
Indirect branches are much more expensive than direct. If the call is known to be local, we can replace most of the operations with a nop, and call directly. Updates #53345 Change-Id: Icfff9ec1f6c7f8e4181f0f28976033308d2f53eb Reviewed-on: https://go-review.googlesource.com/c/go/+/412715 Reviewed-by: Cherry Mui <cherryyz@google.com> Run-TryBot: Dmitri Shuralyov <dmitshur@google.com> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> TryBot-Result: Gopher Robot <gobot@golang.org>
Since 2c4f389c I am unable to compile go with
CGO_ENABLED=1
onppc64le
withGCC 10.3.0
andbinutils 2.36.1
I see errors like:
Where
<>
are numbers:31, 60, 119, 120
. I am not sure if I am reading this correctly, but these correspond to:R_PPC_PLT16_HA
,R_PPC64_PLT16_LO_DS
,R_POWERPC_PLTSEQ
,R_POWERPC_PLTCALL
and references to these are missing in:The text was updated successfully, but these errors were encountered: