Re: [PATCH 0/4] build system: section garbage collection for vmlinux

Denys Vlasenko
2007-09-12T20:20:34Z

On Tuesday 11 September 2007 22:03, Andi Kleen wrote:
> Denys Vlasenko <vda.linux@googlemail.com> writes:
> >
> >    text    data     bss     dec     hex filename
> > 5159478 1005139  406784 6571401  644589 linux-2.6.23-rc4.org/vmlinux
> > 5131822  996090  401439 6529351  63a147 linux-2.6.23-rc4.gc/vmlinux
> >
> > In this particular case, 402 objects were discarded, saving 42 kb.
>
> I wonder how many of those are 100% unused on all configurations?
> That could be an useful janitor task to clean up

With CONFIG_DISCARD_UNUSED_SECTIONS=y ld will helpfully flood you
with the list of discarded stuff. I pass --print-gc-sections to it.
--
vda