Team Fortress 2 Source Code as on 22/4/2020
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

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