collect2.exe是做什么的? [英] What does collect2.exe do?

查看:861
本文介绍了collect2.exe是做什么的?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我检查gcc -v -o proggy.exe proggy.o生成的代码时,我发现命令行扩展为一大堆库选项和库,所有这些选项和库都使用collect2.exe链接在一起. ld.exe怎么了?为什么我看不到?有人可以向我解释一下collect2.exe做什么吗?

When I examine the code generated by gcc -v -o proggy.exe proggy.o I find that the command line expands into a large bunch of library options and libraries, all of which are linked using collect2.exe. What happened to ld.exe? Why don't I see that? Can someone explain to me what collect2.exe does?

推荐答案

collect2是一种实用程序,用于生成__main(在main开头调用的自动生成的函数)所依赖的构造函数表.在.通常您看不到它,因为它在文件系统上被命名为ld,并且依次调用了真实的ld(通常称为real-ld,尽管collect2会检查许多查找它的地方)

collect2 is a utility used to generate a table of constructors that __main (an auto-generated function called at the beginning of main) depends on. Normally you don't see it because it's named ld on the file system, and it in turn calls the real ld (typically called real-ld, although collect2 will check a number of places looking for it)

这篇关于collect2.exe是做什么的?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆