2012-07-24 13:37:48 +00:00
|
|
|
#!/usr/bin/perl
|
|
|
|
|
|
|
|
die "syntax: $0 SYMFILE ELFLIB(S)" unless int(@ARGV) >= 2;
|
|
|
|
|
|
|
|
my $symfile = shift @ARGV;
|
|
|
|
my @elflibs = @ARGV;
|
|
|
|
|
2012-09-06 14:45:57 +00:00
|
|
|
my %wantsyms;
|
2012-07-24 13:37:48 +00:00
|
|
|
my %gotsyms;
|
|
|
|
|
2012-09-06 14:45:57 +00:00
|
|
|
my $ret = 0;
|
|
|
|
|
2012-07-24 13:37:48 +00:00
|
|
|
open SYMFILE, $symfile or die "cannot read $symfile: $!";
|
|
|
|
|
|
|
|
while (<SYMFILE>) {
|
|
|
|
next if /{/;
|
|
|
|
next if /}/;
|
|
|
|
next if /global:/;
|
|
|
|
next if /local:/;
|
|
|
|
next if /^\s*$/;
|
|
|
|
next if /^\s*#/;
|
|
|
|
next if /\*/;
|
|
|
|
|
|
|
|
die "malformed line $_" unless /^\s*(\S+);$/;
|
|
|
|
|
2012-09-06 14:45:57 +00:00
|
|
|
if (exists $wantsyms{$1}) {
|
2012-09-06 15:42:35 +00:00
|
|
|
print STDERR "Symbol $1 is listed twice\n";
|
|
|
|
$ret = 1;
|
2012-09-06 14:45:57 +00:00
|
|
|
} else {
|
2012-09-06 15:42:35 +00:00
|
|
|
$wantsyms{$1} = 1;
|
2012-09-06 14:45:57 +00:00
|
|
|
}
|
2012-07-24 13:37:48 +00:00
|
|
|
}
|
|
|
|
close SYMFILE;
|
|
|
|
|
|
|
|
foreach my $elflib (@elflibs) {
|
|
|
|
open NM, "-|", "nm", $elflib or die "cannot run 'nm $elflib': $!";
|
|
|
|
|
|
|
|
while (<NM>) {
|
Convert public datatypes to inherit from virObject
This converts the following public API datatypes to use the
virObject infrastructure:
virConnectPtr
virDomainPtr
virDomainSnapshotPtr
virInterfacePtr
virNetworkPtr
virNodeDevicePtr
virNWFilterPtr
virSecretPtr
virStreamPtr
virStorageVolPtr
virStoragePoolPtr
The code is significantly simplified, since the mutex in the
virConnectPtr object now only needs to be held when accessing
the per-connection virError object instance. All other operations
are completely lock free.
* src/datatypes.c, src/datatypes.h, src/libvirt.c: Convert
public datatypes to use virObject
* src/conf/domain_event.c, src/phyp/phyp_driver.c,
src/qemu/qemu_command.c, src/qemu/qemu_migration.c,
src/qemu/qemu_process.c, src/storage/storage_driver.c,
src/vbox/vbox_tmpl.c, src/xen/xend_internal.c,
tests/qemuxml2argvtest.c, tests/qemuxmlnstest.c,
tests/sexpr2xmltest.c, tests/xmconfigtest.c: Convert
to use virObjectUnref/virObjectRef
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2012-07-31 16:55:36 +00:00
|
|
|
next unless /^\S+\s(?:[TBD])\s(\S+)\s*$/;
|
2012-07-24 13:37:48 +00:00
|
|
|
|
2012-07-27 12:51:28 +00:00
|
|
|
$gotsyms{$1} = 1;
|
2012-07-24 13:37:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
close NM;
|
|
|
|
}
|
|
|
|
|
2012-10-05 12:57:36 +00:00
|
|
|
foreach my $sym (keys(%wantsyms)) {
|
2012-07-24 13:37:48 +00:00
|
|
|
next if exists $gotsyms{$sym};
|
|
|
|
|
|
|
|
print STDERR "Expected symbol $sym is not in ELF library\n";
|
|
|
|
$ret = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
exit($ret);
|