Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/bin/check-opcodes
diff options
context:
space:
mode:
Diffstat (limited to 'bin/check-opcodes')
-rwxr-xr-xbin/check-opcodes10
1 files changed, 4 insertions, 6 deletions
diff --git a/bin/check-opcodes b/bin/check-opcodes
index 2949819..48a1d45 100755
--- a/bin/check-opcodes
+++ b/bin/check-opcodes
@@ -93,7 +93,6 @@ PACKAGE=$1
if test "$PACKAGE" = ""; then
echo "ERROR: Filename of a package required as argument" >&2
usage
- exit 1
fi
OPCODE_ARGS=""
@@ -111,7 +110,6 @@ case $ARCH in
*)
echo "ERROR: architecture must currently be one of i486, i686 and pentium3" >&2
usage
- exit 1
esac
debug "Unpacking $PACKAGE to $tmp_dir.."
@@ -133,7 +131,7 @@ for absfile in $(find $tmp_dir \( -regextype grep -regex '.*\.so\(\.[0-9.]\+\)\?
continue
fi
file $absfile > $tmp_dir/$file.file
-
+
arch=$(grep ^architecture $tmp_dir/$file.objdump | sed 's/^architecture: //g' | cut -f 1 -d ,)
case $arch in
i386:x86-64)
@@ -147,7 +145,7 @@ for absfile in $(find $tmp_dir \( -regextype grep -regex '.*\.so\(\.[0-9.]\+\)\?
;;
esac
debug " Objdump architecture: $arch"
-
+
archelf=$(grep '^ \+Class' $tmp_dir/$file.elf | cut -f 2 -d : | tr -d ' ')
case $archelf in
ELF64)
@@ -165,7 +163,7 @@ for absfile in $(find $tmp_dir \( -regextype grep -regex '.*\.so\(\.[0-9.]\+\)\?
if test $arch != $archelf; then
err "ERROR: $file ambigous architecture information (objdump: $arch, ELF: $archelf)"
fi
-
+
if test $arch = "x86_64"; then
err "ERROR: $file is a 64-bit library!"
continue
@@ -193,7 +191,7 @@ for absfile in $(find $tmp_dir \( -regextype grep -regex '.*\.so\(\.[0-9.]\+\)\?
verbose "OK: $relfile fullfills architecture constraint for $ARCH"
fi
fi
-
+
done
exit $EXIT_CODE