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

Oleg Verych
2007-09-05T20:19:41Z

On Wed, Sep 05, 2007 at 07:46:11PM +0100, Denys Vlasenko wrote:
> On Wednesday 05 September 2007 16:53, Oleg Verych wrote:
> > * Wed, 5 Sep 2007 14:43:21 +0100
> > * User-Agent: KMail/1.9.1
> > >
> > > Build system: section garbage collection for vmlinux
> >
> > Maybe this is just a test suit to get finish with `make XYZ static`?
>
> They are vaguely connected in a sense that unused function which is
> not marked static doesn't generate gcc warning, but will be discarded
> by --gc-sections. "make XYZ static" also tends to find them - you make
> function static, you recompile the file, and gcc informs you that
> the function is not used at all!
>
> This happened to me when I did aic7xxx patches.
>
> You may yse --print-gc-sections to see the list of discarded sections.

Anyway, this is gccism/binutilizm. That about other possible/future
options?

Give me example, please, why function must be non static if not used.
If usage requires kconfig tuning, then this is a better way to go, than
to adopt yet another GNU/Luxury.
____