简体   繁体   中英

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. I understand that we pass -m64 flag but should we use 64-Bit GCC compiler to generate 64-Bit binary code?

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. 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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM