How do applications resolve to different versions of shared libraries at run time?

前端 未结 3 767
陌清茗
陌清茗 2020-12-02 09:15

I\'m a noob to how shared libraries work on linux. I am trying to understand how do applications resolve different revisions of the same shared library at run-time on linux.

3条回答
  •  醉话见心
    2020-12-02 09:44

    At application link time, if you specify -lmy, the linker will search for a file named libmy.so. It will find this file, and link you executable with it. If this file is a symbolic link, then your application will be linked with the target of the symlink.

    Application link time is the place to specify which version of the dynamic library you want to use with your application.

提交回复
热议问题