diff options
author | Breno Rodrigues GuimarĂ£es <brenorg@gmail.com> | 2023-02-23 22:07:41 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-23 22:07:41 -0300 |
commit | 70a477a252420c3f6a2e8e8d4c63d557df4b7f46 (patch) | |
tree | a68dce23c94fe6250b8f3dc3c7ab8ada895e4d84 /tests/replace-add-needed.sh | |
parent | afca68f86aa021c5cb991bb810db71eb6af89155 (diff) | |
parent | 69a7ae54d27513d7553b4d8bd77ade017e674e22 (diff) | |
download | patchelf-70a477a252420c3f6a2e8e8d4c63d557df4b7f46.tar.gz |
Merge branch 'NixOS:master' into breno.457
Diffstat (limited to 'tests/replace-add-needed.sh')
-rwxr-xr-x | tests/replace-add-needed.sh | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/tests/replace-add-needed.sh b/tests/replace-add-needed.sh index e2cb255..701cb95 100755 --- a/tests/replace-add-needed.sh +++ b/tests/replace-add-needed.sh @@ -1,15 +1,15 @@ #! /bin/sh -e -SCRATCH=scratch/$(basename $0 .sh) +SCRATCH=scratch/$(basename "$0" .sh) PATCHELF=$(readlink -f "../src/patchelf") -rm -rf ${SCRATCH} -mkdir -p ${SCRATCH} +rm -rf "${SCRATCH}" +mkdir -p "${SCRATCH}" -cp simple ${SCRATCH}/ -cp libfoo.so ${SCRATCH}/ -cp libbar.so ${SCRATCH}/ +cp simple "${SCRATCH}"/ +cp libfoo.so "${SCRATCH}"/ +cp libbar.so "${SCRATCH}"/ -cd ${SCRATCH} +cd "${SCRATCH}" libcldd=$(ldd ./simple | awk '/ => / { print $3 }' | grep -E "(libc(-[0-9.]*)*.so|ld-musl)") @@ -22,11 +22,11 @@ ${PATCHELF} --add-needed libbar.so ./simple # Make the NEEDED in libfoo the same as simple # This is a current "bug" in musl # https://www.openwall.com/lists/musl/2021/12/21/1 -${PATCHELF} --replace-needed libbar.so $(readlink -f ./libbar.so) ./libfoo.so +${PATCHELF} --replace-needed libbar.so "$(readlink -f ./libbar.so)" ./libfoo.so -${PATCHELF} --replace-needed libc.so.6 ${libcldd} \ - --replace-needed libbar.so $(readlink -f ./libbar.so) \ - --add-needed $(readlink -f ./libfoo.so) \ +${PATCHELF} --replace-needed libc.so.6 "${libcldd}" \ + --replace-needed libbar.so "$(readlink -f ./libbar.so)" \ + --add-needed "$(readlink -f ./libfoo.so)" \ ./simple exitCode=0 @@ -35,4 +35,4 @@ exitCode=0 if test "$exitCode" != 0; then ldd ./simple exit 1 -fi
\ No newline at end of file +fi |