binutils-gdb/binutils/testsuite/binutils-all/testprog.c

32 lines
469 B
C
Raw Normal View History

2003-04-23 19:36:08 +02:00
/* This program is used to test objcopy, readelf and strip. */
1999-05-03 09:29:11 +02:00
2003-04-23 19:36:08 +02:00
extern int strcmp (char *, const char *);
extern int printf (const char *, ...);
1999-05-03 09:29:11 +02:00
int common;
int global = 1;
static int local = 2;
static char string[] = "string";
1999-05-03 09:29:11 +02:00
int
fn (void)
1999-05-03 09:29:11 +02:00
{
return 3;
}
int
main (void)
1999-05-03 09:29:11 +02:00
{
if (common != 0
|| global != 1
|| local != 2
|| strcmp (string, "string") != 0)
{
printf ("failed\n");
return 1;
1999-05-03 09:29:11 +02:00
}
printf ("ok\n");
return 0;
1999-05-03 09:29:11 +02:00
}