1 my $show_module_name = 1;
3 my $strip_leading_underscore = 0;
5 # Dump all symbols for the given object file that are defined and have
8 sub dump_symbols_for_file
($)
12 print STDERR
"Opening dump of object [$fn]\n";
14 open(SP
, '-|', "dumpbin /symbols \"".$fn."\"") or die "Can't open pipe for $fn";
18 # 008 00000000 SECT3 notype () External | _encode_AccessDescription
20 /^[[:xdigit:]]{3,}\s[[:xdigit:]]{8,}\s(\w+)\s+\w*\s+(?:\(\)| )\s+(\w+)\s+\|\s+(\w+)$/ && do {
21 my ($section, $visibility, $symbol) = ($1, $2, $3);
23 if ($section ne "UNDEF" && $visibility eq "External") {
24 print $fn if $show_module_name;
25 print "\t" if $use_indent || $show_module_name;
27 if ($strip_leading_underscore && $symbol =~ /_(.*)/) {
39 sub use_response_file
($)
43 open (RF
, '<', $fn) or die "Can't open response file $fn";
47 dump_symbols_for_file
($1);
56 $show_module_name = 0;
66 $strip_leading_underscore = 1;
71 use_response_file
($1);
75 dump_symbols_for_file
($_);