binutils-gdb/ld/testsuite/ld-size/size-2.c
H.J. Lu 1cf48f4842 Add size-1 and size-2 tests
* ld-size/size-1.c: New file.
	* ld-size/size-1.out: Likewise.
	* ld-size/size-1a.c: Likewise.
	* ld-size/size-1b.c: Likewise.
	* ld-size/size-2.c: Likewise.
	* ld-size/size-2.out: Likewise.
	* ld-size/size-2a.c: Likewise.
	* ld-size/size-2b.c: Likewise.

	* ld-size/size.exp (build_tests): Build libsize-1.so and
	libsize-2.so.
	(run_tests): Run size-1 and size-2.
2013-01-18 00:01:52 +00:00

15 lines
194 B
C

#include <stdio.h>
extern int bar_size;
extern char *get_bar (int, int);
int
main ()
{
char *bar = get_bar (2, 20);
if (bar_size == 10 && bar[2] == 20)
printf ("OK\n");
return 0;
}