Closed lingjf closed 4 years ago
otool -x a.11.3.out
otool -x a.10.3.out
比较两个otool的输出发现text段的maxprot不一样分别是rx,rwx。
man ld
-segprot segname max_prot init_prot
Specifies the maximum and initial virtual memory protection of the named segment, name, to be max and init ,respectively.
The values for max and init are any combination of the characters r' (for read),
w' (for write), x' (for execute) and
-'
(no access).
-Wl,-segprot,__TEXT,rwx,rwx 加入Linker选项,解决问题。
STUB/MOCK not works with xcode 11.3 toolchain, but works with xcode 10.3.