You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
396 B
20 lines
396 B
#!/usr/bin/perl
|
|
# Check symbols exported by a library
|
|
# (c) 2014 Martin Mares <mj@ucw.cz>
|
|
|
|
use common::sense;
|
|
|
|
my $lib = $ARGV[0] or die "Usage: $0 <library>\n";
|
|
open my $f, '-|', 'nm', $lib or die;
|
|
while (<$f>) {
|
|
chomp;
|
|
next if /^\s/;
|
|
my ($addr, $type, $sym) = split /\s+/;
|
|
if ($sym =~ m{^(ucw|ucwlib)_}) {
|
|
next
|
|
}
|
|
if ($type =~ m{[A-Z]}) {
|
|
print "$sym ($type)\n";
|
|
}
|
|
}
|
|
close $f or die;
|
|
|