zoukankan      html  css  js  c++  java
  • mac之dylib类型

    mac之 dylib类型

     1、dependent library

      A dependent library, from the client’s point of view, is a dynamic library the client is linked with. Dependent libraries are loaded into the same process the client is being loaded into as part of its load process. For example, when an app is launched, its dependent libraries are loaded as part of the launch process, before the main function is executed. When a dynamic library is loaded into a running process, its dependent libraries are loaded into the process before control is passed to the routine that opened the library.

     2、 runtime loaded library

      A runtime loaded library is a dynamic library the client opens with the dlopen function. Clients do not include runtime loaded libraries in their link line. The dynamic loader, therefore, doesn’t open these libraries when the client is loaded. Clients open a runtime loaded library when they’re about to use a symbol it exports. Clients don’t have any undefined external references to symbols in runtime loaded libraries. Clients get the address of all the symbols they need from runtime loaded libraries by calling the dlsym function with the symbol name.

      中文总结:

      1、dependent library是在程序启动时要完全加载的,这类dylib在编译时通过头文件引用了相应dylib中的符号,所以必须在程序启动时加载相应的dylib。

      2、runtime-loaded library是通过DLC函数来加载的dylib,源程序中绝不包含这类dylib中的符号的引用,要引用这类dylib中的符号,必须通过dlsym函数来寻找。

  • 相关阅读:
    unittest模块小结
    自定义日志类
    配置文件的简单操作
    自动化框架搭建(一)
    openpyxl一点心得
    关于过滤字符中不同元素小结
    关于传入列表出现元素次数排序题目的一点心得
    Python中*和**的作用(课堂小结)
    Python代码的人机大战(循环嵌套)
    最后期限阅读笔记02
  • 原文地址:https://www.cnblogs.com/tekkaman/p/3065325.html
Copyright © 2011-2022 走看看