For very short linker scripts dlopen may return 'file too short' instead
authorCJ van den Berg <cj@vdobnline.com>
Wed, 20 Apr 2011 21:25:22 +0000 (22:25 +0100)
committerIan Lynagh <igloo@earth.li>
Wed, 20 Apr 2011 21:25:22 +0000 (22:25 +0100)
of 'invalid ELF header'.

rts/Linker.c

index f39112f..c1310b0 100644 (file)
@@ -1186,7 +1186,7 @@ initLinker( void )
 #   endif /* RTLD_DEFAULT */
 
     compileResult = regcomp(&re_invalid,
 #   endif /* RTLD_DEFAULT */
 
     compileResult = regcomp(&re_invalid,
-           "(([^ \t()])+\\.so([^ \t:()])*):([ \t])*invalid ELF header",
+           "(([^ \t()])+\\.so([^ \t:()])*):([ \t])*(invalid ELF header|file too short)",
            REG_EXTENDED);
     ASSERT( compileResult == 0 );
     compileResult = regcomp(&re_realso,
            REG_EXTENDED);
     ASSERT( compileResult == 0 );
     compileResult = regcomp(&re_realso,