old-cross-binutils/ld/testsuite/ld-elf/dl4main.c
H.J. Lu c555238b1a 2006-10-18 H.J. Lu <hongjiu.lu@intel.com>
* ld-elf/dl4.c: New file.
	* ld-elf/dl4.list: Likewise.
	* ld-elf/dl4a.out: Likewise.
	* ld-elf/dl4b.out: Likewise.
	* ld-elf/dl4main.c: Likewise.
	* ld-elf/dl4xxx.c: Likewise.
	* ld-elf/dl4xxx.list: Likewise.

	* ld-elf/shared.exp (build_tests): Add libdl4a.so and
	libdl4b.so.
	(run_tests): Likewise.
2006-10-18 16:23:24 +00:00

34 lines
401 B
C

#include <stdio.h>
extern int foo1;
extern int foo2;
extern void bar (void);
void
xxx1 (void)
{
printf ("MAIN1\n");
}
void
xxx2 (void)
{
printf ("MAIN2\n");
}
int
main (void)
{
foo1 = 1;
foo2 = 1;
bar ();
if (foo1 == -1)
printf ("OK1\n");
else if (foo1 == 1)
printf ("OK2\n");
if (foo2 == -1)
printf ("OK3\n");
else if (foo2 == 1)
printf ("OK4\n");
return 0;
}