6 # define LOGPTRSIZE "3"
10 # define LOGPTRSIZE "2"
13 #if __has_feature(ptrauth_calls)
14 # define SIGNED_METHOD_LIST_IMP "@AUTH(ia,0,addr) "
16 # define SIGNED_METHOD_LIST_IMP
20 #define str2(x) str(x)
23 // not id to avoid ARC operations because the class doesn't implement RR methods
24 void* nop(void* self) { return self; }
28 ".globl _OBJC_CLASS_$_Super \n"
29 ".section __DATA,__objc_data \n"
31 "_OBJC_CLASS_$_Super: \n"
32 PTR "_OBJC_METACLASS_$_Super \n"
34 PTR "__objc_empty_cache \n"
37 // pad to OBJC_MAX_CLASS_SIZE
66 "_OBJC_METACLASS_$_Super: \n"
67 PTR "_OBJC_METACLASS_$_Super \n"
68 PTR "_OBJC_CLASS_$_Super \n"
69 PTR "__objc_empty_cache \n"
72 // pad to OBJC_MAX_CLASS_SIZE
109 PTR "L_super_name \n"
111 PTR "L_evil_methods \n"
113 PTR "L_good_methods \n"
116 PTR "L_super_ivars \n"
128 PTR "L_super_name \n"
130 PTR "L_evil_methods \n"
132 PTR "L_good_methods \n"
139 ".globl _OBJC_CLASS_$_Sub \n"
140 ".section __DATA,__objc_data \n"
142 "_OBJC_CLASS_$_Sub: \n"
143 PTR "_OBJC_METACLASS_$_Sub \n"
144 PTR "_OBJC_CLASS_$_Super \n"
145 PTR "__objc_empty_cache \n"
148 // pad to OBJC_MAX_CLASS_SIZE
177 "_OBJC_METACLASS_$_Sub: \n"
178 PTR "_OBJC_METACLASS_$_Super \n"
179 PTR "_OBJC_METACLASS_$_Super \n"
180 PTR "__objc_empty_cache \n"
182 PTR "L_sub_meta_ro \n"
183 // pad to OBJC_MAX_CLASS_SIZE
222 PTR "L_evil_methods \n"
224 PTR "L_good_methods \n"
241 PTR "L_evil_methods \n"
243 PTR "L_good_methods \n"
251 ".long 3*"PTRSIZE" \n"
255 PTR "_abort" SIGNED_METHOD_LIST_IMP "\n"
256 // assumes that abort is inside the dyld shared cache
259 ".long 3*"PTRSIZE" \n"
263 PTR "_nop" SIGNED_METHOD_LIST_IMP "\n"
266 PTR "_nop" SIGNED_METHOD_LIST_IMP "\n"
269 ".long 4*"PTRSIZE" \n"
271 PTR "L_super_ivar_offset \n"
272 PTR "L_super_ivar_name \n"
273 PTR "L_super_ivar_type \n"
274 ".long "LOGPTRSIZE" \n"
278 ".long 4*"PTRSIZE" \n"
280 PTR "L_sub_ivar_offset \n"
281 PTR "L_sub_ivar_name \n"
282 PTR "L_sub_ivar_type \n"
283 ".long "LOGPTRSIZE" \n"
286 "L_super_ivar_offset: \n"
288 "L_sub_ivar_offset: \n"
292 "L_super_name: .ascii \"Super\\0\" \n"
293 "L_sub_name: .ascii \"Sub\\0\" \n"
294 "L_load: .ascii \"load\\0\" \n"
295 "L_self: .ascii \"self\\0\" \n"
296 "L_super_ivar_name: .ascii \"super_ivar\\0\" \n"
297 "L_super_ivar_type: .ascii \"c\\0\" \n"
298 "L_sub_ivar_name: .ascii \"sub_ivar\\0\" \n"
299 "L_sub_ivar_type: .ascii \"@\\0\" \n"
302 ".section __DATA,__objc_classlist \n"
304 PTR "_OBJC_CLASS_$_Super \n"
307 PTR "_OBJC_CLASS_$_Sub \n"
310 ".section __DATA,__objc_nlclslist \n"
312 PTR "_OBJC_CLASS_$_Super \n"
315 PTR "_OBJC_CLASS_$_Sub \n"