[dpkg] 176/200: Dpkg::Shlibs::Objdump: Do not special case EM_SPARC32PLUS for NetBSD

Ximin Luo infinity0 at debian.org
Wed Apr 5 15:17:37 UTC 2017


This is an automated email from the git hooks/post-receive script.

infinity0 pushed a commit to branch master
in repository dpkg.

commit 27bb073c1f40014c4eafbe43f150a76a02a6c542
Author: Guillem Jover <guillem at debian.org>
Date:   Wed Feb 8 05:04:34 2017 +0100

    Dpkg::Shlibs::Objdump: Do not special case EM_SPARC32PLUS for NetBSD
    
    The affected code in NetBSD was bogus, and has been removed now. So
    there is no point in trying to special case the EM_SPARC32PLUS ELF
    machine ID depending on the ELF class, for something that should never
    happen.
    
    Ref: https//gnats.netbsd.org/51925
---
 debian/changelog               |  3 +++
 scripts/Dpkg/Shlibs/Objdump.pm | 11 +----------
 2 files changed, 4 insertions(+), 10 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 406bf71..9c4be3f 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -3,6 +3,9 @@ dpkg (1.18.23) UNRELEASED; urgency=medium
   * Handle unmatched arch-qualified virtual packages in dpkg-genbuildinfo,
     instead of letting perl die. Closes: #849944
   * Declare .buildinfo format as stable with version 1.0.
+  * Perl modules:
+    - Do not special case EM_SPARC32PLUS for NetBSD in Dpkg::Shlibs::Objdump,
+      the code has been fixed in NetBSD as that situation could not happen.
   * Documentation:
     - Clarify the requirements for deb-conffile(5) pathnames. Closes: #854417
       Proposed by Dieter Adriaenssens <dieter.adriaenssens at gmail.com>.
diff --git a/scripts/Dpkg/Shlibs/Objdump.pm b/scripts/Dpkg/Shlibs/Objdump.pm
index 06ca53c..b5b0dc2 100644
--- a/scripts/Dpkg/Shlibs/Objdump.pm
+++ b/scripts/Dpkg/Shlibs/Objdump.pm
@@ -156,6 +156,7 @@ my %elf_mach_map = (
     ELF_MACH_MN10300_CYGNUS()   => ELF_MACH_MN10300,
     ELF_MACH_OR1K_OLD()         => ELF_MACH_OR1K,
     ELF_MACH_S390_OLD()         => ELF_MACH_S390,
+    ELF_MACH_SPARC32PLUS()      => ELF_MACH_SPARC,
     ELF_MACH_SPARC64_OLD()      => ELF_MACH_SPARC64,
     ELF_MACH_XTENSA_OLD()       => ELF_MACH_XTENSA,
 );
@@ -210,16 +211,6 @@ sub get_format {
     my $tmpl = "x16(S2Lx[${elf_word}3]L)${elf_endian}";
     @elf{qw(type mach version flags)} = unpack $tmpl, $header;
 
-    # XXX: We need to special case ELF_MACH_SPARC32PLUS, because NetBSD
-    # treats it differently depending on the ELF bits.
-    if ($elf{mach} == ELF_MACH_SPARC32PLUS) {
-        if ($elf{bits} == ELF_BITS_32) {
-            $elf{mach} = ELF_MACH_SPARC;
-        } else {
-            $elf{mach} = ELF_MACH_SPARC64;
-        }
-    }
-
     # Canonicalize the machine ID.
     $elf{mach} = $elf_mach_map{$elf{mach}} // $elf{mach};
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/dpkg.git



More information about the Reproducible-commits mailing list