loader: Look for any version of currently linked libudev.so
authorChris Wilson <chris@chris-wilson.co.uk>
Wed, 10 Jun 2015 07:28:13 +0000 (08:28 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Wed, 8 Jul 2015 10:04:02 +0000 (11:04 +0100)
commitf2413457937f8f4a92e11379569be69e508d7477
tree9c1798e0cee26e2285c7c09163bc02fcab9936a9
parentc8d3ebaffc0d7d915c1c19d54dba61fd1e57b338
loader: Look for any version of currently linked libudev.so

Since there was an ABI break and linking twice against libudev.so.0 and
libudev.so.1 causes the application to quickly crash, we first check if
the application is currently linked against libudev before dlopening a
local handle. However for backwards/forwards compatability, we need to
inspect the application for current linkage against all known versions
first. Not doing so causes a crash when both libraries are present and
so mesa chooses libudev.so.1 but the application was linked against
libudev.so.0.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Emil Velikov:

I'm ever so slightly conserned that RTLD_NOLOAD is not part of the POSIX
standard, thus it's missing on some platforms (*BSD seems ok, while
Solaris, MacOS are not).

Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Cc: mesa-stable@lists.freedesktop.org
src/loader/loader.c