You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Oct 19, 2025. It is now read-only.
BeeHive的原理简单来说分为三步:
1、为了避免无用数据在编译阶段被优化删掉,就通过 used 来修饰 并告诉编译器把数据存到Mach-O文件的Segment Data 中,就是宏定义那段
2、hook动态链接库加载,在main函数执行之前把数据从Segment Data读取出来,做好class和protocol的字典对应准备,就是注册main函数执行之前__attribute__((constructor))那段
3、当程序启动完成后,就可以从字典的中根据protocol取出对应的类,达到解耦合的目的