tools/tests/ctor-dtor.pl

branch
TOR_BUG_9701
changeset 15
b8a032363ba2
equal deleted inserted replaced
-1:000000000000 0:04e6e99a822c
1 #!/usr/bin/perl
2
3 use Cwd;
4
5 $curdir = cwd();
6
7 open( LOG, ">ctor-dtor-report" ) || print "can't open $?\n";
8
9 @path_fields = split(/\//,$curdir);
10
11 $path = join ("/",@path_fields);
12
13 print "Searching in " . $path . "\n";
14 open (REPORT, "find $path -name \"*.o\" -print | xargs nm -Bno | egrep \"_GLOBAL_\.[ID]|_tcf\" 2>&1 |" ) || die "open: $! \n";
15
16 while (<REPORT>) {
17 print $_;
18 print LOG $_;
19 }
20 close(REPORT);
21
22 if (-s "./ctor-dtor-report" > 0) {
23 print "Global Constructors\/Destructors Found" . "\n";
24 }

mercurial