Hacker News new | ask | show | jobs
by dtrailin 2738 days ago
I think this would be much harder because Linux is a monolithic kernel and doesn't allow subsystems the same way Darwin does since it is a hybrid kernel (like NT)
2 comments

Linux have the binfmt https://en.wikipedia.org/wiki/Binfmt_misc . It have been used to run java, windows pe or other arch binaries.
That's very different.

All binfmt does is allow exec() and friends to run a custom wrapper program; for example, qemu or wine.

Windows / NT subsystems (and specifically, here, picoprocesses), effectively intercept all entries into kernelmode from a particular process; when you execute a syscall instruction, the kernel invokes subsystem-specific code.

One of the child comments of the one to which you replied gives an example of a Linux subsystem for running Darwin binaries, so clearly it’s doable.