Skip to content

Commit e1d6231

Browse files
committed
check-for-missing-dlls: work around i686-specific objdump problem
Apparently the i686 version of objdump does not recognize the `.exe` files generated by `cv2pdb` as valid executables. But `ldd` does. So let's specifically fall back to using `ldd` for those (but do not use `ldd` by default because it hangs on other `.exe` files...). Signed-off-by: Johannes Schindelin <[email protected]>
1 parent eb1b236 commit e1d6231

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

check-for-missing-dlls.sh

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@ else
3131
fi
3232

3333
used_dlls_file=/tmp/used-dlls.$$.txt
34-
trap "rm \"$used_dlls_file\"" EXIT
34+
tmp_file=/tmp/tmp.$$.txt
35+
trap "rm \"$used_dlls_file\" \"$tmp_file\"" EXIT
3536

3637
all_files="$(export ARCH BITNESS && "$thisdir"/make-file-list.sh | tr A-Z a-z)" &&
3738
usr_bin_dlls="$(echo "$all_files" | grep '^usr/bin/[^/]*\.dll$')" &&
@@ -49,7 +50,11 @@ do
4950

5051
paths=$(echo "$all_files" |
5152
sed -ne 's,[][],\\&,g' -e "s,^$dir[^/]*\.\(dll\|exe\)$,/&,p")
52-
out="$(/usr/bin/objdump -p $paths)"
53+
out="$(/usr/bin/objdump -p $paths 2>"$tmp_file")"
54+
paths="$(sed -n 's|^/usr/bin/objdump: \([^ :]*\): file format not recognized|\1|p' <"$tmp_file")"
55+
test -z "$paths" ||
56+
out="$out$LF$(ldd $paths)"
57+
5358
echo "$out" |
5459
tr A-Z\\r a-z\ |
5560
grep -e '^.dll name:' -e '^[^ ]*\.\(dll\|exe\):' -e '\.dll =>' |

0 commit comments

Comments
 (0)