]> git.saurik.com Git - apple/objc4.git/blob - runtime/objc-sel-table.s
objc4-756.2.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=1048576, blen/mask=524287+1 */
24 .space 4*(8+256) /* header and scramble */
25 .space 524288 /* mask tab */
26 .space 1048576 /* checkbytes */
27 .space 1048576*4 /* offsets */
28
29 /* space for clsopt, smax/capacity=131072, blen/mask=32767+1 */
30 .space 4*(8+256) /* header and scramble */
31 .space 32768 /* mask tab */
32 .space 131072 /* checkbytes */
33 .space 131072*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 2048 header_info (RO) structures */
46 .space 8 + (2048*16)
47
48
49 .section __DATA,__objc_opt_rw
50 .align 3
51 .private_extern __objc_opt_rw_data
52 __objc_opt_rw_data:
53
54 /* space for 2048 header_info (RW) structures */
55 .space 8 + (2048*8)
56
57 /* space for 16384 protocols */
58 #if __LP64__
59 .space 16384 * 12 * 8
60 #else
61 .space 16384 * 12 * 4
62 #endif
63
64
65 /* section of pointers that the shared cache optimizer wants to know about */
66 .section __DATA,__objc_opt_ptrs
67 .align 3
68
69 #if TARGET_OS_OSX && __i386__
70 // old ABI
71 .globl .objc_class_name_Protocol
72 PTR(.objc_class_name_Protocol)
73 #else
74 // new ABI
75 .globl _OBJC_CLASS_$_Protocol
76 PTR(_OBJC_CLASS_$_Protocol)
77 #endif