X-Git-Url: https://oss.titaniummirror.com/gitweb?p=msp430-binutils.git;a=blobdiff_plain;f=ld%2Ftestsuite%2Fld-cygwin%2Ftestexe.c;h=50a980beca9be02bf57643b04db0c822963c985e;hp=333c3892265b881175f4302f1c7f771af79a972d;hb=88750007d7869f178f0ba528f41efd3b74c424cf;hpb=6df9443a374e2b81278c61b8afc0a1eef7db280b diff --git a/ld/testsuite/ld-cygwin/testexe.c b/ld/testsuite/ld-cygwin/testexe.c index 333c389..50a980b 100644 --- a/ld/testsuite/ld-cygwin/testexe.c +++ b/ld/testsuite/ld-cygwin/testexe.c @@ -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); +} +