Date: Wed, 18 Sep 2013 09:04:17 +0100 From: Andrew Turner <andrew@fubar.geek.nz> To: Tim Kientzle <kientzle@freebsd.org> Cc: Ed Schouten <ed@80386.nl>, FreeBSD Current <freebsd-current@freebsd.org> Subject: Re: -ffunction-sections, -fdata-sections and -Wl,--gc-sections Message-ID: <20130918090417.73015751@bender.Home> In-Reply-To: <C44ABFB8-557D-48F3-A379-C00B6E0E2606@freebsd.org> References: <CAJOYFBBGY0GosPwG1B=1MKyapChEtX-O97r2zhXpGS8o7WO3gA@mail.gmail.com> <C44ABFB8-557D-48F3-A379-C00B6E0E2606@freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, 15 Sep 2013 19:30:01 -0700 Tim Kientzle <kientzle@freebsd.org> wrote: > > On Sep 15, 2013, at 2:24 PM, Ed Schouten <ed@80386.nl> wrote: > > GCC and Clang support the -ffunction-sections and -fdata-sections > > flags. Essentially, these flags force the compiler to put every > > function and variable in its own section. Though this will blow up > > the > …. > > - devd suddenly becomes 500 KB in size, instead of a megabyte, > > - init's size drops from 900 KB to 600 KB, > > Can you figure out what functions are getting omitted > when you make this change? You can add "-Wl,--print-gc-sections" to LDFLAGS to print which sections the linker is removing. Andrew
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20130918090417.73015751>