Skip to content

Commit bb04c06

Browse files
committed
no-rpath-prebuild: force pagesize to 4096 on prebuilt binaries
They all have that page size, and the host-detected one might be different.
1 parent 44b7f95 commit bb04c06

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

tests/no-rpath-prebuild.sh

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#! /bin/sh -e
22
set -x
33
ARCH="$1"
4+
PAGESIZE=4096
45

56
if [ -z "$ARCH" ]; then
67
ARCH=$(basename $0 .sh | sed -e 's/.*-//')
@@ -25,13 +26,13 @@ mkdir -p ${SCRATCH}
2526

2627
cp $no_rpath_bin ${SCRATCH}/no-rpath
2728

28-
oldRPath=$(../src/patchelf --print-rpath ${SCRATCH}/no-rpath)
29+
oldRPath=$(../src/patchelf --page-size ${PAGESIZE} --print-rpath ${SCRATCH}/no-rpath)
2930
if test -n "$oldRPath"; then exit 1; fi
30-
../src/patchelf \
31-
--set-interpreter "$(../src/patchelf --print-interpreter ../src/patchelf)" \
31+
../src/patchelf --page-size ${PAGESIZE} \
32+
--set-interpreter "$(../src/patchelf --page-size ${PAGESIZE} --print-interpreter ../src/patchelf)" \
3233
--set-rpath /foo:/bar:/xxxxxxxxxxxxxxx ${SCRATCH}/no-rpath
3334

34-
newRPath=$(../src/patchelf --print-rpath ${SCRATCH}/no-rpath)
35+
newRPath=$(../src/patchelf --page-size ${PAGESIZE} --print-rpath ${SCRATCH}/no-rpath)
3536
if ! echo "$newRPath" | grep -q '/foo:/bar'; then
3637
echo "incomplete RPATH"
3738
exit 1

0 commit comments

Comments
 (0)