海湾合作委员会的通行证和被援引的计划是什么? [英] What are GCC's passes and invoked programs?

查看:154
本文介绍了海湾合作委员会的通行证和被援引的计划是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

它出现在另一个问题:什么是程序以及由 gcc (特别是编译 C C ++ >),这样有人可能会设计一些拦截和修改流程以实现各种自定义编码的方案?编译器驱动程序(即 gcc )和编译器本身也可以兼作预处理器( cc1 cc1plus )。它还调用汇编程序()和链接程序( ld )。另外还有一个名为 collect2 的工具,在某些情况下可以在链接过程中提供帮助。



如果您想查看中间状态和调用是这样做的:

  gcc -save-temps -v ..... 

如果您想查看编译器的优化通行证,请使用以下选项:

  gcc -fdump-tree-all -fdump-rtl-all .... 

这会产生(隐约)用于调试的内部状态的人类可读转储。这是没有什么可以保存并在以后重新加载到编译器中,这是肯定的,但是如果您计划修改编译器的源代码或编写GCC插件,则会很有帮助。


It came up in another question: What are the programs and parts called by gcc (particularly when compiling C or C++) so that someone might engineer some scheme of intercepting and altering the flow for various custom coding purposes?

解决方案

The compiler binaries are the "compiler driver" (i.e. gcc), and the compiler itself which also doubles as a preprocessor (cc1 or cc1plus). It also invokes the assembler (as), and the linker (ld). Additionally there's a tool called collect2 that assists during the link process in some cases.

If you want to see what the intermediate states and invocations are then do this:

gcc -save-temps -v .....

If you want to see the compiler's optimization passes, then use these options:

gcc -fdump-tree-all -fdump-rtl-all ....

This produces (vaguely) human readable dumps of the internal state for debugging purposes. It's nothing you could save and reload into the compiler later, that's for sure, but it's helpful if you plan to modify the compiler's source, or write a GCC plugin.

这篇关于海湾合作委员会的通行证和被援引的计划是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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