-
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: handle too far branches in ppc64le with trampolines in external linking in Go 1.9 #17917
Comments
The problem mentioned here is already fixed in golang for ppc64le, but the reason for this issue is to modify the code so it uses the same implementation as is done in arm. So this is not a fix for a bug but a clean up of the code. I will not be able to finish that clean up work for go 1.9. |
CL https://golang.org/cl/45130 mentions this issue. |
@cherrymui @ianlancetaylor Based on the discussion in #20492 we will not be removing the capability of splitting text sections, so this is longer needed. Do you agree? |
Yes, I think so. |
It was decided we would not use this method for all cases, so the current implementation is what we want and this can be closed. |
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (
go version
)?tip
What operating system and processor architecture are you using (
go env
)?Ubuntu 16.04 ppc64le
Opening this issue to document work be done in Go 1.9. This is related to the problem in #15823 and its fix.
Sometime after I created a fix for this problem, the same issue happened on arm, and @cherrymui created a fix that uses trampolines for both internal and external linking.
My original fix was based on splitting the text sections if they are larger than the branch offset limit, because then the external linker can take care of adding long branches or trampolines where needed. But that method is only done with external linking.
Cherry asked that I change my fix to use trampolines for external linking on ppc64le so it is consistent with arm. I'm opening this issue to note that work to be done in Go 1.9.
Also, the fix with external linking can result in the ftab (functab) being out of sync with the function addresses in the final binary. When the work to fully implement trampolines on ppc64le with external linking is done, that problem should go away but that needs to be verified.
The text was updated successfully, but these errors were encountered: