mirror of
https://github.com/dhewm/dhewm3.git
synced 2024-11-30 16:11:11 +00:00
79ad905e05
Excluding 3rd party files.
19 lines
455 B
Perl
19 lines
455 B
Perl
#!/usr/bin/env perl
|
|
# send linker output to stdin
|
|
# make 2>&1 | process_undef.pl
|
|
|
|
my %symbols;
|
|
open($list, "cat $ARGV[0] " . '| grep \'undefined reference\' | grep -v \'more undefined\' | sed -e \'s/.*undefined reference to `\(.*\)./\1/\' |');
|
|
my $line = <$list>;
|
|
do
|
|
{
|
|
chop($line);
|
|
$symbols{$line}++;
|
|
} until (!($line = <$list>));
|
|
|
|
@sorted = sort { $symbols{$b} <=> $symbols{$a} } keys %symbols;
|
|
|
|
foreach (@sorted)
|
|
{
|
|
print "$symbols{$_} : $_\n";
|
|
};
|