5.12.1 Integrating Assembly Language Modules
Routines can be entirely encoded in assembly code. Ideally, the code for these should be placed in assembly source files. These can be included into your project, built alongside C source files, and combined into the program image by the linker.
Use a .s extension for source files containing plain assembly code, or
.S for files that contain preprocessor directives that must be
first processed by the preprocessor. Alternatively, you can use the
-xassembler-with-cpp
option (see 4.6.2.6 X: Specify Source Language Option) to force all assembly
source files regardless of extension to be preprocessed.
By default, assembly modules are not optimized by the assembler; however,
optimization can be enabled by using the -fasmfile
option (see 4.6.6.7 Asmfile Option).