Huge Go Image in Cross compilation


I’m cross compiling a Golang executable from ubuntu to an ARM based embedded system.

$ go version
go version go1.18.1 linux/amd64

I use the following environment variables:


The cross compilation works, and the system runs on the target. However, it consumes enormous amounts of memory, 780m.

Golang reports the heap memory is around 2 megabytes, and objdump shows nothing unusual to my eye (though this is not an area of my expertise).

Any thoughts on how to determine what is using the memory much appreciated.


This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.