Fix handling of ldscript.so files. --- a/lib/ffi/library.rb +++ b/lib/ffi/library.rb @@ -114,7 +114,7 @@ rescue Exception => ex ldscript = false - if ex.message =~ /(([^ \t()])+\.so([^ \t:()])*):([ \t])*(invalid ELF header|file too short|invalid file format)/ + if ex.message =~ /(([^ \t()])+\.so([^ \t:()])*):([ \t])*(invalid ELF header|file too short|invalid file format|Exec format error)/ if File.binread($1) =~ /(?:GROUP|INPUT) *\( *([^ \)]+)/ libname = $1 ldscript = true