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函数来寻找。

  • 相关阅读:
    Android最流行的网络框架
    linux知识库
    linux tail命令使用
    Android系列之Fragment(二)Fragment的生命周期和返回栈
    viewpager中fragment的生命周期管理
    fragment和fragmentactivity解析
    Android之Activity,Fragment生命周期探知
    Fragment生命周期
    基础总结篇之四:Service完全解析
    Activity的task相关
  • 原文地址:https://www.cnblogs.com/tekkaman/p/3065325.html
Copyright © 2011-2022 走看看