File tree Expand file tree Collapse file tree 2 files changed +28
-1
lines changed Expand file tree Collapse file tree 2 files changed +28
-1
lines changed Original file line number Diff line number Diff line change @@ -40,7 +40,8 @@ src_TESTS = \
4040 set-empty-rpath.sh \
4141 phdr-corruption.sh \
4242 replace-needed.sh \
43- replace-add-needed.sh
43+ replace-add-needed.sh \
44+ add-debug-tag.sh
4445
4546build_TESTS = \
4647 $(no_rpath_arch_TESTS )
Original file line number Diff line number Diff line change 1+ #! /bin/sh -e
2+ SCRATCH=scratch/$( basename $0 .sh)
3+
4+ rm -rf ${SCRATCH}
5+ mkdir -p ${SCRATCH}
6+
7+ cp libsimple.so ${SCRATCH} /
8+
9+ # check there is no DT_DEBUG tag
10+ debugTag=$( readelf -d ${SCRATCH} /libsimple.so)
11+ echo " .dynamic before: $debugTag "
12+ if echo " $debugTag " | grep -q DEBUG; then
13+ echo " failed --add-debug-tag test. Expected no line with (DEBUG), got: $debugTag "
14+ exit 1
15+ fi
16+
17+ # set DT_DEBUG
18+ ../src/patchelf --add-debug-tag ${SCRATCH} /libsimple.so
19+
20+ # check there is DT_DEBUG tag
21+ debugTag=$( readelf -d ${SCRATCH} /libsimple.so)
22+ echo " .dynamic before: $debugTag "
23+ if ! echo " $debugTag " | grep -q DEBUG; then
24+ echo " failed --add-debug-tag test. Expected line with (DEBUG), got: $debugTag "
25+ exit 1
26+ fi
You can’t perform that action at this time.
0 commit comments