From ff5cecf821082ca7fbf14a795c568bace0cb8e5d Mon Sep 17 00:00:00 2001 From: aszlig Date: Fri, 8 Jun 2018 00:21:33 +0200 Subject: [PATCH] autoPatchelfHook: Patch PIC exes/libs as well If there is a shared object or executable that's using position-independent code, the file's mime type is "application/x-pie-executable", so until this change its dependencies wouldn't be patched. This simply adds the mime type to the search loop. Signed-off-by: aszlig --- pkgs/build-support/setup-hooks/auto-patchelf.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/build-support/setup-hooks/auto-patchelf.sh b/pkgs/build-support/setup-hooks/auto-patchelf.sh index 0f9d7603d48..f40cdcf4cad 100644 --- a/pkgs/build-support/setup-hooks/auto-patchelf.sh +++ b/pkgs/build-support/setup-hooks/auto-patchelf.sh @@ -15,6 +15,7 @@ findElfs() { while [ -n "$1" ]; do mimeType="$(file -b -N --mime-type "$1")" if [ "$mimeType" = application/x-executable \ + -o "$mimeType" = application/x-pie-executable \ -o "$mimeType" = application/x-sharedlib ]; then echo "$1" fi