4 ms·
Why are static binaries with PIC so rare? I’m surprised position dependent code is ever used anymore in the age of ASLR. But static binaries are still great fo
by randyrand 4y ago
Why are static binaries with PIC so rare? I’m surprised position dependent code is ever used anymore in the age of ASLR.
But static binaries are still great for portability. So you’d think static binaries with PIC would be the default.
- masklinn 4y ago> But static binaries are still great for portability. macOS has not officially supported static binaries in... ever? You can't statically link libSystem, and it absolutely does not care for kernel ABI stability.
- titzer 4y ago> it absolutely does not care for kernel ABI stability That may be true on the mach system call side, but the UNIX system calls don't appear to change. (Virgil actually does call the kernel directly).
- masklinn 4y ago> That may be true on the mach system call side, but the UNIX system calls don't appear to change. They very much do, without warning, as the Go project discovered (after having been warned multiple times) during the Sierra betas: https://github.com/golang/go/issues/16272 https://github.com/golang/go/issues/16272 https://github.com/golang/go/issues/16606 https://github.com/golang/go/issues/16606 That doesn't mean Apple goes outs of its way to break syscalls (unlike microsoft), but there is no support for direct syscalls. That is why, again, you can't statically link libSystem. > (Virgil actually does call the kernel directly). That's completely unsupported ¯\_(ツ)_/¯
- titzer 4y agoVirgil doesn't use ASLR. I'm not sure what value it adds to a memory-safe language.