summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJörg Thalheim <Mic92@users.noreply.github.com>2021-08-10 11:57:19 +0100
committerGitHub <noreply@github.com>2021-08-10 11:57:19 +0100
commit2f88e6f312cad95e3dbb9c4f11119b173adb11b0 (patch)
tree163c387f337921f60784448d7d005d9b47bd00b2 /tests
parent943f8242b31a166df233ff7e2234e812f7e5c59e (diff)
parent57fe1d383512ea3961e821ee40a6e11402dc9096 (diff)
downloadpatchelf-2f88e6f312cad95e3dbb9c4f11119b173adb11b0.tar.gz
Merge pull request #296 from Mic92/gnu-hash
fix binaries without .gnu.hash section
Diffstat (limited to 'tests')
-rw-r--r--tests/Makefile.am3
-rwxr-xr-xtests/no-gnu-hash.sh13
2 files changed, 15 insertions, 1 deletions
diff --git a/tests/Makefile.am b/tests/Makefile.am
index eb77313..23a7098 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -30,7 +30,8 @@ src_TESTS = \
build-id.sh \
invalid-elf.sh \
endianness.sh \
- contiguous_note_sections.sh
+ contiguous_note_sections.sh \
+ no-gnu-hash.sh
build_TESTS = \
$(no_rpath_arch_TESTS)
diff --git a/tests/no-gnu-hash.sh b/tests/no-gnu-hash.sh
new file mode 100755
index 0000000..a98f459
--- /dev/null
+++ b/tests/no-gnu-hash.sh
@@ -0,0 +1,13 @@
+#! /bin/sh -e
+SCRATCH=scratch/$(basename $0 .sh)
+
+rm -rf ${SCRATCH}
+mkdir -p ${SCRATCH}
+
+cp simple ${SCRATCH}/
+
+strip --remove-section=.gnu.hash ${SCRATCH}/simple
+
+# Check if patchelf handles binaries with GNU_HASH in dynamic section but
+# without .gnu.hash section
+../src/patchelf --set-interpreter /oops ${SCRATCH}/simple