Difference between shared objects (.so), static libraries (.a), and DLL's (.so)?

前端 未结 4 895
清酒与你
清酒与你 2020-11-28 17:04

I have been involved in some debate with respect to libraries in Linux, and would like to confirm some things.

It is to my understanding (please correct me if I am wr

4条回答
  •  被撕碎了的回忆
    2020-11-28 17:46

    You are correct in that static files are copied to the application at link-time, and that shared files are just verified at link time and loaded at runtime.

    The dlopen call is not only for shared objects, if the application wishes to do so at runtime on its behalf, otherwise the shared objects are loaded automatically when the application starts. DLLS and .so are the same thing. the dlopen exists to add even more fine-grained dynamic loading abilities for processes. You dont have to use dlopen yourself to open/use the DLLs, that happens too at application startup.

提交回复
热议问题