That means that programs that directly make system calls will keep working on newer OSes.
On many (¿most? https://unix.stackexchange.com/questions/473137/do-other-uni...) other operating systems, that’s not the case; the OS ships with a library that provides a stable interface, and system call numbers, arguments, or calling conventions can change (in theory, the interface could even change across reboots or process runs). On openBSD, that library is Libc (and, unfortunately, is a lot larger than just the OS interface. IMO, in an ideal world, it should be split in two parts, the OS interface and a C library)
Go wants to produce statically linked executables. It can’t do both that and link with LibC. It now changed to dynamically link with LibC, guaranteeing that what you compile today will run as well on next year’s OpenBSD as it does on today’s one.
On top of that, openBSD has a security feature where it verifies that system calls are made via LibC. That feature wasn’t implemented as thoroughly as possible because go made direct system calls. This change allows OpenBSD to tighten that feauture.
I'm sorry OpenBSD also cranks libc versions whenever needed. And it depends on what changed, if it'll run on an old kernel. Since it links against a fixed version, keeping it running involves recompiling or some trickery...
So basically executable are mostly only ever good for 1 stable release. So don't throw away your source code, you gonna need it in 6 month.
Thank you! That was really informative and I will check out those links to learn more.
I've been developing with Go for a few years now but never strayed too low level so was unsure how this change in Go 1.16 would affect me. I doubt my code will run on OpenBSD in the near future however I'm happy to know that if it does it will be supported in the future.
So does OpenBSD's libc library differ a lot from say, Linux's libc library? Meaning: Suppose you want to write an app that can talk to both Linux's libc and OpenBSD's libc using some sort of "common language" that is compatible with both, would that be possible?
Edit: All libc basically adhere to it. Except for some extentions that are not in POSIX but might be in glibc/musl/FreeBSDs libc or some extentions that are OpenBSD specific.
Thanks