简体   繁体   English

在iOS 10越狱环境中,使用dlopen系统/库/框架错误

[英]on iOS 10 jailbreak environment,use dlopen system/library/framework error

System processes 系统流程

System processes:/System/Library/Frameworks/HealthKit.framework/healthd,I dlopen this,appear dlerror: dlopen(/System/Library/Frameworks/HealthKit.framework/healthd,1):no suitable image found. 系统进程:/System/Library/Frameworks/HealthKit.framework/healthed,我打开dlopen,出现dlerror: dlopen(/System/Library/Frameworks/HealthKit.framework/healthd,1):找不到合适的图像。 Did find: /System/Library/Frameworks/HealthKit.framework/healthd: out of address space I don't know what to do,Can anyone give me some information? 确实找到了:/System/Library/Frameworks/HealthKit.framework/healthd:地址空间不足我不知道该怎么办,有人可以给我一些信息吗?

You're trying to dlopen an mach-o executable instead of a dylib, and while dyld (the Darwin dynamic linker) doesn't necessarily mind, the way executable segments are laid out is different, namely you have __PAGEZERO which dyld would try to allocate space for and fail. 您正在尝试dlopen一个mach-o可执行文件而不是一个dylib,而dyld(达尔文动态链接器)不一定要介意,但可执行文件段的布局方式却有所不同,即您拥有__PAGEZERO ,dyld会尝试这样做为失败分配空间。 Even if you did manage to dlopen it successfully, you would not be able to do much with it as it not have exported symbols that you could dlsym . 即使您成功地成功dlopen,您也将无法对其进行很多操作,因为它没有导出可以dlsym符号。

If you're trying to load the HealthKit framework, you should load the framework binary itself instead, although it's not necessary since on production builds of iPhoneOS you can use dlsym to get any symbol from any of the frameworks from the dyld shared cache, which would usually contain all the system frameworks/libraries. 如果您尝试加载HealthKit框架,则应改为本身加载框架二进制文件,尽管没有必要,因为在iPhoneOS的生产版本中,您可以使用dlsym从dyld共享缓存中的任何框架中获取任何符号。通常会包含所有系统框架/库。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM