[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: -Wl,--as-needed considered possibly harmful

On Mon, 10 Dec 2007, Sune Vuorela wrote:
> On 2007-12-10, Loïc Minier <lool@dooz.org> wrote:
> >  I think in both cases it was something like the main binary being
> >  linked to many utility libraries (because it was easy to link it to
> >  everything which configure found), and then the plugin calling directly
> >  into these libs, but not being linked to them.  If the main binary
> >  didn't actually use the libs, these were stripped out, and then the
> >  dlopening of the plugins would fail.
> >    These were really issues in the build process, issues which would
> >  have been caught with -z defs before --as-needed (which is why I'm
> >  advocating usage of -z defs before --as-needed), but slipped silently
> >  in the end package and actually hit users.
> Isn't the new dpkg-shlipdeps warning about symbols it can't find ?

Only if the library has a SONAME. This is intended so that
perl/python/apache modules do not generate bad warnings: they rely on the
binary dlopening them to provide the symbols (and it's okay that way).

So the problem might still be missed on some plugins without SONAME.

Raphaël Hertzog

Le best-seller français mis à jour pour Debian Etch :

Reply to: