logoalt Hacker News

shevy-javatoday at 6:48 AM1 replyview on HN

If it is written in assembly, why is it for MacOS only?


Replies

DavidPipertoday at 7:20 AM

Assembly for the correct architecture is only one part of getting an executable running on a machine.

- Dynamic libraries (e.g. for calling into the kernel, but also user space dynamic libraries) are OS-specific (.so for Linux, .dylib for macOS, .dll for Windows)

- Executable format is OS-specific (ELF for Linux, Mach-O for macOS, PE for Windows)

- Dynamic loading and linkage of both the above are also therefore OS-specific