diff options
author | Eelco Dolstra <e.dolstra@tudelft.nl> | 2007-01-31 15:08:42 (GMT) |
---|---|---|
committer | Eelco Dolstra <e.dolstra@tudelft.nl> | 2007-01-31 15:08:42 (GMT) |
commit | 94f38d26bce27c813858223f9c3818b7435438e7 (patch) | |
tree | 48d4f83455f6c3b3fa0c193eaaeb8849a4ce1212 /tests/shrink-rpath.sh | |
parent | 56cae84500ca807079376d9fa6c5483f240c5b33 (diff) | |
download | patchelf-94f38d26bce27c813858223f9c3818b7435438e7.zip patchelf-94f38d26bce27c813858223f9c3818b7435438e7.tar.gz patchelf-94f38d26bce27c813858223f9c3818b7435438e7.tar.bz2 |
* .rel.plt is called .rela.plt on x86_64-linux.
Diffstat (limited to 'tests/shrink-rpath.sh')
-rwxr-xr-x | tests/shrink-rpath.sh | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/tests/shrink-rpath.sh b/tests/shrink-rpath.sh new file mode 100755 index 0000000..e0c82c1 --- /dev/null +++ b/tests/shrink-rpath.sh @@ -0,0 +1,30 @@ +#! /bin/sh -e + +rpath=$(../src/patchelf --print-rpath ./libbar.so) +echo "RPATH before: $rpath" +if ! echo "$rpath" | grep -q /no-such-path; then + echo "incomplete RPATH" + exit 1 +fi + +rm -rf scratch +mkdir -p scratch +cp libbar.so scratch/ +../src/patchelf --shrink-rpath scratch/libbar.so + +rpath=$(../src/patchelf --print-rpath scratch/libbar.so) +echo "RPATH after: $rpath" +if echo "$rpath" | grep -q /no-such-path; then + echo "RPATH not shrunk" + exit 1 +fi + +cp libfoo.so scratch/ + +exitCode=0 +cd scratch && LD_LIBRARY_PATH=. ../main || exitCode=$? + +if test "$exitCode" != 46; then + echo "bad exit code!" + exit 1 +fi |