diff options
author | Federico G. Schwindt <fgsch@cvs.openbsd.org> | 2002-02-10 22:51:42 +0000 |
---|---|---|
committer | Federico G. Schwindt <fgsch@cvs.openbsd.org> | 2002-02-10 22:51:42 +0000 |
commit | a6524401a41db61ae7519fcd842ce182a1a98505 (patch) | |
tree | 54350b4c98c3d71f4a3880c05df2fece1d377611 /regress/libexec/ld.so/weak/prog/main.c | |
parent | d0cf1a3683c12d4728861387529f1e41117938bd (diff) |
basic weak reference test.
Diffstat (limited to 'regress/libexec/ld.so/weak/prog/main.c')
-rw-r--r-- | regress/libexec/ld.so/weak/prog/main.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/regress/libexec/ld.so/weak/prog/main.c b/regress/libexec/ld.so/weak/prog/main.c new file mode 100644 index 00000000000..6964eb3ffdb --- /dev/null +++ b/regress/libexec/ld.so/weak/prog/main.c @@ -0,0 +1,20 @@ +/* $OpenBSD: main.c,v 1.1 2002/02/10 22:51:41 fgsch Exp $ */ + +/* + * Public domain. 2002, Federico Schwindt <fgsch@openbsd.org>. + */ + +#include <err.h> +#include "defs.h" + +int +main(int argc, char **argv) +{ + if (weak_func() != WEAK_REF) + err(1, "error calling weak reference"); + + if (func() != STRONG_REF) + err(1, "error calling strong reference"); + + return (0); +} |