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

31 lines
435 B
C
Raw Normal View History

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