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: unexpected trampoline error on ppc64le musl with -buildmode=pie [1.18 backport] #53107
Comments
Change https://go.dev/cl/409074 mentions this issue: |
Change https://go.dev/cl/409075 mentions this issue: |
Change https://go.dev/cl/408820 mentions this issue: |
Closed by merging b80ae10 to release-branch.go1.18. |
…ning to external There are some symbol attributes that are encoded in the object file. Currently, they are lost when cloning a symbol to external. Copy them over. Also delete CopyAttributes as it is no longer called anywhere. For #53107. Backporting this CL as the fix of #53107 depends on it. Change-Id: I1497e3223a641704bf35aa3e904dd0eda2f8ec3e Reviewed-on: https://go-review.googlesource.com/c/go/+/400574 Run-TryBot: Cherry Mui <cherryyz@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Than McIntosh <thanm@google.com> (cherry picked from commit df08c9a) Reviewed-on: https://go-review.googlesource.com/c/go/+/408820
…64 when needed When linking a PIE binary with the internal linker, TOC relative relocations need to be generated. Update trampolines to indirect call using R12 to more closely match the AIX/ELFv2 regardless of buildmode, and work with position-indepdent code. Likewise, update the check for offseting R_CALLPOWER relocs to make a local call. It should be checking ldr.AttrExternal, not ldr.IsExternal. This offset should not be adjusted for external (non-go) object files, it is handled when ELF reloc are translated into go relocs. And, update trampoline tests to verify these are generated correctly and produce a working binary using -buildmode=pie on ppc64le. Fixes #53107 Change-Id: I8a2dea06c3237bdf0e87888b56a17b6c4c99a7de Reviewed-on: https://go-review.googlesource.com/c/go/+/400234 Reviewed-by: Than McIntosh <thanm@google.com> Reviewed-by: Cherry Mui <cherryyz@google.com> Run-TryBot: Paul Murphy <murp@ibm.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-on: https://go-review.googlesource.com/c/go/+/409075 Run-TryBot: Cherry Mui <cherryyz@google.com>
…ning to external There are some symbol attributes that are encoded in the object file. Currently, they are lost when cloning a symbol to external. Copy them over. Also delete CopyAttributes as it is no longer called anywhere. For golang#53107. Backporting this CL as the fix of golang#53107 depends on it. Change-Id: I1497e3223a641704bf35aa3e904dd0eda2f8ec3e Reviewed-on: https://go-review.googlesource.com/c/go/+/400574 Run-TryBot: Cherry Mui <cherryyz@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Than McIntosh <thanm@google.com> (cherry picked from commit df08c9a) Reviewed-on: https://go-review.googlesource.com/c/go/+/408820
…64 when needed When linking a PIE binary with the internal linker, TOC relative relocations need to be generated. Update trampolines to indirect call using R12 to more closely match the AIX/ELFv2 regardless of buildmode, and work with position-indepdent code. Likewise, update the check for offseting R_CALLPOWER relocs to make a local call. It should be checking ldr.AttrExternal, not ldr.IsExternal. This offset should not be adjusted for external (non-go) object files, it is handled when ELF reloc are translated into go relocs. And, update trampoline tests to verify these are generated correctly and produce a working binary using -buildmode=pie on ppc64le. Fixes golang#53107 Change-Id: I8a2dea06c3237bdf0e87888b56a17b6c4c99a7de Reviewed-on: https://go-review.googlesource.com/c/go/+/400234 Reviewed-by: Than McIntosh <thanm@google.com> Reviewed-by: Cherry Mui <cherryyz@google.com> Run-TryBot: Paul Murphy <murp@ibm.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-on: https://go-review.googlesource.com/c/go/+/409075 Run-TryBot: Cherry Mui <cherryyz@google.com>
@pmur requested issue #52337 to be considered for backport to the next 1.18 minor release.
The text was updated successfully, but these errors were encountered: