[PATCH] loader: Use RTLD_DEEPBIND if available to prefer local symbols

Egbert Eich e4t at freenet.de
Sat Oct 5 05:14:29 PDT 2013


On Fri, Oct 04, 2013 at 04:54:00PM -0700, Eric Anholt wrote:
> Keith Packard <keithp at keithp.com> writes:
> 
> > Egbert Eich <eich at freedesktop.org> writes:
> >
> >> If there are namespace clashes among different drivers it would be
> >> preferrable if each driver used its local symbols. Use the
> >> RTLD_DEEPBIND if available to achive this.
> >
> > Eric and Adam are doing a lot of work in Mesa to fix the exported symbol
> > lists; do we expect this hack to still be required in the future? Or is
> > it purely a temporary kludge?
> 
> Note that Mesa is not involved in the use case that Egbert mentioned.
> 
> I think fixing the driver builds to be -Bsymbolic would be superior to
> this patch (and a performance win!) while solving the original problem.
> RTLD_DEEPBIND has the unfortunate downside that it prevents you from
> using LD_PRELOAD for things like cheesy non-valgrind malloc debuggers or
> most GL interposers, which is the only real argument I see against it.

Looking at the docs using -Bsymbolic for driver builds indeed seems to be 
the better solution here.

Cheers,
	Egbert.


More information about the xorg-devel mailing list