title: Source for 'startup files' in gcc/mingw
body: <p>Im using mingw32</p>
  
  <p>In gcc there is an option </p>
  
  <pre><code>" -nostartfiles  Do not use the standard system startup files when linking. The standard system libraries are used normally, unless -nostdlib or -nodefaultlibs is used. "
  </code></pre>
  
  <p>If i do not use it in my itself almost empty c source i got in my exe 1000-lines disasembly long stub of code containing such functions</p>
  
  <pre><code>00401000 &lt;___mingw_CRTStartup&gt;:
  00401110 &lt;__gnu_exception_handler@4&gt;:
  00401280 &lt;_mainCRTStartup&gt;:
  004012a0 &lt;_WinMainCRTStartup&gt;:
  004012c0 &lt;_atexit&gt;:
  004012d0 &lt;__onexit&gt;:
  004012e0 &lt;___gcc_register_frame&gt;:
  0040132c &lt;___gcc_deregister_frame&gt;:
  00401334 &lt;_WinMain@16&gt;:
  00401340 &lt;___dyn_tls_dtor@12&gt;:
  00401390 &lt;___dyn_tls_init@12&gt;:
  00401420 &lt;___tlregdtor&gt;:
  00401430 &lt;___cpu_features_init&gt;:
  00401510 &lt;__fpreset&gt;:
  00401520 &lt;___report_error&gt;:
  00401580 &lt;___write_memory.part.0&gt;:
  00401690 &lt;__pei386_runtime_relocator&gt;:
  00401870 &lt;___do_global_dtors&gt;:
  004018a0 &lt;___do_global_ctors&gt;:
  004018f0 &lt;___main&gt;:
  00401910 &lt;___mingwthr_run_key_dtors.part.0&gt;:
  00401970 &lt;____w64_mingwthr_add_key_dtor&gt;:
  00401a00 &lt;____w64_mingwthr_remove_key_dtor&gt;:
  00401a90 &lt;___mingw_TLScallback&gt;:
  00401b30 &lt;___getmainargs&gt;:
  00401b38 &lt;__setmode&gt;:
  00401b40 &lt;___p__fmode&gt;:
  00401b48 &lt;___p__environ&gt;:
  00401b50 &lt;__cexit&gt;:
  00401b58 &lt;_signal&gt;:
  00401b60 &lt;_fwrite&gt;:
  00401b68 &lt;_vfprintf&gt;:
  00401b70 &lt;_abort&gt;:
  00401b78 &lt;_memcpy&gt;:
  00401b80 &lt;_calloc&gt;:
  00401b88 &lt;_free&gt;:
  00401b90 &lt;_SetUnhandledExceptionFilter@4&gt;:
  00401b98 &lt;_ExitProcess@4&gt;:
  00401ba0 &lt;_GetModuleHandleA@4&gt;:
  00401ba8 &lt;_GetProcAddress@8&gt;:
  00401bb0 &lt;_VirtualQuery@12&gt;:
  00401bb8 &lt;_VirtualProtect@16&gt;:
  00401bc0 &lt;_GetCommandLineA@0&gt;:
  00401bc8 &lt;_GetStartupInfoA@4&gt;:
  00401bd0 &lt;_EnterCriticalSection@4&gt;:
  00401bd8 &lt;_TlsGetValue@4&gt;:
  00401be0 &lt;_GetLastError@0&gt;:
  00401be8 &lt;_LeaveCriticalSection@4&gt;:
  00401bf0 &lt;_DeleteCriticalSection@4&gt;:
  00401bf8 &lt;_InitializeCriticalSection@4&gt;:
  00401c00 &lt;_main&gt;:
  00401ce0 &lt;_register_frame_ctor&gt;:
  00401cfc &lt;__CTOR_LIST__&gt;:
  00401d00 &lt;.ctors.65535&gt;:
  00401d08 &lt;__DTOR_LIST__&gt;:
  </code></pre>
  
  <p>Could maybe someone say where i could find source for that?
  (or at least some detailed explanation what is that - but source would be better)</p>