diff -Nru dpkg-1.16.1.2ubuntu1/debian/changelog dpkg-1.16.1.2ubuntu2/debian/changelog --- dpkg-1.16.1.2ubuntu1/debian/changelog 2011-11-27 11:49:10.000000000 +0200 +++ dpkg-1.16.1.2ubuntu2/debian/changelog 2011-12-02 21:25:40.000000000 +0200 @@ -1,3 +1,10 @@ +dpkg (1.16.1.2ubuntu2) precise; urgency=low + + * Apply patch from Steve McIntyre to special-case armhf/armel ELF + objects in Shlibs/Objdump.pm, so we don't get incorrect deps. + + -- Adam Conrad Fri, 02 Dec 2011 12:24:40 -0700 + dpkg (1.16.1.2ubuntu1) precise; urgency=low * Resynchronise with Debian. Remaining changes: diff -Nru dpkg-1.16.1.2ubuntu1/scripts/Dpkg/Shlibs/Objdump.pm dpkg-1.16.1.2ubuntu2/scripts/Dpkg/Shlibs/Objdump.pm --- dpkg-1.16.1.2ubuntu1/scripts/Dpkg/Shlibs/Objdump.pm 2010-08-16 13:29:12.000000000 +0200 +++ dpkg-1.16.1.2ubuntu2/scripts/Dpkg/Shlibs/Objdump.pm 2011-12-02 21:24:28.000000000 +0200 @@ -82,6 +82,28 @@ return exists $self->{objects}{$objid}; } +sub is_armhf { + my ($file) = @_; + my ($output, %opts, $pid, $res); + my $hf = 0; + $pid = spawn(exec => [ "readelf", "-A", "--", $file ], + env => { "LC_ALL" => "C" }, + to_pipe => \$output, %opts); + while (<$output>) { + chomp; + if (/Tag_ABI_VFP_args: VFP registers/) { + $hf = 1; + last; + } + } + close($output); + wait_child($pid, nocheck => 1); + if ($?) { + subprocerr("readelf"); + } + return $hf; +} + { my %format; # Cache of result sub get_format { @@ -112,6 +134,14 @@ local $OBJDUMP = "objdump"; $res = get_format($file); } + if ($res eq "elf32-littlearm") { + if (is_armhf($file)) { + $res = "elf32-littlearm-hfabi"; + } else { + $res = "elf32-littlearm-sfabi"; + } + $format{$file} = $res; + } return $res; } } @@ -243,6 +273,13 @@ } elsif ($section eq "none") { if (/^\s*.+:\s*file\s+format\s+(\S+)\s*$/) { $self->{format} = $1; + if ($self->{format} eq "elf32-littlearm") { + if (Dpkg::Shlibs::Objdump::is_armhf($self->{file})) { + $self->{format} = "elf32-littlearm-hfabi"; + } else { + $self->{format} = "elf32-littlearm-sfabi"; + } + } } elsif (/^architecture:\s*\S+,\s*flags\s*\S+:\s*$/) { # Parse 2 lines of "-f" # architecture: i386, flags 0x00000112: