[iOS知识简记]-dyld-源码分析

dyld-635.2源码,https://opensource.apple.com/tarballs/dyld/

dyld,最开始的入口点在dyld里的_dyld_start函数,从内核态切换过来。

导出函数相关

MachO文件格式,ImageLoaderMachOCompressed/ImageLoaderMachOClassic。

现在iOS/MacOSX支持的都是Compressed格式。

参考:

  • http://networkpx.blogspot.com/2009/09/about-lcdyldinfoonly-command.html
  • https://opensource.apple.com/source/xnu/xnu-4903.221.2/EXTERNAL_HEADERS/mach-o/loader.h.auto.html
  • https://en.wikipedia.org/wiki/MacOS

PAC指针保护,pointer authentication codes (PACs),ARMv8.3提供,2018的iPhone models (XS/XS Max/XR)引入。

__has_feature(ptrauth_calls)编译器支持。

参考:

  • https://developer.apple.com/documentation/security/preparing_your_app_to_work_with_pointer_authentication?language=objc
  • ptrauth.h
  • http://quabr.com/52624308/xcode-arm64-vs-arm64e
  • https://www.4hou.com/mobile/13756.html
  • https://googleprojectzero.blogspot.com/2019/02/examining-pointer-authentication-on.html
  • https://www.qualcomm.com/documents/whitepaper-pointer-authentication-armv83

导出符号,uleb128编码的树里压缩存储。

参考:

  • https://adrummond.net/posts/macho
  • http://www.m4b.io/reverse/engineering/mach/binaries/2015/03/29/mach-binaries.html

导出函数hook,interposing overrides。

mach-o files advertise interposing by having a __DATA __interpose section

参考:

  • dyld-interposing.h
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值