What are .S files?
assembly, file, file-extension
Solution
`.S` files are source code files written in assembly. Assembly is an extremely low-level form of programming. The files contain assembly instructions to the processor in sequential order and are typically compiled based on a selected architecture. Examples of such files are often seen in the linux kernel for specific architectures, e.g. x86, sparc, ARM, etc.
For more information about assembly language:
- X86 Assembly/GAS syntax
- x86 Instruction list
- TLDP Linux Assembly Howto
- Example in the Linux kernel: arch/x86/net/bpf_jit.S
Problem
I've seen `.S` files in various projects such as in the Linux Kernel, FreeBSD kernel, or in some other projects. What do these files do and why can't we have `.c` files instead ?