enormous executable

Julian Seward (Intl Vendor) v-julsew@microsoft.com
Mon, 1 Oct 2001 04:47:10 -0700


| Surely the executable itself is only linked with the=20
| functions that are actually used by the program? =20

AFAIUI the GNU linker is not clever enough to remove junk
on a per-function basis, only on a per-object basis.  This is
why we do object-splitting -- by breaking libraries up into=20
thousands of .o files before rolling them into a .a, the
effectiveness of what GNU ld can do is enhanced.

Perhaps more recent GNU ld's do better on some platforms?
I have a vague recollection of some -gc-sections flag.

J