False syscall dependencies
Shaun Jackman
sjackman@gmail.com
Thu Dec 15 13:43:00 GMT 2005
A quick postscript. I found the dependency tree above using the linker
map produced `ld -M' and a short filter to convert this output to a
form graphviz's dotty could plot. The result is very pleasing. If
anyone's interested I'll post it. In fact, I'll post it anyways. The
usual 'this is ugly ugly one-off Perl code' caveat applies. Please
wear sunglasses.
Cheers,
Shaun
========== ldmdot ==========
#!/usr/bin/perl -w
use strict;
print "digraph ldmap {\n";
while (<>) {
chomp;
last if $_ eq '';
}
my $member;
while (<>) {
chomp;
last if $_ eq '';
if (!/^ /) {
s/^.*\(([^)]*)\).*$/$1/;
y/-./__/;
$member = $_;
} else {
my $symbol = $_;
$symbol =~ s/^.*\(([^)]*)\).*$/$1/;
my $file = $_;
if (/\) /) {
$file =~ s/^.*\(([^)]*)\) .*$/$1/;
} else {
$file =~ s/^.*(\/| )([^ ]*) .*$/$2/;
}
$file =~ y/-./__/;
print "$file -> $symbol -> $member;\n";
}
}
print "}\n";
More information about the Newlib
mailing list