public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/patchelf] f44: Fix rename-dynamic-symbols.sh test on some arches
@ 2026-11-17 18:37 Yaakov Selkowitz
0 siblings, 0 replies; only message in thread
From: Yaakov Selkowitz @ 2026-11-17 18:37 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : rpms/patchelf
Branch : f44
Commit : 8ca9256a310c078a0b16df44c6cb439097cf4a26
Author : Yaakov Selkowitz <yselkowi@redhat.com>
Date : 2026-11-16T16:04:04-05:00
Stats : +46/-0 in 2 file(s)
URL : https://src.fedoraproject.org/rpms/patchelf/c/8ca9256a310c078a0b16df44c6cb439097cf4a26?branch=f44
Log:
Fix rename-dynamic-symbols.sh test on some arches
https://github.com/NixOS/patchelf/issues/503
https://github.com/NixOS/patchelf/pull/547
---
diff --git a/0001-Fix-rename-dynamic-symbols.sh-test.patch b/0001-Fix-rename-dynamic-symbols.sh-test.patch
new file mode 100644
index 0000000..b6c8d60
--- /dev/null
+++ b/0001-Fix-rename-dynamic-symbols.sh-test.patch
@@ -0,0 +1,42 @@
+From b6cf11a31bc98dd146857b073d065bd751ba29df Mon Sep 17 00:00:00 2001
+From: Martin Jambor <mjambor@suse.cz>
+Date: Fri, 8 Mar 2024 23:25:44 +0100
+Subject: [PATCH] Fix rename-dynamic-symbols.sh test (issue #503)
+
+when building and then checking patchelf on openSUSE Leap 15.5, the
+rename-dynamic-symbols.sh test fails. The test builds a test library
+and executable called many-syms-main, then runs patchelf to rename
+symbols and then checks that many-syms-main still runs successfully.
+
+On Leap the run fails with many messages like
+
+ ./many-syms-main: Symbol `f1947' causes overflow in R_X86_64_PC32 relocation
+
+and then terminates with a Segmentation fault. The interesting bit is
+that it however fails so even before patchelf touches it.
+
+The binary is built and linked with option -pie which produces an
+executable which is supposedly position independent but does not
+actually contain code position independent code which requires
+compiler option -fPIE (of -fpie or -fPIC or -fpic). As a result the
+calls in the generated assembly do not go through the PLT.
+
+This patch merely adresses that by adding the -fPIE option to the
+CFLAGS for the test.
+---
+ tests/Makefile.am | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/tests/Makefile.am b/tests/Makefile.am
+index 8bbded7a..49454d43 100644
+--- a/tests/Makefile.am
++++ b/tests/Makefile.am
+@@ -164,7 +164,7 @@ many_syms_main_SOURCES = many-syms-main.c
+ many_syms_main_LDFLAGS = $(LDFLAGS_local)
+ many_syms_main_LDADD = -lmany-syms $(AM_LDADD)
+ many_syms_main_DEPENDENCIES = libmany-syms.so
+-many_syms_main_CFLAGS = -pie
++many_syms_main_CFLAGS = -pie -fPIE
+ libmany_syms_so_SOURCES = many-syms.c
+ libmany_syms_so_LDFLAGS = $(LDFLAGS_sharedlib)
+
diff --git a/patchelf.spec b/patchelf.spec
index ad272f9..a6cce65 100644
--- a/patchelf.spec
+++ b/patchelf.spec
@@ -15,6 +15,9 @@ Source0: https://github.com/NixOS/%{name}/archive/%{version}/%{name}-%{ve
# This is needed after a change in binutils, see https://bugzilla.redhat.com/2321588
# Rebased form https://github.com/NixOS/patchelf/commit/43b75fbc9f
Patch: 0001-Allocate-PHT-SHT-at-the-end-of-the-.elf-file.patch
+# Fix rename-dynamic-symbols.sh test on some arches
+# https://github.com/NixOS/patchelf/pull/547
+Patch: 0001-Fix-rename-dynamic-symbols.sh-test.patch
BuildRequires: gcc
BuildRequires: gcc-c++
@@ -42,6 +45,7 @@ of using "patchelf" as a build dependency in a pyproject.toml file.
%prep
%autosetup -p1
+autoreconf -fiv
# package ships elf.h - delete to use glibc-headers one
rm src/elf.h
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-11-17 18:37 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-17 18:37 [rpms/patchelf] f44: Fix rename-dynamic-symbols.sh test on some arches Yaakov Selkowitz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox