pkgsrc-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: pkgsrc/devel/patchelf
Module Name: pkgsrc
Committed By: pho
Date: Wed Nov 11 13:38:36 UTC 2026
Modified Files:
pkgsrc/devel/patchelf: Makefile distinfo
Added Files:
pkgsrc/devel/patchelf/patches: patch-src_patchelf.cc
Log Message:
devel/patchelf: Fix a runtime issue on SunOS
Without this change, modifying any executables on this platform fails with:
> patchelf: cannot find section '.gnu.version_r'
Now it seems to be working, but I'm not so sure if this is a correct fix.
To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 pkgsrc/devel/patchelf/Makefile
cvs rdiff -u -r1.19 -r1.20 pkgsrc/devel/patchelf/distinfo
cvs rdiff -u -r0 -r1.1 pkgsrc/devel/patchelf/patches/patch-src_patchelf.cc
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: pkgsrc/devel/patchelf/Makefile
diff -u pkgsrc/devel/patchelf/Makefile:1.22 pkgsrc/devel/patchelf/Makefile:1.23
--- pkgsrc/devel/patchelf/Makefile:1.22 Sun Nov 1 15:05:04 2026
+++ pkgsrc/devel/patchelf/Makefile Wed Nov 11 13:38:36 2026
@@ -1,6 +1,7 @@
-# $NetBSD: Makefile,v 1.22 2026/11/01 15:05:04 adam Exp $
+# $NetBSD: Makefile,v 1.23 2026/11/11 13:38:36 pho Exp $
DISTNAME= patchelf-0.19.3
+PKGREVISION= 1
CATEGORIES= devel
MASTER_SITES= ${MASTER_SITE_GITHUB:=NixOS/}
GITHUB_RELEASE= ${PKGVERSION_NOREV}
Index: pkgsrc/devel/patchelf/distinfo
diff -u pkgsrc/devel/patchelf/distinfo:1.19 pkgsrc/devel/patchelf/distinfo:1.20
--- pkgsrc/devel/patchelf/distinfo:1.19 Sun Nov 1 15:05:04 2026
+++ pkgsrc/devel/patchelf/distinfo Wed Nov 11 13:38:36 2026
@@ -1,5 +1,6 @@
-$NetBSD: distinfo,v 1.19 2026/11/01 15:05:04 adam Exp $
+$NetBSD: distinfo,v 1.20 2026/11/11 13:38:36 pho Exp $
BLAKE2s (patchelf-0.19.3.tar.bz2) = 1b8cf6105a4a0c72963b69569951fd7c700c8f6844455affe6469bca00f2c17a
SHA512 (patchelf-0.19.3.tar.bz2) = 16ff5113b6941a326f570f8dadee40bfd975add8b1475bb00e6eb90bf341029fd61baeaf30a630a19500792ae79fb07b5a9b18d630f6734423f4ebca647e0c21
Size (patchelf-0.19.3.tar.bz2) = 444978 bytes
+SHA1 (patch-src_patchelf.cc) = e8a95bbfc570217e4342f87d21d38ba539befdfb
Added files:
Index: pkgsrc/devel/patchelf/patches/patch-src_patchelf.cc
diff -u /dev/null pkgsrc/devel/patchelf/patches/patch-src_patchelf.cc:1.1
--- /dev/null Wed Nov 11 13:38:36 2026
+++ pkgsrc/devel/patchelf/patches/patch-src_patchelf.cc Wed Nov 11 13:38:36 2026
@@ -0,0 +1,25 @@
+$NetBSD: patch-src_patchelf.cc,v 1.1 2026/11/11 13:38:36 pho Exp $
+
+Fix for SunOS: There is no section ".gnu.version_r" on this platform. The
+corresponding section is ".SUNW_version".
+
+TODO: Test this more thoroughly and then send a pull request to the
+upstream.
+
+--- src/patchelf.cc.orig 1970-01-01 00:00:01.000000000 +0000
++++ src/patchelf.cc
+@@ -1425,8 +1425,12 @@ void ElfFile<ElfFileParamNames>::rewrite
+ if (!shdr) continue;
+ dyn->d_un.d_ptr = (*shdr).get().sh_addr;
+ }
+- else if (d_tag == DT_VERNEED)
+- dyn->d_un.d_ptr = findSectionHeader(".gnu.version_r").sh_addr;
++ else if (d_tag == DT_VERNEED) {
++ auto shdr = tryFindSectionHeader(".gnu.version_r");
++ if (!shdr) shdr = tryFindSectionHeader(".SUNW_version");
++ if (!shdr) error("cannot find section corresponding to DT_VERNEED");
++ dyn->d_un.d_ptr = (*shdr).get().sh_addr;
++ }
+ else if (d_tag == DT_VERDEF)
+ dyn->d_un.d_ptr = findSectionHeader(".gnu.version_d").sh_addr;
+ else if (d_tag == DT_VERSYM)
Home |
Main Index |
Thread Index |
Old Index