Modified source engine (2017) developed by valve and leaked in 2020. Not for commercial purporses
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

23 lines
439 B

#! perl
# scan all .o files for illegal instructions from passing aggregates to varargs functions.
use File::Find;
find( \&CheckFile, "." );
sub CheckFile
{
return unless (/\.o$/ );
open( DIS, "objdump --disassemble -C $_|" ) || die "can't process $_";
while( <DIS> )
{
$symbol = $1 if ( /^[0-9]+ \<(.*)\>:/ );
if ( /\s+ud2a/ )
{
print "Illegal instruction in $symbol in ", $File::Find::name, "\n";
}
}
}