Dynamic linker utility.
I want to solve the problem Question about BZ#10652: Dynamic loading a library that is linked with pthread crashes app compiled without pthread in getaddrinfo. There are workarounds:
- rebuild lua with pthread.
- use environment variable
LD_PRELOAD
to load pthread. - use
dyld.dlopen_pthread
from lua script as below:
local dyld = require "dromozoa.dyld"
dyld.dlopen_pthread()