3 ms·
Coming from DOS/Windows the amount of... extra cruft that gets linked into a Linux binary by default seems rather excessive. The equivalent startup code in Wind
by userbinator 12y ago
Coming from DOS/Windows the amount of... extra cruft that gets linked into a Linux binary by default seems rather excessive. The equivalent startup code in Windows for a C program doesn't involve constructors or destructors, for one thing. From the entry point, there's a total of ~7 functions called in the default stub - most of them for parsing the environment variables and creating argc/argv, and for programs that don't need that it's quite easy to eliminate those too.
(The whole ELF/dynamic linking system is another thing that has always seemed overly complex to me, compared to PE/DLLs.)
- jjoonathan 12y agoBut Windows still supports constructors and destructors, right? I don't understand how it eliminate the complexity. Do you mean that the windows equivalent of _start is nested less deeply and with more reasonable naming conventions?