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

Eric Anholt eric at anholt.net
Fri Oct 4 16:54:00 PDT 2013

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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 835 bytes
Desc: not available
URL: <http://lists.x.org/archives/xorg-devel/attachments/20131004/f1d7e8bc/attachment.pgp>

More information about the xorg-devel mailing list