There's a closed pull request on the void-packages repository New package: go-pie https://github.com/void-linux/void-packages/pull/20450 Description: This package makes it possible to build Go binaries with PIE. Both Arch Linux and Alpine already implement this feature. Arch has a package called go-pie that's used for most of their PKGBUILDs, while the only version of Go on Alpine is one capable of producing PIE binaries. * On Arch: https://www.archlinux.org/packages/community/x86_64/go-pie/ * On Alpine: https://pkgs.alpinelinux.org/package/edge/community/x86_64/go The patch used here is actually adapted from the one used by Arch, and if adopted can allow us to remove the nostrip flag from the go build_style. I'm getting some weird build output, where it says ``` loadinternal: cannot find runtime/cgo ``` so I'm not completely certain that it's 100% complete. Building a program that uses cgo does work cleanly, so I'm not sure what it means. It's referenced [in this issue](https://github.com/golang/go/issues/31544), but without any solution.