Specified file formats
New to topics? Read the documentation here!
The ELF standard specifies multiple file formats:
- Object files (
.o
).Intermediate step to generating executables and other formats:Source code | | Compilation | v Object file | | Linking | v Executable
Object files exist to make compilation faster: withmake
, we only have to recompile the modified source files based on timestamps.We have to do the linking step every time, but it is much less expensive.
- Executable files (no standard Linux extension).This is what the Linux kernel can actually run.
- Archive files (
.a
).Libraries meant to be embedded into executables during the Linking step.
- Shared object files (
.so
).Libraries meant to be loaded when the executable starts running.
- Core dumps.Such files may be generated by the Linux kernel when the program does naughty things, e.g. segfault.They exist to help debugging the program.
In this tutorial, we consider only object and executable files.