Workshop o mikrokontrolérech na SKSP 2024.
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.

21 lines
396 B

2 months ago
#!/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;