[질문] 동적라리브러리 unload

zipsinworm의 이미지

동적 라이브러리 테스트를 해보려고 간단한 소스를 만들어 보았습니다.

#include
#include
#include

int main(void)
{
void* test;
test=dlopen("./test.so",RTLD_NOW);
if(!test){
puts("Error");
exit(1);
}
puts("test...");
dlclose(test);
return 0;
}

test.so파일이 메모리에 load와 test...는 찍히는데 종료하기 직전 계속 세그멘테이션 에러가 발생합니다.
전에는 안그랬던거 같은데 왜그럴까요..ㅜㅜ