termux-packages/scripts/bin/check-pie.sh

13 lines
280 B
Bash
Raw Normal View History

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