summaryrefslogtreecommitdiff
path: root/tests/shrink.sh
blob: fe50346618467ce119049ea4037a69f40f2dcf57 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#! /bin/sh -e

echo -n "RPATH before: "
readelf -a ./libfoo.so | grep RPATH
if ! readelf -a ./libfoo.so | grep RPATH | grep -q /no-such-path; then
    echo "incomplete RPATH"
    exit 1
fi

rm -rf scratch
mkdir -p scratch
cp libfoo.so scratch/
../src/patchelf --shrink-rpath scratch/libfoo.so

echo -n "RPATH after: "
readelf -a scratch/libfoo.so | grep RPATH
if readelf -a scratch/libfoo.so | grep RPATH | grep -q /no-such-path; then
    echo "incomplete RPATH"
    exit 1
fi