Mingw
The following table shows how the various gcc options influence some linker options of
MinGW.
| -nostartfiles | -nodefaultlibs | -nolibc | -nostdlib |
…/crt2.o | | yes | ? | |
…/crtbegin.o | | yes | ? | |
-lmingw32 | yes | | ? | |
-lgcc | yes | | ? | |
-lgcc_eh | yes | | ? | |
-lmoldname | yes | | ? | |
-lmingwex | yes | | ? | |
-lmsvcrt | yes | | ? | |
-lpthread | yes | | ? | |
-ladvapi32 | yes | | ? | |
-lshell32 | yes | | ? | |
-luser32 | yes | | ? | |
-lkernel32 | yes | | ? | |
-liconv | yes | | ? | |
-lmingw32 | yes | | ? | |
-lgcc | yes | | ? | |
-lgcc_eh | yes | | ? | |
-lmoldname | yes | | ? | |
-lmingwex | yes | | ? | |
-lmsvcrt | yes | | ? | |
…/crtend.o | | yes | ? | |
-nostdlib
seems to be a combination of -nostartfiles
and -nodefaultlibs
and (as the option name implies) prevents any standard library from being linked with the executable.