Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 7 Mar 1995 13:13:27 +1000
From:      Bruce Evans <bde@zeta.org.au>
To:        current@freebsd.org
Subject:   non-shared libgcc.a bloats executables
Message-ID:  <199503070313.NAA04463@godzilla.zeta.org.au>

next in thread | raw e-mail | index | archive | help
Compiling the feature-laden (;-) program `main() {}' now results in an
executable that is 4K larger than before (8K text instead of 4K).  Lots
of support functions in libgcc.a are dragged in by references in libc.a
although few of these functions are called and about half of them are
duplicated in libc.a.

Better results can be obtained by changing the libraries in the ld
command line from `-lgcc -lc -lgcc' to `-lgcc -lc'.  Then only one
module from libgcc.a (main.o) is linked to.  I expected `-lc -lgcc'
to work better, linking in the gnu versions of modues only if there
are no versions in libc.a.

Bruce



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199503070313.NAA04463>