diff options
Diffstat (limited to 'ld/testsuite/ld-elf/dl2main.c')
-rw-r--r-- | ld/testsuite/ld-elf/dl2main.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/ld/testsuite/ld-elf/dl2main.c b/ld/testsuite/ld-elf/dl2main.c new file mode 100644 index 0000000..ddf677f --- /dev/null +++ b/ld/testsuite/ld-elf/dl2main.c @@ -0,0 +1,22 @@ +#include <stdio.h> + +extern int foo; +extern void bar (void); + +void +xxx (void) +{ + printf ("MAIN\n"); +} + +int +main (void) +{ + foo = 1; + bar (); + if (foo == -1) + printf ("OK1\n"); + else if (foo == 1) + printf ("OK2\n"); + return 0; +} |