Search code examples
fileassemblyfile-extension

What are .S files?


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 ?


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: