public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/rpm] pmatilai-v6: Minisymtab should only be added for executables or shared libraries.
@ 2026-11-23  9:30 Mark Wielaard
  0 siblings, 0 replies; only message in thread
From: Mark Wielaard @ 2026-11-23  9:30 UTC (permalink / raw)
  To: git-commits

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)
 

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-11-23  9:30 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-23  9:30 [rpms/rpm] pmatilai-v6: Minisymtab should only be added for executables or shared libraries Mark Wielaard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox