Smart compilers to interprocedural optimization between files by understanding how to take multiple file names on the command line. This way no magic in the linker is required, though I grant it helps.