termux-packages/scripts/bin/check-pie.sh
Henrik Grimler 33354fdc39
mv a couple of scripts from scripts/ to scripts/bin/
These ones are not run by, and are not really related to, the build
system, so should be safe to move them to the bin/ subdirectory.
2022-03-13 17:23:23 +01:00

13 lines
280 B
Bash
Executable File

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