@mauri870 requested issue #64856 to be considered for backport to the next 1.20 minor release.
I managed to reproduce it consistently in go 1.21 now, thanks. I would not trust on my initial bisecting results because the repro was not very consistent.
Since 1.20 does not have the wasip1 port, I tried with GOOS=js and it compiled just fine, so it appears to not be affected.
It is unclear to me where the issue is, but since programs compile just fine in Go 1.20 and we have the same function size in 1.20, 1.21 and tip something changed between 1.20 and 1.21 that caused the error to appear.
@gopherbot please backport to Go 1.21, this is a linker issue when compiling large wasm programs without a workaround.
@mauri870 requested issue #64856 to be considered for backport to the next 1.20 minor release.