linuxlinkerldlibc

Is there a linker flag to force it to load all shared libraries at start time?


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.


Solution

  • Setting environment variable LD_BIND_NOW = 1 will do that.

    Thanks to @skwllsp for the answer.