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

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.



> 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.


> 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).


> 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/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 ¯\_(ツ)_/¯



Nice I had not seen these.


Virgil doesn't use ASLR. I'm not sure what value it adds to a memory-safe language.




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

Search: