diff --git a/tests/PR243-reproducer.sh b/tests/PR243-reproducer.sh new file mode 100755 index 0000000..5fa4d55 --- /dev/null +++ b/tests/PR243-reproducer.sh @@ -0,0 +1,13 @@ +#!/bin/sh +set -ex +# PR243-reproducer.sh +curl -OLf https://github.com/NixOS/patchelf/files/6501509/ld-linux-x86-64.so.2.tar.gz +curl -OLf https://github.com/NixOS/patchelf/files/6501457/repro.tar.gz +tar fx repro.tar.gz +tar fx ld-linux-x86-64.so.2.tar.gz +chmod +x repro +cp repro repro.orig +../src/patchelf --set-interpreter ./ld-linux-x86-64.so.2 ./repro +patchelf --print-interpreter repro.orig +readelf -a repro > /dev/null +./repro diff --git a/tests/replace-needed.sh b/tests/replace-needed.sh deleted file mode 100755 index 2413798..0000000 --- a/tests/replace-needed.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/sh -set -ex -cat << EOF > hello.c -#include -int main() { - printf("Hello, World!"); - return 0; -} -EOF -gcc hello.c -o hello -no-pie -interpreter=$(../src/patchelf --print-interpreter ./hello) -cp ./hello ./hello.orig -../src/patchelf --set-interpreter $interpreter ./hello -../src/patchelf --replace-needed libc.so.6 $interpreter ./hello -./hello.orig -./hello