From fb830a2a3740d1753755a82cefec9784f60fe881 Mon Sep 17 00:00:00 2001 From: Christian Neukirchen Date: Tue, 17 May 2016 14:58:33 +0200 Subject: [PATCH] hooks/post-install/06-strip-and-debug-pkgs.sh: bail out on non-PIE binaries in PIE builds. Not tested extensively, in doubt needs twerking. --- common/hooks/post-install/06-strip-and-debug-pkgs.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/common/hooks/post-install/06-strip-and-debug-pkgs.sh b/common/hooks/post-install/06-strip-and-debug-pkgs.sh index 7e8ddfc80b5..4f054425253 100644 --- a/common/hooks/post-install/06-strip-and-debug-pkgs.sh +++ b/common/hooks/post-install/06-strip-and-debug-pkgs.sh @@ -99,6 +99,10 @@ hook() { return 1 fi echo " Stripped executable: ${f#$PKGDESTDIR}" + if [ -z "$nopie" ]; then + msg_red "$pkgver: non-PIE executable found in PIE build: ${f#$PKGDESTDIR}\n" + return 1 + fi attach_debug "$f" fi ;;