1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/tools/tests/ctor-dtor.pl Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,24 @@ 1.4 +#!/usr/bin/perl 1.5 + 1.6 +use Cwd; 1.7 + 1.8 +$curdir = cwd(); 1.9 + 1.10 +open( LOG, ">ctor-dtor-report" ) || print "can't open $?\n"; 1.11 + 1.12 +@path_fields = split(/\//,$curdir); 1.13 + 1.14 +$path = join ("/",@path_fields); 1.15 + 1.16 +print "Searching in " . $path . "\n"; 1.17 +open (REPORT, "find $path -name \"*.o\" -print | xargs nm -Bno | egrep \"_GLOBAL_\.[ID]|_tcf\" 2>&1 |" ) || die "open: $! \n"; 1.18 + 1.19 +while (<REPORT>) { 1.20 + print $_; 1.21 + print LOG $_; 1.22 +} 1.23 +close(REPORT); 1.24 + 1.25 +if (-s "./ctor-dtor-report" > 0) { 1.26 + print "Global Constructors\/Destructors Found" . "\n"; 1.27 +}