[PATCH] loader: Use RTLD_DEEPBIND if available to prefer local symbols
mark.kettenis at xs4all.nl
Sat Oct 5 04:27:57 PDT 2013
> From: Eric Anholt <eric at anholt.net>
> Date: Fri, 04 Oct 2013 16:54:00 -0700
> 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.
Well, the fact that RTLD_DEEPBIND isn't standardized and only exists
on Linux must count for something as well. Using it will hide
namespace bugs on Linux and largely remove any incentive to fix them.
More information about the xorg-devel