ILD

gcc指定输入文件格式
作者:Herbert Yuan 邮箱:yuanjp@hust.edu.cn
发布时间:2018-12-25 站点:Inside Linux Development

今天在调试汇编的时候,使用.s作为文件后缀,发现预处理没有生效。修改成.S就可以了。


gcc可以使用

-x language

指定输入的语言


c  c-header  cpp-output c++  c++-header  c++-cpp-output objective-c  objective-c-header  objective-c-cpp-output objective-c++ objective-c++-header objective-c++-cpp-output assembler  assembler-with-cpp ada d f77  f77-cpp-input f95  f95-cpp-input go brig


参考

https://stackoverflow.com/questions/27993384/how-do-i-enable-the-preprocessor-in-gcc-assembly

https://gcc.gnu.org/onlinedocs/gcc/Overall-Options.html


Copyright © linuxdev.cc 2017-2024. Some Rights Reserved.