diff --git a/checkapk.in b/checkapk.in
index 1a73d4a8392d2ee26eeacd7408e6ca9172c09cba..f44d9c2e9d44f73e8eabd5150c68733be81ca3b0 100644
--- a/checkapk.in
+++ b/checkapk.in
@@ -121,8 +121,9 @@ for i in $pkgname $subpackages; do
 			+*) path="$_pkgname-pkg-new"; sofile="${diff_sofile#\+}" ;;
 			esac
 
-			# skip symlinks
-			if ! [ -L "$path"/"$sofile" ]; then
+			# skip symlinks (only adds duplicate output or is dangling), and things that aren't valid elfs
+			# matching .so above matches anything with .so in the name, e.g. xyz.sourceforge
+			if ! [ -L "$path"/"$sofile" ] && readelf -h "$path"/"$sofile" >/dev/null 2>&1; then
 				echo "$diff_sofile: " "$(objdump -p "$path"/"$sofile" | grep SONAME)"
 			fi
 		done