cmd/cgo: Relocation overflow occurring when calling crosscall2 on aix/ppc64 #40609
Labels
compiler/runtime
Issues related to the Go compiler and/or runtime.
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
OS-AIX
Milestone
While trying to compile metricbeat (with go1.15rc1 and 1.14.6), we discovered that a relocation overflow might occur when a CGO generated file tries to call crosscall2.
I don't really know why ld isn't able to generate a trampoline but we don't want one anyway as it might end up being added inside Golang generated .text section, changing the offset, alignement, etc. The problem already happened with kubernetes where we decided to add
__attribute__((longcall))
for a fewruntime/cgo
functions (cf gcc_aix_ppc64.c).It's possible to do the same thing in generated CGO code (here), but I don't know if it's possible to add it only for AIX ? Moreover, could it be merged for 1.15 (and maybe backported to 1.14) ? This error is not a new one, thus I don't remember if it's possible to merge it this late in the cycle.
@fearful-symmetry
The text was updated successfully, but these errors were encountered: