Despite their seemingly disparate approaches to the development environment, both UNIX and Windows do share a common architectural back-end when it comes to compilers (and many many other things, as we will find out in the coming pages). Executable generation is essentially handled end-to-end on both systems by one program: the compiler. Both systems have a single front-end executable that acts as glue for essentially all 5 steps mentioned above.
于:http://www.savs.hcc.edu.tw/~chuavv/articles/RevEng/ch02.html#the_compiler
这是什么意思?一台机器上的编译器编译程序(预处理 -> 解析 -> 翻译 -> 汇编 -> 链接)而在另一台机器上,编译器也执行相同的任务但相反?不确定“可执行文件的生成基本上是在两个系统上端到端处理的……可执行文件充当基本上所有 5 个步骤的粘合剂”的确切含义。
最佳答案
这基本上是英语阅读理解,而不是编程。
Executable generation is essentially handled end-to-end on both systems.
这意味着从头到尾,从明文源码到最终的可执行文件,一个程序,编译器包干了所有工作。
executable that acts as glue for essentially all 5 steps.
无论是 GCC 还是 MSVC,都有一个驱动程序,一种调用底层预处理器、解析器、汇编器和链接器(在 GCC 中是 CPP、cc1、as 和 ld)可执行文件的“管理器”可执行文件。它只是一把保护伞,是其子程序的包装器。
但是,我不同意 Win 和 Unix 共享一个基本架构。他们的共同点只是非常基本的东西,无法真正以不同的方式完成。例如,它们都有一个内核,它们都可以在诺伊曼架构的计算机上运行,等等。就像作者说汽车发动机和手磨机共享一个共同的架构只是因为它们都是机械设备一样。
关于编译器函数和可执行文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13104628/