public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Mark Wielaard <mjw@fedoraproject.org>
To: git-commits@fedoraproject.org
Subject: [rpms/rpm] pmatilai-v6: Minisymtab should only be added for executables or shared libraries.
Date: Mon, 23 Nov 2026 09:30:52 GMT	[thread overview]
Message-ID: <179542625291.1.15300374629127540665.rpms-rpm-e589ca199258@fedoraproject.org> (raw)

A new commit has been pushed.

Repo   : rpms/rpm
Branch : pmatilai-v6
Commit : e589ca199258b3887bd77cdc47346732ccf535ec
Author : Mark Wielaard <mjw@fedoraproject.org>
Date   : 2017-04-16T18:23:20+02:00
Stats  : +39/-0 in 2 file(s)
URL    : https://src.fedoraproject.org/rpms/rpm/c/e589ca199258b3887bd77cdc47346732ccf535ec?branch=pmatilai-v6

Log:
Minisymtab should only be added for executables or shared libraries.

---
diff --git a/0023-minisymtab-exe-sh.patch b/0023-minisymtab-exe-sh.patch
new file mode 100644
index 0000000..9ad8630
--- /dev/null
+++ b/0023-minisymtab-exe-sh.patch
@@ -0,0 +1,35 @@
+commit 95822abd90b9b3991b15ba82193abb5b9998dc99
+Author: Mark Wielaard <mark@klomp.org>
+Date:   Sat Apr 15 13:34:18 2017 +0200
+
+    find-debuginfo.sh: Only add minisymtab for executables or shared libraries.
+    
+    It only makes sense to add a minisymtab for executables and shared
+    libraries. Other executable ELF files (like kernel modules) don't need it.
+    Since those don't have a dynsym section trying to add it will fail and
+    produce confusing errors from nm.
+    
+    Signed-off-by: Mark Wielaard <mark@klomp.org>
+
+diff --git a/scripts/find-debuginfo.sh b/scripts/find-debuginfo.sh
+index 6f38e19..39bb0b7 100755
+--- a/scripts/find-debuginfo.sh
++++ b/scripts/find-debuginfo.sh
+@@ -358,7 +358,16 @@ do_file()
+   fi
+ 
+   # strip -g implies we have full symtab, don't add mini symtab in that case.
+-  $strip_g || ($include_minidebug && add_minidebug "${debugfn}" "$f")
++  # It only makes sense to add a minisymtab for executables and shared
++  # libraries. Other executable ELF files (like kernel modules) don't need it.
++  if [ "$include_minidebug" = "true" -a "$strip_g" = "false" ]; then
++    skip_mini=true
++    case "$(file -bi "$f")" in
++      application/x-sharedlib*) skip_mini=false ;;
++      application/x-executable*) skip_mini=false ;;
++    esac
++    $skip_mini || add_minidebug "${debugfn}" "$f"
++  fi
+ 
+   echo "./${f#$RPM_BUILD_ROOT}" >> "$ELFBINSFILE"
+ 

diff --git a/rpm.spec b/rpm.spec
index 1301c60..e8b2855 100644
--- a/rpm.spec
+++ b/rpm.spec
@@ -98,6 +98,7 @@ Patch268: 0019-fix-sed-build-id-match-test.patch
 Patch269: 0020-build-files-exec-build-id.patch
 Patch270: 0021-debugedit-Fix-off-by-one-adding-DW_FORM_string-repla.patch
 Patch271: 0022-unbreak-short-circuit.patch
+Patch272: 0023-minisymtab-exe-sh.patch
 
 # OpenSSL backend
 Patch300: 0001-Add-OpenSSL-support-for-digest-and-signatures.patch
@@ -604,6 +605,9 @@ exit 0
 %doc doc/librpm/html/*
 
 %changelog
+* Sat Apr 15 2017 Mark Wielaard <mjw@fedoraproject.org>
+- Minisymtab should only be added for executables or shared libraries.
+
 * Fri Mar 31 2017 Panu Matilainen <pmatilai@redhat.com> - 4.13.0.1-18
 - gpg path must not depend on %%_prefix and such (#1437726)
 

                 reply	other threads:[~2026-11-23  9:30 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=179542625291.1.15300374629127540665.rpms-rpm-e589ca199258@fedoraproject.org \
    --to=mjw@fedoraproject.org \
    --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