首页
社区
课程
招聘
[求助]关于LC_DYLD_INFO(_ONLY)
2014-11-7 17:29 6398

[求助]关于LC_DYLD_INFO(_ONLY)

2014-11-7 17:29
6398
Hi  各位

    我现在正在研究mach-o, 但是发现里面有一个segment LC_DYLD_INFO_ONLY,
    我很想知道是什么意思, 哪位大侠可以帮忙?

Best Regards
David Dong

阿里云助力开发者!2核2G 3M带宽不限流量!6.18限时价,开 发者可享99元/年,续费同价!

收藏
点赞0
打赏
分享
最新回复 (7)
雪    币: 357
活跃值: (2648)
能力值: ( LV3,RANK:25 )
在线值:
发帖
回帖
粉丝
KooJiSung 2014-11-7 17:31
2
0
iPhoneOS6.1.sdk\usr\include\mach-o\loader.h

#define        LC_DYLD_INFO_ONLY (0x22|LC_REQ_DYLD)        /* compressed dyld information only */

/*
* The dyld_info_command contains the file offsets and sizes of
* the new compressed form of the information dyld needs to
* load the image.  This information is used by dyld on Mac OS X
* 10.6 and later.  All information pointed to by this command
* is encoded using byte streams, so no endian swapping is needed
* to interpret it.
*/
雪    币: 9
活跃值: (18)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
dongAxis 2014-11-7 17:35
3
0
感谢回答, 我查看之后发现dyld在加载的时候,会区分是compressed类型(当有LC_DYLD_INFO(_ONLY)的时候, 会被认为是这个类型)和tranditional类型的, 其实主要不明白这两者的区别是什么。
雪    币: 9
活跃值: (18)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
dongAxis 2014-11-7 17:37
4
0
感谢回答, 我查看之后发现dyld在加载的时候,会区分是compressed类型(当有LC_DYLD_INFO(_ONLY)的时候, 会被认为是这个类型)和tranditional类型的, 其实主要不明白这两者的区别是什么。
雪    币: 357
活跃值: (2648)
能力值: ( LV3,RANK:25 )
在线值:
发帖
回帖
粉丝
KooJiSung 2014-11-7 17:47
5
0
opensource.apple.com\dyld-353.2.1\src\ImageLoaderMachO.cpp

        if ( compressed )
                return ImageLoaderMachOCompressed::instantiateMainExecutable(mh, slide, path, segCount, libCount, context);
        else
#if SUPPORT_CLASSIC_MACHO
                return ImageLoaderMachOClassic::instantiateMainExecutable(mh, slide, path, segCount, libCount, context);
#else
                throw "missing LC_DYLD_INFO load command";
#endif
雪    币: 1098
活跃值: (193)
能力值: (RANK:210 )
在线值:
发帖
回帖
粉丝
zhuliang 5 2014-11-7 19:50
6
0
楼上正解。
雪    币: 9
活跃值: (18)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
dongAxis 2014-11-7 23:50
7
0
感谢, 我回去再研究一下
雪    币: 9
活跃值: (18)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
dongAxis 2014-11-7 23:51
8
0
感谢 有不懂的再问  
游客
登录 | 注册 方可回帖
返回