1999-02-25 22:35:05 +03:00
|
|
|
#!/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);
|
|
|
|
|
1999-10-05 04:39:48 +04:00
|
|
|
print "Searching in " . $path . "\n";
|
|
|
|
open (REPORT, "find $path -name \"*.o\" -print | xargs nm -Bno | egrep \"_GLOBAL_\.[ID]|_tcf\" 2>&1 |" ) || die "open: $! \n";
|
1999-02-25 22:35:05 +03:00
|
|
|
|
|
|
|
while (<REPORT>) {
|
|
|
|
print $_;
|
|
|
|
print LOG $_;
|
|
|
|
}
|
|
|
|
close(REPORT);
|
|
|
|
|
1999-02-25 22:43:40 +03:00
|
|
|
if (-s "./ctor-dtor-report" > 0) {
|
1999-02-25 22:40:38 +03:00
|
|
|
print "Global Constructors\/Destructors Found" . "\n";
|
|
|
|
}
|