Giter VIP home page Giter VIP logo

Comments (7)

rosen0510 avatar rosen0510 commented on May 14, 2024

1、2、3点感谢建议,我们尽快支持,也欢迎pr过来!第4点是因为有些OC的hook需要用oc实现,然后对外的接口都要用OC或者C封装,直接提供C++接口会有标准不统一带来的ABI兼容问题。

from oomdetector.

HePingLaoSan avatar HePingLaoSan commented on May 14, 2024

对于程序中获取所有image信息的数据结构AppImages看到只在一处进行初始化构建,但是实际中某些image是可能在运行时动态加载和卸载的,因此需要有一个机制能够在运行时动态更新所有的image信息。

1、3点赞同,第二点有疑问望解答,所说的运行时动态加载和卸载场景有哪些?除了不能上架AppStore的app,应该动态库(系统库除外)都是在启动的时候已经load成功的吧?

from oomdetector.

youngsoft avatar youngsoft commented on May 14, 2024

对于动态库的问题。系统是可以在运行时动态加载其内部的系统动态库的。所以动态库以及image的数量是可变的。另外是否可以在运行时动态加载程序中Frameworks目录下的动态库呢?如果可以的话那这个也是一个运行时加载的动态库了。

from oomdetector.

tripleCC avatar tripleCC commented on May 14, 2024

对于动态库的问题。系统是可以在运行时动态加载其内部的系统动态库的。所以动态库以及image的数量是可变的。另外是否可以在运行时动态加载程序中Frameworks目录下的动态库呢?如果可以的话那这个也是一个运行时加载的动态库了。

可以在运行时 dlopen Frameworks 目录下的动态库,
https://stackoverflow.com/questions/6530701/is-the-function-dlopen-private-api

from oomdetector.

tripleCC avatar tripleCC commented on May 14, 2024

对于程序中获取所有image信息的数据结构AppImages看到只在一处进行初始化构建,但是实际中某些image是可能在运行时动态加载和卸载的,因此需要有一个机制能够在运行时动态更新所有的image信息。

1、3点赞同,第二点有疑问望解答,所说的运行时动态加载和卸载场景有哪些?除了不能上架AppStore的app,应该动态库(系统库除外)都是在启动的时候已经load成功的吧?

在工程里面创建动态库 target ,主 target 不依赖这个动态库 target ,打包时,这个动态库不会出现在 mach-o 的依赖中,没有对应的 LC_LOAD_DYLIB ,不过动态库是在 .app 里面的,可以通过 dlopen 打开

from oomdetector.

HePingLaoSan avatar HePingLaoSan commented on May 14, 2024

对于程序中获取所有image信息的数据结构AppImages看到只在一处进行初始化构建,但是实际中某些image是可能在运行时动态加载和卸载的,因此需要有一个机制能够在运行时动态更新所有的image信息。

1、3点赞同,第二点有疑问望解答,所说的运行时动态加载和卸载场景有哪些?除了不能上架AppStore的app,应该动态库(系统库除外)都是在启动的时候已经load成功的吧?

在工程里面创建动态库 target ,主 target 不依赖这个动态库 target ,打包时,这个动态库不会出现在 mach-o 的依赖中,没有对应的 LC_LOAD_DYLIB ,不过动态库是在 .app 里面的,可以通过 dlopen 打开

学习了,不过使用dlopen的话,目前apple 会 reject 掉的,我之前想表达的是,在初始化中获取动态库,已经能够 cover 大部分场景了😄,如果设计一种机制来全量获取的话,考虑到性能损耗等成本,感觉不太合算

from oomdetector.

tripleCC avatar tripleCC commented on May 14, 2024

对于程序中获取所有image信息的数据结构AppImages看到只在一处进行初始化构建,但是实际中某些image是可能在运行时动态加载和卸载的,因此需要有一个机制能够在运行时动态更新所有的image信息。

1、3点赞同,第二点有疑问望解答,所说的运行时动态加载和卸载场景有哪些?除了不能上架AppStore的app,应该动态库(系统库除外)都是在启动的时候已经load成功的吧?

在工程里面创建动态库 target ,主 target 不依赖这个动态库 target ,打包时,这个动态库不会出现在 mach-o 的依赖中,没有对应的 LC_LOAD_DYLIB ,不过动态库是在 .app 里面的,可以通过 dlopen 打开

学习了,不过使用dlopen的话,目前apple 会 reject 掉的,我之前想表达的是,在初始化中获取动态库,已经能够 cover 大部分场景了😄,如果设计一种机制来全量获取的话,考虑到性能损耗等成本,感觉不太合算

https://stackoverflow.com/questions/6530701/is-the-function-dlopen-private-api 使用了dlopen,不过苹果并没有 reject ,dlopen 算是公用 API ,只要打开的是有签名的动态库,问题应该不大。
使用 dlopen 可以把部分不需要的模块初始化(rebase/binding/initializer)工作放到启动后执行,不过这只是我的猜想

from oomdetector.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.