Skip to content

Commit

Permalink
Merge pull request #81 from fsateler/force-pagesize
Browse files Browse the repository at this point in the history
no-rpath-prebuild: force pagesize to 4096 on prebuilt binaries
  • Loading branch information
edolstra committed Apr 28, 2016
2 parents 927b332 + bb04c06 commit e56e524
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions tests/no-rpath-prebuild.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#! /bin/sh -e
set -x
ARCH="$1"
PAGESIZE=4096

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

cp $no_rpath_bin ${SCRATCH}/no-rpath

oldRPath=$(../src/patchelf --print-rpath ${SCRATCH}/no-rpath)
oldRPath=$(../src/patchelf --page-size ${PAGESIZE} --print-rpath ${SCRATCH}/no-rpath)
if test -n "$oldRPath"; then exit 1; fi
../src/patchelf \
--set-interpreter "$(../src/patchelf --print-interpreter ../src/patchelf)" \
../src/patchelf --page-size ${PAGESIZE} \
--set-interpreter "$(../src/patchelf --page-size ${PAGESIZE} --print-interpreter ../src/patchelf)" \
--set-rpath /foo:/bar:/xxxxxxxxxxxxxxx ${SCRATCH}/no-rpath

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

0 comments on commit e56e524

Please sign in to comment.