3 $C{COMPILE} $DIR/load-noobjc.m -o load-noobjc.exe
4 $C{COMPILE} $DIR/load-noobjc2.m -o libload-noobjc2.dylib -bundle -bundle_loader load-noobjc.exe
5 $C{COMPILE} $DIR/load-noobjc3.m -o libload-noobjc3.dylib -bundle -bundle_loader load-noobjc.exe
15 void *thread(void *arg __unused)
17 dlopen("libload-noobjc2.dylib", RTLD_LAZY);
18 fail("dlopen should not have returned");
23 semaphore_create(mach_task_self(), &go, SYNC_POLICY_FIFO, 0);
26 pthread_create(&th, nil, &thread, nil);
28 // Wait for thread to stop in libload-noobjc2's +load method.
31 // run nooobjc3's constructor function.
32 // There's no objc code here so it shouldn't require the +load lock.
33 void *dlh = dlopen("libload-noobjc3.dylib", RTLD_LAZY);
35 testassert(state == 1);