public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Yaakov Selkowitz <yselkowi@redhat.com>
To: git-commits@fedoraproject.org
Subject: [rpms/patchelf] f44: Fix rename-dynamic-symbols.sh test on some arches
Date: Tue, 17 Nov 2026 18:37:40 GMT	[thread overview]
Message-ID: <179494066023.1.13536280694343696914.rpms-patchelf-8ca9256a310c@fedoraproject.org> (raw)

            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

                 reply	other threads:[~2026-11-17 18:37 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=179494066023.1.13536280694343696914.rpms-patchelf-8ca9256a310c@fedoraproject.org \
    --to=yselkowi@redhat.com \
    --cc=git-commits@fedoraproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox