]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - ld/testsuite/ld-cygwin/testexe.c
* elfxx-tilegx.c (tilegx_elf_relocate_section): Silence bogus warning.
[thirdparty/binutils-gdb.git] / ld / testsuite / ld-cygwin / testexe.c
CommitLineData
3bb72744
NC
1int global_a = 2;
2
3void
4exewrite (void)
5{
6 global_a = 1;
7}
8
9extern void dllwrite (void);
10
11int _stdcall
12testexe_main (void* p1, void *p2, char* p3, int p4)
13{
14 dllwrite ();
2fe50fe3
DK
15 /* We can't print or assert in a minimal app like this,
16 so use the return status to indicate if global_a
17 ended up with the correct expected value. */
18 return 1 - global_a;
3bb72744 19}
2fe50fe3
DK
20
21/* We have to import something, anything at all, from
22 kernel32, in order to have the thread and process
23 base thunk routines loaded when we start running!. */
24extern __attribute((dllimport)) void _stdcall Sleep (unsigned int duration);
25
26int _stdcall
27testexe_dummy (unsigned int foobar)
28{
29 Sleep (foobar);
30}
31