From owner-freebsd-current Mon Mar 6 19:15:41 1995 Return-Path: current-owner Received: (from majordom@localhost) by freefall.cdrom.com (8.6.10/8.6.6) id TAA02619 for current-outgoing; Mon, 6 Mar 1995 19:15:41 -0800 Received: from godzilla.zeta.org.au (godzilla.zeta.org.au [203.2.228.34]) by freefall.cdrom.com (8.6.10/8.6.6) with ESMTP id TAA02603 for ; Mon, 6 Mar 1995 19:15:26 -0800 Received: (from bde@localhost) by godzilla.zeta.org.au (8.6.9/8.6.9) id NAA04463 for current@freebsd.org; Tue, 7 Mar 1995 13:13:27 +1000 Date: Tue, 7 Mar 1995 13:13:27 +1000 From: Bruce Evans Message-Id: <199503070313.NAA04463@godzilla.zeta.org.au> To: current@freebsd.org Subject: non-shared libgcc.a bloats executables Sender: current-owner@freebsd.org Precedence: bulk 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