[pacman-dev] [PATCH] makepkg: fix stripping of relocatable binaries with binutils>=2.37
Allan McRae
allan at archlinux.org
Wed Aug 4 09:17:38 UTC 2021
Binutils commit 93df3340fd5ad32f784214fc125de71811da72ff enabled readelf
to report "Position-Independent Executable" files. Fix stripping to
account for this change.
Signed-off-by: Allan McRae <allan at archlinux.org>
---
scripts/libmakepkg/tidy/strip.sh.in | 2 ++
1 file changed, 2 insertions(+)
diff --git a/scripts/libmakepkg/tidy/strip.sh.in b/scripts/libmakepkg/tidy/strip.sh.in
index 5d03b28f..96602538 100644
--- a/scripts/libmakepkg/tidy/strip.sh.in
+++ b/scripts/libmakepkg/tidy/strip.sh.in
@@ -135,6 +135,8 @@ tidy_strip() {
case "$(LC_ALL=C readelf -h "$binary" 2>/dev/null)" in
*Type:*'DYN (Shared object file)'*) # Libraries (.so) or Relocatable binaries
strip_flags="$STRIP_SHARED";;
+ *Type:*'DYN (Position-Independent Executable file)'*) # Relocatable binaries
+ strip_flags="$STRIP_SHARED";;
*Type:*'EXEC (Executable file)'*) # Binaries
strip_flags="$STRIP_BINARIES";;
*Type:*'REL (Relocatable file)'*) # Libraries (.a) or objects
--
2.32.0
More information about the pacman-dev
mailing list