C Programming • C17 baseline, standards-specific features labeled
Object Files, Linkers, and ABI Boundaries
Understand how declarations become object files and how binary interfaces affect libraries and deployments.
A compiler translates each source file into an object file; the linker resolves symbols and combines objects or libraries. An ABI includes calling conventions, object layout, symbol naming, and other binary-level rules. Changing a public struct layout can break binary compatibility even when source still compiles.
Example
cc -std=c17 -c api.c -o api.o
cc -std=c17 -c app.c -o app.o
cc api.o app.o -o app
What to expect
Compilation creates separate object files; the final link step resolves references between them.
Key idea: For long-lived library ABIs, prefer opaque types and versioned interfaces over exposing mutable struct layouts.