if (dlsym(RTLD_DEFAULT, "bbSymbol") == NULL) { printf("dlsym(RTLD_DEFAULT, \"bbSymbol\") == NULL\n");
if (dlsym(RTLD_DEFAULT, "bbSymbol") != NULL) { printf("dlsym(RTLD_DEFAULT, \"bbSymbol\") != NULL\n");
main(){	int ret = 0;	void *exe_handle = dlopen(NULL, RTLD_LAZY);	void *libbb = dlopen("libbb.so", RTLD_LAZY);	if (libbb == NULL) {		printf("dlopen(\"libbb.so\", RTLD_LAZY) FAILED\n");		return (1);	}	/* RTLD_DEFAULT should see bbSymbol */	if (dlsym(RTLD_DEFAULT, "bbSymbol") == NULL) {		printf("dlsym(RTLD_DEFAULT, \"bbSymbol\") == NULL\n");		ret = 1;	}	/* RTLD_SELF should *not* see bbSymbol (different load group) */	if (dlsym(RTLD_SELF, "bbSymbol") != NULL) {		printf("dlsym(RTLD_SELF, \"bbSymbol\") != NULL\n");		ret = 1;	}	/* RTLD_NEXT should *not* see bbSymbol (different load group) */	if (dlsym(RTLD_NEXT, "bbSymbol") != NULL) {		printf("dlsym(RTLD_NEXT, \"bbSymbol\") != NULL\n");		ret = 1;	}	/* NULL should *not* see bbSymbol (different load group) */	if (dlsym(NULL, "bbSymbol") != NULL) {		printf("dlsym(NULL, \"bbSymbol\") != NULL\n");		ret = 1;	}	/* exe handle should *not* see bbSymbol (different load group) */	if (dlsym(exe_handle, "bbSymbol") != NULL) {		printf("dlsym(exe_handle, \"bbSymbol\") != NULL\n");		ret = 1;	}	dlclose(exe_handle);	dlclose(libbb);	return (ret);}