diff options
| author | FluorescentCIAAfricanAmerican <[email protected]> | 2020-04-22 12:56:21 -0400 |
|---|---|---|
| committer | FluorescentCIAAfricanAmerican <[email protected]> | 2020-04-22 12:56:21 -0400 |
| commit | 3bf9df6b2785fa6d951086978a3e66f49427166a (patch) | |
| tree | 2c0f1f0c63c4832882bc93814ebd2c2b1c6224e5 /devtools/bin/check_gcc_compile.pl | |
| download | archived-source-engine-2018-hl2-src-master.tar.xz archived-source-engine-2018-hl2-src-master.zip | |
Diffstat (limited to 'devtools/bin/check_gcc_compile.pl')
| -rw-r--r-- | devtools/bin/check_gcc_compile.pl | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/devtools/bin/check_gcc_compile.pl b/devtools/bin/check_gcc_compile.pl new file mode 100644 index 0000000..4d70637 --- /dev/null +++ b/devtools/bin/check_gcc_compile.pl @@ -0,0 +1,23 @@ +#! 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"; + } + + } + + } |