Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

No they don't. Only Windows forbids developers from linking static binaries. That's because they change the SYSCALL ordinals every few months. Which means that in order to load a program on Windows you have to give up control of the virtual memory address space to the operating system so that it can load DLLs at arbitrary addresses.

Unix systems have never had that restriction. Because if you use the official libc and pass -static to gcc then that means the "stable api" creates a binary that depends on the kernel abi. If the kernel authors break the abi then it means you need to recompile all your software in order to upgrade.



> No they don't.

Yes they do.

> Only Windows forbids developers from linking static binaries. That's because they change the SYSCALL ordinals every few months.

That Windows somewhat actively precludes raw syscalls doesn’t mean they are supported elsewhere. It’s always been bsd (and especially macOS) policy that syscalls are an implementation detail.

> Because if you use the official libc and pass -static to gcc then that means the "stable api" creates a binary that depends on the kernel abi.

Try doing that on macOS, you’ll find out that there is no static version of libSystem, or crt0.


Plenty of OS allow for static linking, including Windows.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: