Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to preprocess and compile an assembly file(.s) using gcc?

I have a .s file which needs to be preprocessed before compiling it using GCC. Can anyone help me?

like image 298
vimal prathap Avatar asked Nov 01 '25 02:11

vimal prathap


1 Answers

The easiest way is to rename the file to be .S instead of .s -- the .s extension mean assembler without preprocessing while .S means assembly with preprocessing.

like image 184
Chris Dodd Avatar answered Nov 03 '25 02:11

Chris Dodd