xref: /openbsd-src/regress/libexec/ld.so/randomdata/prog/prog.c (revision 75795c7bb7900317a5c55bdb22c0c5a0ef978a42)
1 /*	$OpenBSD: prog.c,v 1.3 2017/08/01 13:05:55 deraadt Exp $	*/
2 #include <sys/types.h>
3 #include <assert.h>
4 
5 extern int64_t getaavalue(void);
6 
7 int64_t progvalue __attribute__((section(".openbsd.randomdata")));
8 
9 int
main()10 main()
11 {
12 	int64_t aavalue = getaavalue();
13 
14 	assert(progvalue != 0);
15 	assert(aavalue != 0);
16 	assert(progvalue != aavalue);
17 	return (0);
18 }
19