aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@chromium.org>2021-04-19 00:56:03 -0400
committerMike Frysinger <vapier@gentoo.org>2021-04-19 00:56:03 -0400
commitf0b893136c4b1418edadff6ff8e65afe68c3b4a8 (patch)
tree6fdee9826ba35e675da2e8d7cfe4a6b67311fdb5 /lddtree.py
parentsecurity: restore syscalls accidentally dropped (diff)
downloadpax-utils-f0b893136c4b1418edadff6ff8e65afe68c3b4a8.tar.gz
pax-utils-f0b893136c4b1418edadff6ff8e65afe68c3b4a8.tar.bz2
pax-utils-f0b893136c4b1418edadff6ff8e65afe68c3b4a8.zip
lddtree: respect (destination) root with --argv0 interp probing
This is important because the path in this func reflects where the interpreter is going to be living, not where it's being copied from. These are often the same paths (relatively speaking), but when we're copying from a cross-compiler sysroot, or when using --libdir so the target paths are rewritten, the interp path probably does not line up with whatever happens to live in the active rootfs. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'lddtree.py')
-rwxr-xr-xlddtree.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/lddtree.py b/lddtree.py
index b8fde0c..dd17387 100755
--- a/lddtree.py
+++ b/lddtree.py
@@ -157,7 +157,7 @@ def GenerateLdsoWrapper(root, path, interp, libpaths=()):
interp_name),
'libpaths': ':'.join(['${basedir}/' + os.path.relpath(p, basedir)
for p in libpaths]),
- 'argv0_arg': '--argv0 "$0"' if interp_supports_argv0(interp) else '',
+ 'argv0_arg': '--argv0 "$0"' if interp_supports_argv0(root + interp) else '',
}
wrapper = """#!/bin/sh
if ! base=$(realpath "$0" 2>/dev/null); then