遇到一个很奇葩的问题,自己编写了一个dylib库libmineC.dylib 然后我也把文件对应放到了可执行文件同目录下,可执行文件也用yololib做了注入,但就总是报错如下:
Incident Identifier: 01CCC267E-1D12-417D-93A7-1DB5096E21BB
CrashReporter Key: 399669d75bd401ea20ccb936e102712aab65de7d
Hardware Model: iPhone7,2
Process: FiveNightsatFreddys [2079]
Path: /private/var/mobile/Containers/Bundle/Application/0513A2D6-96EA-44FB-946A-15E54C0D4EBB/FiveNightsatFreddys.app/FiveNightsatFreddys
Identifier: com.scottgam7es.fivenights
Version: 1.0 (1.0)
Code Type: ARM (Native)
Parent Process: launchd [1]
Date/Time: 2016-04-23 18:52:38.38 +0800
Launch Time: 2016-04-23 18:52:37.37 +0800
OS Version: iOS 9.2.1 (13D15)
Report Version: 105
Exception Type: EXC_BREAKPOINT (SIGTRAP)
Exception Codes: 0x0000000000000001, 0x00000000e7ffdefe
Triggered by Thread: 0
Filtered syslog:
None found
Dyld Error Message:
Dyld Message: Library not loaded: @executable_path/libmineC.dylib
Referenced from: /var/mobile/Containers/Bundle/Application/0513A2D6-96EA-44FB-946A-15E54C0D4EBB/FiveNightsatFreddys.app/FiveNightsatFreddys
Reason: no suitable image found. Did find:
/var/mobile/Containers/Bundle/Application/0513A2D6-96EA-44FB-946A-15E54C0D4EBB/FiveNightsatFreddys.app/libmineC.dylib: mmap() error 22 at address=0x003D6000, size=0x00027000 segment=__DATA in Segment::map() mapping /var/mobile/Containers/Bundle/Application/0513A2D6-96EA-44FB-946A-15E54C0D4EBB/FiveNightsatFreddys.app/libmineC.dylib
/private/var/mobile/Containers/Bundle/Application/0513A2D6-96EA-44FB-946A-15E54C0D4EBB/FiveNightsatFreddys.app/libmineC.dylib: mmap() error 22 at address=0x00566000, size=0x00027000 segment=__DATA in Segment::map() mapping /private/var/mobile/Containers/Bundle/Application/0513A2D6-96EA-44FB-946A-15E54C0D4EBB/FiveNightsatFreddys.app/libmineC.dylib
Dyld Version: 370.6
Binary Images:
0xd8000 - 0x16bfff FiveNightsatFreddys armv7 <5ac584b1295a35469da5e81a8a4376b8> /var/mobile/Containers/Bundle/Application/0513A2D6-96EA-44FB-946A-15E54C0D4EBB/FiveNightsatFreddys.app/FiveNightsatFreddys
0x1fe90000 - 0x1feb7fff dyld armv7s /usr/lib/dyld
我自己分析了一下,发现我这个dylib要是针对的可执行文件是Fat binary类型的就不会报这个错,要是可执行文件是Thin binary类型就总报这个错,是什么原因呢?