summaryrefslogtreecommitdiff
path: root/scripts/dpkg-shlibdeps.pl
diff options
context:
space:
mode:
authorGuillem Jover <guillem@debian.org>2017-01-25 04:39:08 +0100
committerGuillem Jover <guillem@debian.org>2017-01-26 23:26:33 +0100
commit8ae966ae7d3635b8359829085db4262923ceae96 (patch)
tree03b0957fe0df4199929bdb6302007553f19f5c93 /scripts/dpkg-shlibdeps.pl
parent8c6b68c0b0c7d323dbd440f880f2661a2ea58c3b (diff)
downloaddpkg-8ae966ae7d3635b8359829085db4262923ceae96.tar.gz
dpkg-shlibdeps: Improve ELF ABI mismatch detector
The previous ELF ABI mismatch detector was very naïve, as the string returned by «objdump -a» is a very simplistic representation of the ELF ABI used. Switch to our own ELF header parser, so that we can distinguish based on the fields that define the object ABI. This is still not enough, and we will have collisions with things such as linux-i386 and hurd-i386, but most of the previously colliding objects are now filtered. This also makes us independent of objdump not supporting any unknown ELF object ABI. Closes: #849913
Diffstat (limited to 'scripts/dpkg-shlibdeps.pl')
-rwxr-xr-xscripts/dpkg-shlibdeps.pl11
1 files changed, 6 insertions, 5 deletions
diff --git a/scripts/dpkg-shlibdeps.pl b/scripts/dpkg-shlibdeps.pl
index 892aeff63..8e8cb99d7 100755
--- a/scripts/dpkg-shlibdeps.pl
+++ b/scripts/dpkg-shlibdeps.pl
@@ -194,17 +194,18 @@ foreach my $file (keys %exec) {
my %soname_notfound;
my %alt_soname;
foreach my $soname (@sonames) {
- my @libs = my_find_library($soname, $obj->{RPATH}, $obj->{format}, $file);
+ my @libs = my_find_library($soname, $obj->{RPATH}, $obj->{exec_abi}, $file);
unless (scalar @libs) {
$soname_notfound{$soname} = 1;
$global_soname_notfound{$soname} = 1;
- my $msg = g_("couldn't find library %s needed by %s (ELF " .
- "format: '%s'; RPATH: '%s')");
+ my $msg = g_('cannot find library %s needed by %s (ELF ' .
+ "format: '%s' abi: '%s'; RPATH: '%s')");
+ my $exec_abi = unpack 'H*', $obj->{exec_abi};
if (scalar(split_soname($soname))) {
- errormsg($msg, $soname, $file, $obj->{format}, join(':', @{$obj->{RPATH}}));
+ errormsg($msg, $soname, $file, $obj->{format}, $exec_abi, join(':', @{$obj->{RPATH}}));
$error_count++;
} else {
- warning($msg, $soname, $file, $obj->{format}, join(':', @{$obj->{RPATH}}));
+ warning($msg, $soname, $file, $obj->{format}, $exec_abi, join(':', @{$obj->{RPATH}}));
}
next;
}