[英]Can I generate 64-Bit application binary from a 32-Bit GCC compiler?
I want to understand how a 32-Bit compiler generates 64-Bit binary.我想了解 32 位编译器如何生成 64 位二进制文件。 I understand that we pass -m64 flag but should we use 64-Bit GCC compiler to generate 64-Bit binary code?我知道我们通过了 -m64 标志,但是我们应该使用 64 位 GCC 编译器来生成 64 位二进制代码吗?
Two compilers can do precisely the same thing, producing precisely the same output from the same input, so long as they both execute the same algorithms.两个编译器可以做完全相同的事情,从相同的输入产生完全相同的输出,只要它们都执行相同的算法。 Whether they are compiled as 32-bit or 64-bit executables makes no difference to the logic of their execution so long as the limits of 32-bit executables aren't exceeded.只要不超过 32 位可执行文件的限制,它们是否被编译为 32 位或 64 位可执行文件对其执行逻辑没有区别。 Similarly, you can run a compiler on one platform to produce output for a totally different platform because the platform a program runs on has no effect on its internal logic.同样,您可以在一个平台上运行编译器来为完全不同的平台生成输出,因为程序运行的平台对其内部逻辑没有影响。 The output produced depends only on the logic the compiler follows.产生的输出仅取决于编译器遵循的逻辑。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.