1 |
commit: 9206a1f79eee279e4171bd2146fc70bff133cb31 |
2 |
Author: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Aug 14 22:13:32 2020 +0000 |
4 |
Commit: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Aug 14 22:13:32 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/pax-utils.git/commit/?id=9206a1f7 |
7 |
|
8 |
lddtree.sh: drop /lib extraction heuristics |
9 |
|
10 |
Avoid using 'strings' to extract libpaths. |
11 |
Let's use hardcoded fallback values unconditionally |
12 |
until we get more robust way to fetch default libpath. |
13 |
|
14 |
Reported-by: Kent Fredric |
15 |
Bug: https://bugs.gentoo.org/736601 |
16 |
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org> |
17 |
|
18 |
lddtree.sh | 10 +--------- |
19 |
1 file changed, 1 insertion(+), 9 deletions(-) |
20 |
|
21 |
diff --git a/lddtree.sh b/lddtree.sh |
22 |
index 96163e3..b05ce19 100755 |
23 |
--- a/lddtree.sh |
24 |
+++ b/lddtree.sh |
25 |
@@ -118,7 +118,7 @@ find_elf() { |
26 |
check_paths "${elf}" "${c_ldso_paths[@]}" && return 0 |
27 |
fi |
28 |
|
29 |
- check_paths "${elf}" ${lib_paths_ldso:-${lib_paths_fallback}} && return 0 |
30 |
+ check_paths "${elf}" ${lib_paths_fallback} && return 0 |
31 |
fi |
32 |
return 1 |
33 |
} |
34 |
@@ -154,13 +154,6 @@ show_elf() { |
35 |
else |
36 |
printf " (interpreter => ${interp:-none})" |
37 |
fi |
38 |
- if [[ -r ${interp} ]] ; then |
39 |
- # Extract the default lib paths out of the ldso. |
40 |
- lib_paths_ldso=$( |
41 |
- strings "${interp}" | \ |
42 |
- sed -nr -e "/^\/.*lib/{s|^/?|${ROOT}|;s|/$||;s|/?:/?|\n${ROOT}|g;p}" |
43 |
- ) |
44 |
- fi |
45 |
full_interp=${interp} |
46 |
interp=${interp##*/} |
47 |
# If we are in non-list mode, then we want to show the "duplicate" interp |
48 |
@@ -235,7 +228,6 @@ ${SET_X} && set -x |
49 |
|
50 |
ret=0 |
51 |
for elf ; do |
52 |
- unset lib_paths_ldso |
53 |
unset c_last_needed_by |
54 |
if ${AUTO_ROOT} && [[ ${elf} == /* ]] ; then |
55 |
elf="${ROOT}${elf#/}" |