commit: 9206a1f79eee279e4171bd2146fc70bff133cb31 Author: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org> AuthorDate: Fri Aug 14 22:13:32 2020 +0000 Commit: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org> CommitDate: Fri Aug 14 22:13:32 2020 +0000 URL: https://gitweb.gentoo.org/proj/pax-utils.git/commit/?id=9206a1f7
lddtree.sh: drop /lib extraction heuristics Avoid using 'strings' to extract libpaths. Let's use hardcoded fallback values unconditionally until we get more robust way to fetch default libpath. Reported-by: Kent Fredric Bug: https://bugs.gentoo.org/736601 Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org> lddtree.sh | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/lddtree.sh b/lddtree.sh index 96163e3..b05ce19 100755 --- a/lddtree.sh +++ b/lddtree.sh @@ -118,7 +118,7 @@ find_elf() { check_paths "${elf}" "${c_ldso_paths[@]}" && return 0 fi - check_paths "${elf}" ${lib_paths_ldso:-${lib_paths_fallback}} && return 0 + check_paths "${elf}" ${lib_paths_fallback} && return 0 fi return 1 } @@ -154,13 +154,6 @@ show_elf() { else printf " (interpreter => ${interp:-none})" fi - if [[ -r ${interp} ]] ; then - # Extract the default lib paths out of the ldso. - lib_paths_ldso=$( - strings "${interp}" | \ - sed -nr -e "/^\/.*lib/{s|^/?|${ROOT}|;s|/$||;s|/?:/?|\n${ROOT}|g;p}" - ) - fi full_interp=${interp} interp=${interp##*/} # If we are in non-list mode, then we want to show the "duplicate" interp @@ -235,7 +228,6 @@ ${SET_X} && set -x ret=0 for elf ; do - unset lib_paths_ldso unset c_last_needed_by if ${AUTO_ROOT} && [[ ${elf} == /* ]] ; then elf="${ROOT}${elf#/}"
