#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdbool.h>
#include <dlfcn.h>
extern bool initsInWrongOrder;
extern bool allInitsDone();
int main()
{
printf("[BEGIN] dlopen-RTLD_NOLOAD-in-initializer\n");
if ( initsInWrongOrder )
printf("[FAIL] dlopen-RTLD_NOLOAD-in-initializer: wrong init order\n");
else if ( !allInitsDone() )
printf("[FAIL] dlopen-RTLD_NOLOAD-in-initializer: all initializers not run\n");
else
printf("[PASS] dlopen-RTLD_NOLOAD-in-initializer\n");
return 0;
}