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;
|
|
|
|
|
|
|
|
my @wantsyms;
|
|
|
|
my %gotsyms;
|
|
|
|
|
|
|
|
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+);$/;
|
|
|
|
|
|
|
|
push @wantsyms, $1;
|
|
|
|
}
|
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
|
|
|
my $ret = 0;
|
|
|
|
|
|
|
|
foreach my $sym (@wantsyms) {
|
|
|
|
next if exists $gotsyms{$sym};
|
|
|
|
|
|
|
|
print STDERR "Expected symbol $sym is not in ELF library\n";
|
|
|
|
$ret = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
exit($ret);
|