Re: [PATCH 1/23] make section names compatible with -ffunction-sections -fdata-sections

From: Denys Vlasenko
Date: Tue Jul 01 2008 - 20:04:23 EST


On Wednesday 02 July 2008 00:56, Valdis.Kletnieks@xxxxxx wrote:
> On Wed, 02 Jul 2008 02:33:48 +0200, Denys Vlasenko said:
>
> > The purpose of these patches is to make kernel buildable
> > with "gcc -ffunction-sections -fdata-sections".
> >
> > Newer gcc and binutils can do dead code and data removal
> > at link time. It is achieved using combination of
> > -ffunction-sections -fdata-sections options for gcc and
> > --gc-sections for ld.
>
> Interesting idea. Do you happen to have before-and-after 'size vmlinux'
> numbers to show how much space is actually reclaimed?

After this patch there will be no change - it does not do
dead code and data removal. I submitted bigger change before
but it was probably too big for digestion.

That earlier version was achieving ~10% kernel size reduction
if kernel is built without loadable module support
(loadable modules interfere with linker's dead code
and data removal, need to add some rather contrived magic
to make it work there too. Left as TODO for later).
--
vda
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/