]> git.saurik.com Git - apple/dyld.git/blob - testing/test-cases/dlopen-RTLD_NOLOAD.dtest/init-a.c
dyld-750.5.tar.gz
[apple/dyld.git] / testing / test-cases / dlopen-RTLD_NOLOAD.dtest / init-a.c
1
2
3 #include <stdbool.h>
4
5 extern bool inInitB;
6 extern bool doneInitB;
7
8 bool initsInWrongOrder = false;
9 bool doneInitA = false;
10
11 __attribute__((constructor))
12 void initA()
13 {
14 if ( inInitB )
15 initsInWrongOrder = true;
16 doneInitA = true;
17 }
18
19 bool allInitsDone()
20 {
21 return doneInitA && doneInitB;
22 }