]> oss.titaniummirror.com Git - msp430-binutils.git/blobdiff - ld/testsuite/ld-cygwin/testexe.c
Imported binutils-2.20
[msp430-binutils.git] / ld / testsuite / ld-cygwin / testexe.c
index 333c3892265b881175f4302f1c7f771af79a972d..50a980beca9be02bf57643b04db0c822963c985e 100644 (file)
@@ -12,5 +12,20 @@ int _stdcall
 testexe_main (void* p1, void *p2, char* p3, int p4)
 {
   dllwrite ();
-  return 0;
+  /* We can't print or assert in a minimal app like this,
+     so use the return status to indicate if global_a
+     ended up with the correct expected value.  */
+  return 1 - global_a;
 }
+
+/* We have to import something, anything at all, from 
+   kernel32, in order to have the thread and process
+   base thunk routines loaded when we start running!.  */
+extern __attribute((dllimport)) void _stdcall Sleep (unsigned int duration);
+
+int _stdcall
+testexe_dummy (unsigned int foobar)
+{
+  Sleep (foobar);
+}
+