diff options
author | Jörg Thalheim <Mic92@users.noreply.github.com> | 2021-08-10 11:57:19 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-08-10 11:57:19 +0100 |
commit | 2f88e6f312cad95e3dbb9c4f11119b173adb11b0 (patch) | |
tree | 163c387f337921f60784448d7d005d9b47bd00b2 /tests | |
parent | 943f8242b31a166df233ff7e2234e812f7e5c59e (diff) | |
parent | 57fe1d383512ea3961e821ee40a6e11402dc9096 (diff) | |
download | patchelf-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.am | 3 | ||||
-rwxr-xr-x | tests/no-gnu-hash.sh | 13 |
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 |