termux-packages/scripts/check-pie.sh

13 lines
280 B
Bash
Raw Permalink Normal View History

2015-06-12 23:03:31 +00:00
#!/bin/sh
# check-pie.sh - script to detect non-PIE binaries (which does not work on Android)
2020-10-30 19:33:32 +00:00
. $(dirname "$(realpath "$0")")/properties.sh
cd ${TERMUX_PREFIX}/bin
2015-06-12 23:03:31 +00:00
for file in *; do
if readelf -h $file 2>/dev/null | grep -q 'Type:[[:space:]]*EXEC'; then
echo $file
fi
done