GCC/MINGW中'startup files'来源
Source for 'startup files' in gcc/mingw
我使用 mingw32
在 gcc 中有一个选项
" -nostartfiles Do not use the standard system startup files when linking. The standard system libraries are used normally, unless -nostdlib or -nodefaultlibs is used. "
如果我不在我的自己几乎空的 c 源中使用它,我在我的 exe 1000 行包含此类函数的冗长代码存根中得到了
00401000 <___mingw_CRTStartup>:
00401110 <__gnu_exception_handler@4>:
00401280 <_mainCRTStartup>:
004012a0 <_WinMainCRTStartup>:
004012c0 <_atexit>:
004012d0 <__onexit>:
004012e0 <___gcc_register_frame>:
0040132c <___gcc_deregister_frame>:
00401334 <_WinMain@16>:
00401340 <___dyn_tls_dtor@12>:
00401390 <___dyn_tls_init@12>:
00401420 <___tlregdtor>:
00401430 <___cpu_features_init>:
00401510 <__fpreset>:
00401520 <___report_error>:
00401580 <___write_memory.part.0>:
00401690 <__pei386_runtime_relocator>:
00401870 <___do_global_dtors>:
004018a0 <___do_global_ctors>:
004018f0 <___main>:
00401910 <___mingwthr_run_key_dtors.part.0>:
00401970 <____w64_mingwthr_add_key_dtor>:
00401a00 <____w64_mingwthr_remove_key_dtor>:
00401a90 <___mingw_TLScallback>:
00401b30 <___getmainargs>:
00401b38 <__setmode>:
00401b40 <___p__fmode>:
00401b48 <___p__environ>:
00401b50 <__cexit>:
00401b58 <_signal>:
00401b60 <_fwrite>:
00401b68 <_vfprintf>:
00401b70 <_abort>:
00401b78 <_memcpy>:
00401b80 <_calloc>:
00401b88 <_free>:
00401b90 <_SetUnhandledExceptionFilter@4>:
00401b98 <_ExitProcess@4>:
00401ba0 <_GetModuleHandleA@4>:
00401ba8 <_GetProcAddress@8>:
00401bb0 <_VirtualQuery@12>:
00401bb8 <_VirtualProtect@16>:
00401bc0 <_GetCommandLineA@0>:
00401bc8 <_GetStartupInfoA@4>:
00401bd0 <_EnterCriticalSection@4>:
00401bd8 <_TlsGetValue@4>:
00401be0 <_GetLastError@0>:
00401be8 <_LeaveCriticalSection@4>:
00401bf0 <_DeleteCriticalSection@4>:
00401bf8 <_InitializeCriticalSection@4>:
00401c00 <_main>:
00401ce0 <_register_frame_ctor>:
00401cfc <__CTOR_LIST__>:
00401d00 <.ctors.65535>:
00401d08 <__DTOR_LIST__>:
也许有人可以说我在哪里可以找到来源吗?(或者至少一些详细的解释是什么 - 但来源会更好)
我想你可以下载GCC源代码或MinGW源代码。
由于 sourceforge.net 上的 mingw-w64 项目正在转移到 mingw-w64.org 我建议还检查 mingw-w64.org 然后运行grep
或类似的文本搜索实用程序并查找定义这些功能的特定文件。
另请注意,一些函数如exit()
、atexit()
、memcpy()
等来自 C 运行时库,它们不会在 GCC 源代码中定义。
相关文章:
- 如何确定包含路径的来源?
- OpenGL 调试上下文警告 -"将使用视频内存作为缓冲区异议的来源
- 为什么 C++ 编译器在"c:program filesgnu emacsinclude"中查找包含文件?
- CMakeLists.txt:(add_executable):没有给目标提供来源:教程
- 如何找出 Kernel32 依赖项的来源
- Rcpp - 来源Cpp - 未定义的符号
- 找不到小内存泄漏的来源
- 从模板实例化/类型推断中查找错误消息的实际来源
- 安装了要来源的特征cmake目标点包括但不安装
- 如何使用 Valgrind 确定内存泄漏"still-available"来源?
- 跟踪非管理C#代码中违反访问的来源
- 从Visual Studio中的来源构建外部库
- MFC 对话框控件的"Accept Files"选项如何工作?
- 从来源建立咖啡馆的麻烦
- 以简单格式"c:filessample.txt"从用户读取文件路径
- /usr/include/boost/filesystem/path.hpp:307:未定义对'boost::files
- MinGW在代码块中构建时的ar.exe "could not create temporary file whilst writing archive: no more archived files
- 标准Windows 7用户如何能够删除C:Program Files下的文件
- 如何从 VisualStudio 获取更多详细信息以跟踪警告的来源
- GCC/MINGW中'startup files'来源