6 @output=`objdump -dr $ARGV`;
11 while($_=shift @output){
13 if(m/^\w+\.o:\s+file format.*/){
15 $obj =~ s/^(\w+\.o):\s+file format.*/\1/
17 if(m/^0[0-9a-fA-F]+\s<\w+>:$/){
19 $func =~ s/^0[0-9a-fA-F]+\s<(\w+)>:$/\1/;
22 $addr =~ s/^(0[0-9a-fA-F]+)\s<\w+>:$/\1/;
25 @cfuncs = sort @cfuncs;
27 foreach $f (@cfuncs) {
29 if($f ne "::_GLOBAL_OFFSET_TABLE_"){
37 print "${obj}::$func:\n";
42 if(m/\scall\s.*<.*>/){
44 $cfunc =~ s/.*\scall\s.*<(.*)>$/\1/;
46 if($cfunc =~ m/$func\+0x/){
50 push @cfuncs, "${obj}::$cfunc";
55 push @cfuncs, "#$cfunc";
62 if(m/^\s+[0-9a-fA-F]+:\s\w+\s+\w+$/){
64 $cfunc =~ s/.*\s(\w+)$/\1/;
66 # it just showed up. We might attach it to the next line.
69 # we're waiting for a reloc
70 push @cfuncs, "::$cfunc";