logoalt Hacker News

StrauXXyesterday at 11:32 PM1 replyview on HN

Some programming language compilers generate asm that does call systemcalls directly. Go for example.


Replies

teraflopyesterday at 11:47 PM

Go does hardcode system call numbers on Linux, but it doesn't on Windows. Instead it follows the normal Windows convention of calling the userspace wrappers from kernel32.dll and similar libraries.

https://cs.opensource.google/go/go/+/refs/tags/go1.25.6:src/...

Unlike on Linux, the low-level syscall numbers on the NT kernel are highly unstable across releases, so programs that try to call them directly will generally only work on a very specific kernel version.

show 1 reply