X-Git-Url: https://oss.titaniummirror.com/gitweb?p=msp430-binutils.git;a=blobdiff_plain;f=ld%2Ftestsuite%2Fld-cygwin%2Ftestexe.c;fp=ld%2Ftestsuite%2Fld-cygwin%2Ftestexe.c;h=50a980beca9be02bf57643b04db0c822963c985e;hp=333c3892265b881175f4302f1c7f771af79a972d;hb=d5da4f291af551c0b8b79e1d4a9b173d60e5c10e;hpb=7b5ea4fcdf2819e070665ab5610f8b48e3867c10 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); +} +