-
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: relocation is too big for binaries built on ppc64le #16665
Comments
I should be able to add ppc64le trampolines to the fix for #17028 to solve this issue. |
And all this will happen in time for go1.8? |
CL https://golang.org/cl/30850 mentions this issue. |
@luxas Yes, the common golang linker change to use trampolines for long calls is now upstream. This morning I submitted the change to add the ppc64x trampolines so the problem will be fixed on ppc64x as well. |
@laboger Great! Folks are also talking about s390x; does s390x also need this patch? |
s390x uses 32-bit (33-bit really, due to the halfword alignment) relative addressing and I think the tool chain only currently supports offsets of 2GB across all architectures. So no, I don't think it needs this change. |
Please answer these questions before submitting your issue. Thanks!
go version
)?go version devel +392bf3a Tue Aug 9 00:43:25 2016 +0000 linux/ppc64le
fails with go1.7 too
go env
)?ppc64le Ubuntu
If possible, provide a recipe for reproducing the error.
A complete runnable program is good.
A link on play.golang.org is best.
Try to do the Kubernetes build.
git clone https://github.com/kubernetes/kubernetes.git
cd kubernetes
make
All binaries built successfully
Failures when linking the kube-abiserver binary:
k8s.io/kubernetes/vendor/k8s.io/client-go/1.4/pkg/apis/extensions.SupplementalGroupsStrategyType.CodecEncodeSelf: relocation for runtime.convT2E+220 is too big: -33556804
k8s.io/kubernetes/vendor/k8s.io/client-go/1.4/pkg/apis/extensions.(_PodSecurityPolicyList).CodecDecodeSelf: relocation for runtime.convI2E+592 is too big: -33557824
k8s.io/kubernetes/vendor/k8s.io/client-go/1.4/pkg/apis/extensions.(_NetworkPolicy).CodecDecodeSelf: relocation for runtime.convI2E+592 is too big: -33564288
k8s.io/kubernetes/vendor/k8s.io/client-go/1.4/pkg/apis/extensions.(_NetworkPolicySpec).CodecDecodeSelf: relocation for runtime.convI2E+592 is too big: -33569896
k8s.io/kubernetes/vendor/k8s.io/client-go/1.4/pkg/apis/extensions.(_NetworkPolicyIngressRule).CodecDecodeSelf: relocation for runtime.convI2E+592 is too big: -33574504
k8s.io/kubernetes/vendor/k8s.io/client-go/1.4/pkg/apis/extensions.(_NetworkPolicyPort).CodecDecodeSelf: relocation for runtime.convI2E+592 is too big: -33579240
k8s.io/kubernetes/vendor/k8s.io/client-go/1.4/pkg/apis/extensions.(_NetworkPolicyPort).codecDecodeSelfFromMap: relocation for runtime.newobject+712 is too big: -33567512
k8s.io/kubernetes/vendor/k8s.io/client-go/1.4/pkg/apis/extensions.(*NetworkPolicyPort).codecDecodeSelfFromMap: relocation for runtime.writebarrierptr+1080 is too big: -33564872
...... lots more
This is similar to but not exactly the same as #15823. In that issue, a different error message occurred and came from the GNU linker during external linking. In this case, the error occurs before the external linker would be invoked.
In both cases the errors occur because the address of the call target is too large for the bl instruction. I created a new issue for this one because the error messages are different, and there is a solution for #15823. However, it's possible there is a single solution that would be best for both.
Time to consider a solution which uses a different code sequence to do the call, such as one of those suggested by @minux.
The text was updated successfully, but these errors were encountered: