diff options
Diffstat (limited to 'tests/phdr-corruption.sh')
-rwxr-xr-x | tests/phdr-corruption.sh | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/phdr-corruption.sh b/tests/phdr-corruption.sh index 0a36882..1e62101 100755 --- a/tests/phdr-corruption.sh +++ b/tests/phdr-corruption.sh @@ -4,6 +4,7 @@ PATCHELF="../src/patchelf" SONAME="phdr-corruption.so" SCRATCH="scratch/$(basename $0 .sh)" SCRATCH_SO="${SCRATCH}/${SONAME}" +READELF=${READELF:-readelf} rm -rf "${SCRATCH}" mkdir -p "${SCRATCH}" @@ -12,7 +13,7 @@ cp "${SONAME}" "${SCRATCH}" "${PATCHELF}" --set-rpath "$(pwd)" "${SCRATCH_SO}" # Check for PT_PHDR entry VirtAddr corruption -readelfData=$(readelf -l "${SCRATCH_SO}" 2>&1) +readelfData=$(${READELF} -l "${SCRATCH_SO}" 2>&1) if [ $(echo "$readelfData" | grep --count "PHDR") != 1 ]; then # Triggered if PHDR errors appear on stderr |