objc-sel-table.s 931 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. #include <TargetConditionals.h>
  2. #include <mach/vm_param.h>
  3. #if __LP64__
  4. # define PTR(x) .quad x
  5. #else
  6. # define PTR(x) .long x
  7. #endif
  8. // These offsets are populated by the dyld shared cache builder.
  9. // They point to memory allocatd elsewhere in the shared cache.
  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. /* section of pointers that the shared cache optimizer wants to know about */
  23. .section __DATA,__objc_opt_ptrs
  24. .align 3
  25. #if TARGET_OS_OSX && __i386__
  26. // old ABI
  27. .globl .objc_class_name_Protocol
  28. PTR(.objc_class_name_Protocol)
  29. #else
  30. // new ABI
  31. .globl _OBJC_CLASS_$_Protocol
  32. PTR(_OBJC_CLASS_$_Protocol)
  33. #endif