diff options
author | Heiko Becker <heirecka@exherbo.org> | 2023-04-24 21:57:32 +0200 |
---|---|---|
committer | Heiko Becker <heirecka@exherbo.org> | 2023-04-24 22:42:59 +0200 |
commit | d0c418fe3804acb0f6faee42016c81bbcd3f90a9 (patch) | |
tree | 97d08584429e6af157cf0b61ce9351b40286859d | |
parent | 99c24238981b7b1084313aca8f5c493bb46f302c (diff) | |
download | patchelf-d0c418fe3804acb0f6faee42016c81bbcd3f90a9.tar.gz |
Respect a possibly prefixed readelf
...i case of cross-compiling. Already done for other tests with
07bbf47e9cf941976ec082f493ff02bd9fb1a8ab.
-rwxr-xr-x | tests/repeated-updates.sh | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/repeated-updates.sh b/tests/repeated-updates.sh index 669b11d..da7715a 100755 --- a/tests/repeated-updates.sh +++ b/tests/repeated-updates.sh @@ -2,6 +2,7 @@ SCRATCH=scratch/$(basename "$0" .sh) PATCHELF=$(readlink -f "../src/patchelf") +READELF=${READELF:-readelf} rm -rf "${SCRATCH}" mkdir -p "${SCRATCH}" @@ -18,7 +19,7 @@ ${PATCHELF} --add-needed ./libbar.so simple # Test that repeatedly modifying a string inside a shared library does not # corrupt it due to the addition of multiple PT_LOAD entries ############################################################################### -load_segments_before=$(readelf -W -l libbar.so | grep -c LOAD) +load_segments_before=$(${READELF} -W -l libbar.so | grep -c LOAD) for _ in $(seq 1 100) do @@ -27,7 +28,7 @@ do ./simple || exit 1 done -load_segments_after=$(readelf -W -l libbar.so | grep -c LOAD) +load_segments_after=$(${READELF} -W -l libbar.so | grep -c LOAD) ############################################################################### # To be even more strict, check that we don't add too many extra LOAD entries |