Skip to content

Commit eb1b236

Browse files
committed
check-for-missing-dlls: simplify objdump -p call
Rather than nesting sub-shell calls and piping the result into the loop handling the lines mentioning `.dll`/`.exe` files, we can do this in three separate calls. This also prepares for the next change, where we fall back to `ldd` for files that `objdump -p` cannot handle. Signed-off-by: Johannes Schindelin <[email protected]>
1 parent b4311c1 commit eb1b236

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

check-for-missing-dlls.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,10 @@ do
4747
*) dlls="$sys_dlls$LF";;
4848
esac
4949

50-
/usr/bin/objdump -p $(echo "$all_files" | sed -ne 's,[][],\\&,g' -e "s,^$dir[^/]*\.\(dll\|exe\)$,/&,p") |
50+
paths=$(echo "$all_files" |
51+
sed -ne 's,[][],\\&,g' -e "s,^$dir[^/]*\.\(dll\|exe\)$,/&,p")
52+
out="$(/usr/bin/objdump -p $paths)"
53+
echo "$out" |
5154
tr A-Z\\r a-z\ |
5255
grep -e '^.dll name:' -e '^[^ ]*\.\(dll\|exe\):' -e '\.dll =>' |
5356
while read a b c d

0 commit comments

Comments
 (0)