diff -r 000000000000 -r 6474c204b198 tools/tests/ctor-dtor.pl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tools/tests/ctor-dtor.pl Wed Dec 31 06:09:35 2014 +0100 @@ -0,0 +1,24 @@ +#!/usr/bin/perl + +use Cwd; + +$curdir = cwd(); + +open( LOG, ">ctor-dtor-report" ) || print "can't open $?\n"; + +@path_fields = split(/\//,$curdir); + +$path = join ("/",@path_fields); + +print "Searching in " . $path . "\n"; +open (REPORT, "find $path -name \"*.o\" -print | xargs nm -Bno | egrep \"_GLOBAL_\.[ID]|_tcf\" 2>&1 |" ) || die "open: $! \n"; + +while () { + print $_; + print LOG $_; +} +close(REPORT); + +if (-s "./ctor-dtor-report" > 0) { + print "Global Constructors\/Destructors Found" . "\n"; +}