4 ms·
> In macOS the default entry point is start (linux is still _start), the C runtime still needs to be setup - the kernel can't jump a program straight to main.
by 95014_refugee 6y ago
> In macOS the default entry point is start (linux is still _start), the C runtime still needs to be setup - the kernel can't jump a program straight to main.
macOS has no interest in what the symbol is called; it pulls the initial PC from the LC_MAIN command in the Mach-o header.
ld64 (the linker) will by default populate that load command by looking up “_start”, but that’s a separate thing...