Pregunta

Is there a flag or any other directive that I can use to force the Linux Dynamic Linker ld.so to load all shared libraries at once at start of the program instead of lazy binding.

Essentially I want to turn off lazy binding.

Thanks

¿Fue útil?

Solución

Setting environment variable LD_BIND_NOW = 1 will do that.

Thanks to @skwllsp for the answer.

Otros consejos

man ld sayes:

-z keyword

now - When generating an executable or shared library, mark it to tell the dynamic linker to resolve all symbols when the program is started, or when the shared library is linked to using dlopen, instead of deferring function call resolution to the point when the function is first called

http://linux.die.net/man/1/ld

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top