diff options
Diffstat (limited to 'tests/set-rpath-library.sh')
-rwxr-xr-x | tests/set-rpath-library.sh | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/set-rpath-library.sh b/tests/set-rpath-library.sh index 55661a1..6ae1715 100755 --- a/tests/set-rpath-library.sh +++ b/tests/set-rpath-library.sh @@ -14,6 +14,7 @@ mkdir -p "${SCRATCH}/libsB" cp main-scoped "${SCRATCH}/" cp libfoo-scoped.so "${SCRATCH}/libsA/" cp libbar-scoped.so "${SCRATCH}/libsB/" +cp liboveralign.so "${SCRATCH}/" oldRPath=$(../src/patchelf --print-rpath "${SCRATCH}"/main-scoped) if test -z "$oldRPath"; then oldRPath="/oops"; fi @@ -56,3 +57,12 @@ if test "$exitCode" != 46; then echo "bad exit code!" exit 1 fi + +# ALL loads should have the same alignment +lib="${SCRATCH}/liboveralign.so" +../src/patchelf --set-rpath "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" "$lib" +num_alignments=$(${READELF} -W -l "${lib}" | awk '/LOAD/ { print $NF }' | sort -u | wc -l) +echo "$num_alignments" +if test "${num_alignments}" -ne "1"; then + exit 1 +fi |