cmd/link: unexpected R_386_GOT32 relocation #71293
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.
Milestone
Go version
go version go1.23.4 linux/386
Output of
go env
in your module/workspace:What did you do?
Compile the following program using GCC 15.0.1.
This issue is also present when running
go tool dist test -run=^cmd/cgo/internal/test:internal$
using GCC 15.0.1.What did you see happen?
The Go linker encounters an unexpected relocation in GCC emitted object code.
The linker is expecting to find the instruction
pushl _cgo_panic@GOT(%ebx)
, but instead encounterspushl _cgo_panic@GOT(%eax)
. According to gcc devs, this is valid (though sub optimal) code that the Go linker should handle.What did you expect to see?
The example program should build and link correctly.
The text was updated successfully, but these errors were encountered: