diff options
author | Manoj Gupta <manojgupta@google.com> | 2019-11-16 19:05:42 -0800 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2020-03-26 13:09:11 -0400 |
commit | f3771c85733121119db11be6424c8f46e21a288e (patch) | |
tree | ab9b840a782a23a1b5518d293bccc2ac4e6ed049 | |
parent | pylintrc: enable more warnings (diff) | |
download | pax-utils-f3771c85733121119db11be6424c8f46e21a288e.tar.gz pax-utils-f3771c85733121119db11be6424c8f46e21a288e.tar.bz2 pax-utils-f3771c85733121119db11be6424c8f46e21a288e.zip |
lddtree: Put ldso interpreter library path at end
Put ldso interpreter library path at end of libpaths search.
It is supposed to be a final fallback path in case library
search was incomplete.
As a side effect, it currently mitigates the incorrect
libbfd being loaded for aarch64 standalone toolchain.
Bug: https://crbug.com/917193
Reviewed-on: https://crrev.com/c/1920643
Signed-off-by: Manoj Gupta <manojgupta@chromium.org>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
-rwxr-xr-x | lddtree.py | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -147,7 +147,8 @@ def GenerateLdsoWrapper(root, path, interp, libpaths=()): """ basedir = os.path.dirname(path) interp_dir, interp_name = os.path.split(interp) - libpaths = dedupe([interp_dir] + list(libpaths)) + # Add ldso interpreter dir to end of libpaths as a fallback library path. + libpaths = dedupe(list(libpaths) + [interp_dir]) replacements = { 'interp': os.path.join(os.path.relpath(interp_dir, basedir), interp_name), |