6 # define LOGPTRSIZE "3"
10 # define LOGPTRSIZE "2"
13 #if __has_feature(ptrauth_calls)
14 # define SIGNED_METHOD_LIST_IMP "@AUTH(ia,0,addr) "
15 # define SIGNED_METHOD_LIST "@AUTH(da,0xC310,addr) "
16 # define SIGNED_ISA "@AUTH(da, 0x6AE1, addr) "
17 # define SIGNED_SUPER "@AUTH(da, 0xB5AB, addr) "
19 # define SIGNED_METHOD_LIST_IMP
20 # define SIGNED_METHOD_LIST
26 #define str2(x) str(x)
29 // not id to avoid ARC operations because the class doesn't implement RR methods
30 void* nop(void* self) { return self; }
34 ".globl _OBJC_CLASS_$_Super \n"
35 ".section __DATA,__objc_data \n"
37 "_OBJC_CLASS_$_Super: \n"
38 PTR "_OBJC_METACLASS_$_Super" SIGNED_ISA "\n"
40 PTR "__objc_empty_cache \n"
43 // pad to OBJC_MAX_CLASS_SIZE
72 "_OBJC_METACLASS_$_Super: \n"
73 PTR "_OBJC_METACLASS_$_Super" SIGNED_ISA "\n"
74 PTR "_OBJC_CLASS_$_Super" SIGNED_SUPER "\n"
75 PTR "__objc_empty_cache \n"
78 // pad to OBJC_MAX_CLASS_SIZE
110 ".long " PTRSIZE " \n"
115 PTR "L_super_name \n"
117 PTR "L_evil_methods" SIGNED_METHOD_LIST "\n"
119 PTR "L_good_methods" SIGNED_METHOD_LIST "\n"
122 PTR "L_super_ivars \n"
134 PTR "L_super_name \n"
136 PTR "L_evil_methods" SIGNED_METHOD_LIST "\n"
138 PTR "L_good_methods" SIGNED_METHOD_LIST "\n"
145 ".globl _OBJC_CLASS_$_Sub \n"
146 ".section __DATA,__objc_data \n"
148 "_OBJC_CLASS_$_Sub: \n"
149 PTR "_OBJC_METACLASS_$_Sub" SIGNED_ISA "\n"
150 PTR "_OBJC_CLASS_$_Super" SIGNED_SUPER "\n"
151 PTR "__objc_empty_cache \n"
154 // pad to OBJC_MAX_CLASS_SIZE
183 "_OBJC_METACLASS_$_Sub: \n"
184 PTR "_OBJC_METACLASS_$_Super" SIGNED_ISA "\n"
185 PTR "_OBJC_METACLASS_$_Super" SIGNED_SUPER "\n"
186 PTR "__objc_empty_cache \n"
188 PTR "L_sub_meta_ro \n"
189 // pad to OBJC_MAX_CLASS_SIZE
221 ".long " PTRSIZE " \n"
228 PTR "L_evil_methods" SIGNED_METHOD_LIST "\n"
230 PTR "L_good_methods" SIGNED_METHOD_LIST "\n"
247 PTR "L_evil_methods" SIGNED_METHOD_LIST "\n"
249 PTR "L_good_methods" SIGNED_METHOD_LIST "\n"
257 ".long 3*" PTRSIZE " \n"
261 PTR "_abort" SIGNED_METHOD_LIST_IMP "\n"
262 // assumes that abort is inside the dyld shared cache
265 ".long 3*" PTRSIZE " \n"
269 PTR "_nop" SIGNED_METHOD_LIST_IMP "\n"
272 PTR "_nop" SIGNED_METHOD_LIST_IMP "\n"
275 ".long 4*" PTRSIZE " \n"
277 PTR "L_super_ivar_offset \n"
278 PTR "L_super_ivar_name \n"
279 PTR "L_super_ivar_type \n"
280 ".long " LOGPTRSIZE " \n"
281 ".long " PTRSIZE " \n"
284 ".long 4*" PTRSIZE " \n"
286 PTR "L_sub_ivar_offset \n"
287 PTR "L_sub_ivar_name \n"
288 PTR "L_sub_ivar_type \n"
289 ".long " LOGPTRSIZE " \n"
290 ".long " PTRSIZE " \n"
292 "L_super_ivar_offset: \n"
294 "L_sub_ivar_offset: \n"
295 ".long " PTRSIZE " \n"
298 "L_super_name: .ascii \"Super\\0\" \n"
299 "L_sub_name: .ascii \"Sub\\0\" \n"
300 "L_load: .ascii \"load\\0\" \n"
301 "L_self: .ascii \"self\\0\" \n"
302 "L_super_ivar_name: .ascii \"super_ivar\\0\" \n"
303 "L_super_ivar_type: .ascii \"c\\0\" \n"
304 "L_sub_ivar_name: .ascii \"sub_ivar\\0\" \n"
305 "L_sub_ivar_type: .ascii \"@\\0\" \n"
308 ".section __DATA,__objc_classlist \n"
310 PTR "_OBJC_CLASS_$_Super \n"
313 PTR "_OBJC_CLASS_$_Sub \n"
316 ".section __DATA,__objc_nlclslist \n"
318 PTR "_OBJC_CLASS_$_Super \n"
321 PTR "_OBJC_CLASS_$_Sub \n"