[Bug backends/24488] ebl_openbackend might use wrong library search path
mark at klomp dot org
sourceware-bugzilla@sourceware.org
Thu May 30 18:52:00 GMT 2019
https://sourceware.org/bugzilla/show_bug.cgi?id=24488
Mark Wielaard <mark at klomp dot org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution|--- |FIXED
--- Comment #8 from Mark Wielaard <mark at klomp dot org> ---
(In reply to Matthias Maennich from comment #7)
> I tried the patch against libdw1-0.168-1 on Debian Stretch. It cleanly
> applied and solved the very issue I saw.
Thanks for testing. Pushed as follows:
commit bfcf8b1fee8805b42b262baf352c58574df59362 (HEAD -> master, origin/master,
origin/HEAD)
Author: Mark Wielaard <mark@klomp.org>
Date: Sat May 11 16:55:01 2019 +0200
libebl: Try harder to find backend library in bin and lib origin paths.
eblopenbackend tries to find libraries based on the $ORIGIN/../$LIB/
path. But depending on whether the system is multilib or multiarch
this doesn't always work. On multilib systems $LIB is always just one
directory deep (it is either .../lib or .../lib64) but on multiarch
systems it can be multiple directories deep (.../lib/x86_64-linux-gnu).
This means that on multiarch systems $ORIGIN/../$LIB only works for
binaries (where origin is .../bin/), but not for libraries.
Most of the time it still works because of RPATH which is tried afterwards.
But RPATH processing does not always work reliable.
So try multiple paths first. The first time using the $ORIGIN as if it
came from an executable (in bin/) and then using the $ORIGIN as if it
came from an library (in lib[64]/ or lib/<arch>/). So first time using
../$LIB and second time just with the elfutils EBL_SUBDIR.
The first is what we do now and always work on multilib systems. The
second try works when loading relative to a library whether on a multilib
or multiarch system.
Then we use the same fallback (not using any path) we used already
(to take advantage of any RPATH or LD_LIBRARY_PATH setting).
https://sourceware.org/bugzilla/show_bug.cgi?id=24488
Signed-off-by: Mark Wielaard <mark@klomp.org>
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the Elfutils-devel
mailing list