Skip to content

Commit 8aa3321

Browse files
heireckaEricson2314
authored andcommitted
Respect a possibly prefixed readelf
...i case of cross-compiling. Already done for other tests with 07bbf47. (cherry picked from commit d0c418f)
1 parent 6d53678 commit 8aa3321

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

tests/repeated-updates.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
SCRATCH=scratch/$(basename "$0" .sh)
44
PATCHELF=$(readlink -f "../src/patchelf")
5+
READELF=${READELF:-readelf}
56

67
rm -rf "${SCRATCH}"
78
mkdir -p "${SCRATCH}"
@@ -18,7 +19,7 @@ ${PATCHELF} --add-needed ./libbar.so simple
1819
# Test that repeatedly modifying a string inside a shared library does not
1920
# corrupt it due to the addition of multiple PT_LOAD entries
2021
###############################################################################
21-
load_segments_before=$(readelf -W -l libbar.so | grep -c LOAD)
22+
load_segments_before=$(${READELF} -W -l libbar.so | grep -c LOAD)
2223

2324
for _ in $(seq 1 100)
2425
do
@@ -27,7 +28,7 @@ do
2728
./simple || exit 1
2829
done
2930

30-
load_segments_after=$(readelf -W -l libbar.so | grep -c LOAD)
31+
load_segments_after=$(${READELF} -W -l libbar.so | grep -c LOAD)
3132

3233
###############################################################################
3334
# To be even more strict, check that we don't add too many extra LOAD entries

0 commit comments

Comments
 (0)