]> git.saurik.com Git - apple/objc4.git/blob - runtime/objc-sel-table.s
objc4-723.tar.gz
[apple/objc4.git] / runtime / objc-sel-table.s
1 #include <TargetConditionals.h>
2 #include <mach/vm_param.h>
3
4 #if __LP64__
5 # define PTR(x) .quad x
6 #else
7 # define PTR(x) .long x
8 #endif
9
10 .section __TEXT,__objc_opt_ro
11 .align 3
12 .private_extern __objc_opt_data
13 __objc_opt_data:
14 .long 15 /* table.version */
15 .long 0 /* table.flags */
16 .long 0 /* table.selopt_offset */
17 .long 0 /* table.headeropt_ro_offset */
18 .long 0 /* table.clsopt_offset */
19 .long 0 /* table.protocolopt_offset */
20 .long 0 /* table.headeropt_rw_offset */
21 .space PAGE_MAX_SIZE-28
22
23 /* space for selopt, smax/capacity=524288, blen/mask=262143+1 */
24 .space 4*(8+256) /* header and scramble */
25 .space 262144 /* mask tab */
26 .space 524288 /* checkbytes */
27 .space 524288*4 /* offsets */
28
29 /* space for clsopt, smax/capacity=65536, blen/mask=16383+1 */
30 .space 4*(8+256) /* header and scramble */
31 .space 16384 /* mask tab */
32 .space 65536 /* checkbytes */
33 .space 65536*12 /* offsets to name and class and header_info */
34 .space 512*8 /* some duplicate classes */
35
36 /* space for some demangled protocol names */
37 .space 1024
38
39 /* space for protocolopt, smax/capacity=16384, blen/mask=8191+1 */
40 .space 4*(8+256) /* header and scramble */
41 .space 8192 /* mask tab */
42 .space 16384 /* checkbytes */
43 .space 16384*8 /* offsets */
44
45 /* space for header_info (RO) structures */
46 .space 16384
47
48
49 .section __DATA,__objc_opt_rw
50 .align 3
51 .private_extern __objc_opt_rw_data
52 __objc_opt_rw_data:
53 /* space for header_info (RW) structures */
54 .space 16384
55
56 /* space for 16384 protocols */
57 #if __LP64__
58 .space 16384 * 12 * 8
59 #else
60 .space 16384 * 12 * 4
61 #endif
62
63
64 /* section of pointers that the shared cache optimizer wants to know about */
65 .section __DATA,__objc_opt_ptrs
66 .align 3
67
68 #if TARGET_OS_OSX && __i386__
69 // old ABI
70 .globl .objc_class_name_Protocol
71 PTR(.objc_class_name_Protocol)
72 #else
73 // new ABI
74 .globl _OBJC_CLASS_$_Protocol
75 PTR(_OBJC_CLASS_$_Protocol)
76 #endif