xref: /openbsd/regress/libexec/ld.so/weak/prog2/main.c (revision 898184e3)
1 /*	$OpenBSD: main.c,v 1.1 2002/11/13 21:52:11 fgsch Exp $	*/
2 
3 /*
4  * Public domain. 2002, Federico Schwindt <fgsch@openbsd.org>.
5  */
6 
7 #include <err.h>
8 #include "defs.h"
9 
10 int
11 main(int argc, char **argv)
12 {
13 	if (weak_func() != WEAK_REF)
14 		errx(1, "error calling weak_func");
15 
16 	if (func() != WEAK_REF)
17 		errx(1, "error calling weak reference reference");
18 
19 	return (0);
20 }
21