check-pie.sh: use $TERMUX_PREFIX

This commit is contained in:
Leonid Pliushch 2020-10-30 21:33:32 +02:00
parent 1c69cda018
commit b6ccb8c361
1 changed files with 4 additions and 1 deletions

View File

@ -1,7 +1,10 @@
#!/bin/sh
# check-pie.sh - script to detect non-PIE binaries (which does not work on Android)
cd /data/data/com.termux/files/usr/bin/
. $(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