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

Denys Vlasenko
2008-07-02T00:04:21Z

On Wednesday 02 July 2008 00:56, Valdis.Kletnieks@vt.edu 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