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:
authorErich Eckner <erich.eckner.ext@bestsecret.com>2023-05-22 16:22:29 +0200
committerErich Eckner <erich.eckner.ext@bestsecret.com>2023-05-22 16:22:29 +0200
commit62f871fb25b70860364b0023745c0f31516e69d0 (patch)
tree8efdaff49293547ee945ff0d10612187a3b06594 /bin/check-opcodes
parentd14686b0bdc0b2418300c5d34d5f13c19988f020 (diff)
make shellcheck happy
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