xref: /openbsd-src/regress/libexec/ld.so/randomdata/prog/prog.c (revision 91f110e064cd7c194e59e019b83bb7496c1c84d4)
1 #include <sys/types.h>
2 #include <assert.h>
3 
4 extern int64_t getaavalue(void);
5 
6 static int64_t progvalue __attribute__((section(".openbsd.randomdata")));
7 
8 int
9 main()
10 {
11 	int64_t aavalue = getaavalue();
12 
13 	assert(progvalue != 0);
14 	assert(aavalue != 0);
15 	assert(progvalue != aavalue);
16 	return (0);
17 }
18