4 ms·
> I believe that this the reason why static libraries are usually shipped as separate object files (.o) within ar archives (.a), as those were only linked in on
by iforgotpassword 6y ago
> I believe that this the reason why static libraries are usually shipped as separate object files (.o) within ar archives (.a), as those were only linked in on demand.
Yep. One function per C/obj file for smallest static binary possible.
- arcticbull 6y agoCan't you achieve the same result with -ffunction-sections?
- loeg 6y agoYes. And its twin, -fdata-sections.
- iforgotpassword 6y agoYes but that's modern fancy stuff. :-)
- pjmlp 6y agoYes, on the compilers that offer it.