> Huh? Isn't the output of the linker roughly the same size as the sum of the inputs?
No. Linkers today even do link-time code generation. Debug info is gargantuan and can be kept as separate files too.
No. Linkers today even do link-time code generation. Debug info is gargantuan and can be kept as separate files too.
Those explicit directives might be more implicit than you think. A linker will likely fold functions declared as inline. Template functions and template classes are implicitly inline, so for example, all uses of std::vector<std::string> will (likely) be implicitly folded together.
(Or are you assuming that a debug flag is used so that all inlined functions are not really inlined by the compiler?)