News for hackers. Stuff that matters.
Re:Go 1.21 will (likely) have a static toolchain on Linux by epilys on Saturday April 08, 2023 @04:25AM (#35491596)
This is the correct answer. Don't use syscalls unless you know what you're doing, obviously. Take a look at how musl and glibc POSIX calls are implemented, some have nuances you have to be aware of, and in others libc might do hidden stuff behind the curtain.

Example of small nuance that can ruin your day/week: the size of syscall(2) arguments is fixed, but for some syscalls the arguments must be smaller. Hence you have to pack and aline the values properly in the registers. This example is from the syscall(2) manpage.

Re:Go 1.21 will (likely) have a static toolchain on Linux by eru on Saturday April 08, 2023 @09:19AM (#35492832)
And even musl has quite a few bugs where it lags behind glibc a lot.

I've recently been trying to fix some of them, but so far getting traction on their mailing list is a bit slow.