peachsim 0.1.1692 → 0.1.1716

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (991) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +59 -3
  3. package/cli/app-bundle-resources.ts +3 -1
  4. package/cli/app-catalog.ts +10 -0
  5. package/cli/app-fonts.ts +1 -1
  6. package/cli/app-stubs.ts +19 -9
  7. package/cli/bridge-diagnostics.ts +2 -1
  8. package/cli/bridge-flow-runner.ts +61 -39
  9. package/cli/cloud-client.ts +6 -3
  10. package/cli/commands/agent-wrapper.ts +21 -10
  11. package/cli/commands/control.ts +149 -46
  12. package/cli/commands/coverage-swift.ts +19 -1
  13. package/cli/commands/coverage.ts +1 -1
  14. package/cli/commands/detect.ts +85 -25
  15. package/cli/commands/doctor.ts +159 -20
  16. package/cli/commands/flow.ts +4 -1
  17. package/cli/commands/inspect/core.ts +176 -17
  18. package/cli/commands/inspect/settling.ts +17 -5
  19. package/cli/commands/inspect/wait-ready.ts +7 -5
  20. package/cli/commands/inspect.ts +8 -2
  21. package/cli/commands/maestro-compare.ts +25 -99
  22. package/cli/commands/record.ts +263 -32
  23. package/cli/commands/screenshot.ts +2 -13
  24. package/cli/commands/test.ts +49 -101
  25. package/cli/current-sim.ts +4 -4
  26. package/cli/help-core.ts +3 -4
  27. package/cli/hints.ts +1 -6
  28. package/cli/maestro-compare.ts +172 -4
  29. package/cli/main.ts +8 -1
  30. package/cli/metro-bundle-assets.ts +77 -0
  31. package/cli/outbound-endpoints.ts +8 -12
  32. package/cli/run-registry.ts +0 -8
  33. package/cli/scene-video.ts +5 -3
  34. package/cli/ws-bridge.ts +56 -14
  35. package/detox/index.ts +76 -3
  36. package/detox/launch-permissions.ts +325 -0
  37. package/dist-lib/agent-daemon-client.cjs +2 -2
  38. package/dist-lib/agent-events.cjs +2 -2
  39. package/dist-lib/attached-projects.cjs +2 -2
  40. package/dist-lib/auth/shared-session.cjs +2 -2
  41. package/dist-lib/backend-origin.cjs +11 -10
  42. package/dist-lib/beta.cjs +2 -2
  43. package/dist-lib/beta.mjs +1 -1
  44. package/dist-lib/bridge-constants.cjs +6 -2
  45. package/dist-lib/bridge-contract-input.cjs +2 -2
  46. package/dist-lib/bridge-contract-input.mjs +1 -1
  47. package/dist-lib/bridge-contract.cjs +2 -2
  48. package/dist-lib/bridge-contract.mjs +1 -1
  49. package/dist-lib/bundle-channel.cjs +26769 -24228
  50. package/dist-lib/capture-contract.cjs +2 -2
  51. package/dist-lib/capture-contract.mjs +1 -1
  52. package/dist-lib/cloud-contract.cjs +2 -2
  53. package/dist-lib/cloud-contract.mjs +1 -1
  54. package/dist-lib/cloud-test-args.cjs +2 -2
  55. package/dist-lib/cloud-test-args.mjs +1 -1
  56. package/dist-lib/cloud.cjs +3 -2
  57. package/dist-lib/cloud.mjs +2 -1
  58. package/dist-lib/config.cjs +2 -2
  59. package/dist-lib/config.mjs +1 -1
  60. package/dist-lib/detox/index.cjs +256 -14
  61. package/dist-lib/dev-bundle-resolution.cjs +209 -51
  62. package/dist-lib/expo-swift-bundle.cjs +10795 -17575
  63. package/dist-lib/expo-swift-metadata.cjs +2 -2
  64. package/dist-lib/expo-swift-metadata.mjs +1 -1
  65. package/dist-lib/home-paths.cjs +2 -2
  66. package/dist-lib/host/bridge-host.cjs +36893 -31765
  67. package/dist-lib/host/fetch-proxy-handler.cjs +796 -114
  68. package/dist-lib/host/fetch-proxy-overrides.cjs +2 -2
  69. package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
  70. package/dist-lib/host/replacement-module-handler.cjs +3 -2
  71. package/dist-lib/host/websocket-proxy.cjs +312 -46
  72. package/dist-lib/index.cjs +2244 -642
  73. package/dist-lib/jump-to-source-babel.cjs +2 -2
  74. package/dist-lib/jump-to-source-native.cjs +2 -2
  75. package/dist-lib/kotlin-host.cjs +2 -2
  76. package/dist-lib/menu.cjs +5 -2
  77. package/dist-lib/menu.mjs +3 -1
  78. package/dist-lib/metro-fingerprint-registry.cjs +2 -2
  79. package/dist-lib/metro-fingerprint-registry.mjs +1 -1
  80. package/dist-lib/metro-production-bundle.cjs +2 -2
  81. package/dist-lib/metro-production-bundle.mjs +1 -1
  82. package/dist-lib/metro.cjs +2088 -612
  83. package/dist-lib/native-app-identity-project.cjs +863 -232
  84. package/dist-lib/native-app-identity-project.mjs +871 -234
  85. package/dist-lib/native-app-identity.cjs +15 -2
  86. package/dist-lib/native-app-identity.mjs +12 -1
  87. package/dist-lib/native-firebase-metadata.cjs +2 -2
  88. package/dist-lib/native-firebase-metadata.mjs +1 -1
  89. package/dist-lib/plist.cjs +2 -2
  90. package/dist-lib/plist.mjs +1 -1
  91. package/dist-lib/profiles.cjs +2 -2
  92. package/dist-lib/public-brand.cjs +2 -2
  93. package/dist-lib/public-origins-lib-esm.json +31 -100
  94. package/dist-lib/public-origins-lib.json +449 -453
  95. package/dist-lib/react-native-host-modules.cjs +98 -4
  96. package/dist-lib/react-native-host-modules.mjs +96 -3
  97. package/dist-lib/reap-browser.cjs +2 -2
  98. package/dist-lib/scripts/dev-server-scanner.cjs +225 -75
  99. package/dist-lib/sdk.cjs +146 -19
  100. package/dist-lib/sdk.mjs +139 -18
  101. package/dist-lib/skills.cjs +53577 -48467
  102. package/dist-lib/swift-compile.cjs +6111 -16733
  103. package/dist-lib/swift-compile.mjs +6052 -16681
  104. package/dist-lib/swift-package.cjs +104 -22
  105. package/dist-lib/swift-package.mjs +99 -21
  106. package/dist-lib/swift-submit.cjs +15 -5
  107. package/dist-lib/swift-submit.mjs +14 -4
  108. package/dist-lib/swift-toolchain.cjs +42 -13
  109. package/dist-lib/swift.cjs +2 -2
  110. package/dist-lib/vite-swift.cjs +13416 -21189
  111. package/dist-lib/vite.cjs +790 -157
  112. package/dist-lib/worklet-executable.cjs +2 -2
  113. package/dist-lib/worklet-executable.mjs +1 -1
  114. package/dist-types/packages/peach-compat/src/stubs/native-seams/react-native-gesture-handler.d.ts +2 -0
  115. package/dist-types/packages/peach-compat/src/stubs/screen-transition-math.d.ts +1 -1
  116. package/dist-types/packages/peach-engine/src/capture/lockstep-clockContract.d.ts +1 -0
  117. package/dist-types/packages/peach-engine/src/engine/fiber-debug-metadata.d.ts +4 -0
  118. package/dist-types/packages/peach-engine/src/engine/font-config.d.ts +2 -2
  119. package/dist-types/packages/peach-engine/src/engine/fontDataContract.d.ts +1 -0
  120. package/dist-types/packages/peach-engine/src/engine/image-loader.d.ts +2 -0
  121. package/dist-types/packages/peach-engine/src/engine/lottie-types.d.ts +3 -0
  122. package/dist-types/packages/peach-engine/src/engine/node.d.ts +6 -3
  123. package/dist-types/packages/peach-engine/src/engine/riveContract.d.ts +5 -0
  124. package/dist-types/packages/peach-engine/src/engine/scroll-pan-contacts.d.ts +3 -1
  125. package/dist-types/packages/peach-engine/src/engine/scroll.d.ts +7 -0
  126. package/dist-types/packages/peach-engine/src/engine/types.d.ts +2 -1
  127. package/dist-types/packages/peach-engine/src/guest-module-overrides.d.ts +3 -0
  128. package/dist-types/packages/peach-engine/src/ios/chrome-metrics.d.ts +2 -1
  129. package/dist-types/packages/peach-engine/src/permissions/system-permission-types.d.ts +2 -1
  130. package/dist-types/packages/peach-engine/src/react-native/host-services.d.ts +1 -0
  131. package/dist-types/packages/peach-engine/src/react-native/platform-colors.d.ts +1 -0
  132. package/dist-types/packages/peach-engine/src/remote-stream/cloud-display.d.ts +6 -2
  133. package/dist-types/packages/peach-engine/src/remote-stream/scene-recording.d.ts +4 -0
  134. package/dist-types/packages/peach-engine/src/render-worker/compositor-protocol.d.ts +16 -0
  135. package/dist-types/packages/peach-engine/src/render-worker/host-service-protocol.d.ts +18 -2
  136. package/dist-types/packages/peach-engine/src/render-worker/live-frame-mirror.d.ts +11 -0
  137. package/dist-types/packages/peach-engine/src/render-worker/native-ui-protocol.d.ts +10 -1
  138. package/dist-types/packages/peach-engine/src/render-worker/protocol.d.ts +11 -0
  139. package/dist-types/packages/peach-engine/src/render-worker/scroll-mirror.d.ts +17 -0
  140. package/dist-types/packages/peach-engine/src/render-worker/shell-protocol.d.ts +5 -0
  141. package/dist-types/packages/peach-engine/src/render-worker/shell-tree-wire.d.ts +5 -0
  142. package/dist-types/packages/peach-engine/src/render-worker/tree-sync-port.d.ts +5 -0
  143. package/dist-types/packages/peach-engine/src/render-worker/worker-input-runtime.d.ts +2 -1
  144. package/dist-types/packages/peach-engine/src/render-worker/worklet-runtime-kind.d.ts +5 -1
  145. package/dist-types/packages/peach-engine/src/render-worker/worklet-runtime.d.ts +9 -4
  146. package/dist-types/packages/peach-engine/src/render-worker/workletThreadIdentityContract.d.ts +4 -0
  147. package/dist-types/packages/peach-globals/src/cameraBridgeContract.d.ts +1 -0
  148. package/dist-types/packages/peach-globals/src/guestExecutionContract.d.ts +30 -0
  149. package/dist-types/packages/peach-globals/src/index.d.ts +6 -4
  150. package/dist-types/packages/peach-globals/src/nativeBuildOptionsContract.d.ts +1 -0
  151. package/dist-types/packages/peach-globals/src/permissionsBridgeContract.d.ts +11 -0
  152. package/dist-types/packages/peach-globals/src/recordingBridgeContract.d.ts +22 -1
  153. package/dist-types/packages/peach-globals/src/replayBridgeContract.d.ts +1 -0
  154. package/dist-types/packages/peach-globals/src/sceneStreamBridgeContract.d.ts +10 -0
  155. package/dist-types/packages/peach-globals/src/shellHostBridgeContract.d.ts +9 -0
  156. package/dist-types/packages/peach-globals/src/testBridgeContract.d.ts +3 -0
  157. package/dist-types/packages/peach-kit/src/capabilities.d.ts +1 -0
  158. package/dist-types/packages/peach-kit/src/materials/types.d.ts +1 -0
  159. package/package.json +3 -1
  160. package/runtime-companion.json +1 -1
  161. package/scripts/dev-server-scanner.ts +61 -70
  162. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vImage.framework/Headers/Alpha.h +2282 -0
  163. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vImage.framework/Headers/BasicImageTypes.h +55 -0
  164. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vImage.framework/Headers/Conversion.h +10551 -6
  165. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vImage.framework/Headers/Convolution.h +4236 -3
  166. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vImage.framework/Headers/Geometry.h +827 -8
  167. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vImage.framework/Headers/Histogram.h +1369 -0
  168. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vImage.framework/Headers/Morphology.h +1243 -0
  169. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vImage.framework/Headers/Transform.h +1747 -0
  170. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vImage.framework/Headers/vImage.h +291 -2
  171. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vImage.framework/Headers/vImage_CVUtilities.h +1283 -0
  172. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vImage.framework/Headers/vImage_Types.h +811 -91
  173. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vImage.framework/Headers/vImage_Utilities.h +1342 -25
  174. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/BNNS/bnns.h +2738 -0
  175. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/BNNS/bnns_constants.h +1685 -0
  176. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/BNNS/bnns_graph.h +913 -0
  177. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/BNNS/bnns_structures.h +1917 -0
  178. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/LinearAlgebra/LinearAlgebra.h +23 -0
  179. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/LinearAlgebra/arithmetic.h +209 -0
  180. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/LinearAlgebra/base.h +104 -0
  181. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/LinearAlgebra/linear_systems.h +77 -0
  182. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/LinearAlgebra/matrix.h +554 -0
  183. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/LinearAlgebra/norms.h +58 -0
  184. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/LinearAlgebra/object.h +186 -0
  185. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/LinearAlgebra/splat.h +86 -0
  186. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/LinearAlgebra/vector.h +364 -0
  187. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/Quadrature/Integration.h +195 -0
  188. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/Quadrature/Quadrature.h +44 -0
  189. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/Sparse/BLAS/BLAS.h +2330 -0
  190. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/Sparse/BLAS/Types.h +123 -0
  191. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/Sparse/Solve.h +8339 -0
  192. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/Sparse/SolveImplementation.h +520 -0
  193. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/Sparse/SolveImplementationTyped.h +1893 -0
  194. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/Sparse/Sparse.h +10 -0
  195. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/blas_new.h +1098 -0
  196. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/cblas.h +859 -0
  197. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/cblas_new.h +1134 -0
  198. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/clapack.h +10555 -0
  199. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/fortran_blas.h +695 -0
  200. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/lapack.h +38526 -0
  201. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/lapack_types.h +60 -0
  202. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/lapack_version.h +20 -0
  203. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/thread_api.h +50 -0
  204. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/vBasicOps.h +1218 -0
  205. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/vBigNum.h +1458 -0
  206. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/vDSP.h +10377 -0
  207. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/vDSP_translate.h +167 -0
  208. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/vForce.h +1243 -0
  209. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/vecLib.h +114 -0
  210. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/vecLibTypes.h +146 -0
  211. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/vectorOps.h +1106 -0
  212. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/vfp.h +294 -0
  213. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Headers/Accelerate.h +25 -1
  214. package/sdk/ios/System/Library/Frameworks/CoreBluetooth.framework/Headers/CBATTRequest.h +69 -0
  215. package/sdk/ios/System/Library/Frameworks/CoreBluetooth.framework/Headers/CBAdvertisementData.h +94 -0
  216. package/sdk/ios/System/Library/Frameworks/CoreBluetooth.framework/Headers/CBAttribute.h +34 -0
  217. package/sdk/ios/System/Library/Frameworks/CoreBluetooth.framework/Headers/CBCentral.h +41 -0
  218. package/sdk/ios/System/Library/Frameworks/CoreBluetooth.framework/Headers/CBCentralManager.h +394 -0
  219. package/sdk/ios/System/Library/Frameworks/CoreBluetooth.framework/Headers/CBCentralManagerConstants.h +224 -0
  220. package/sdk/ios/System/Library/Frameworks/CoreBluetooth.framework/Headers/CBCharacteristic.h +187 -0
  221. package/sdk/ios/System/Library/Frameworks/CoreBluetooth.framework/Headers/CBDefines.h +16 -0
  222. package/sdk/ios/System/Library/Frameworks/CoreBluetooth.framework/Headers/CBDescriptor.h +78 -0
  223. package/sdk/ios/System/Library/Frameworks/CoreBluetooth.framework/Headers/CBError.h +75 -0
  224. package/sdk/ios/System/Library/Frameworks/CoreBluetooth.framework/Headers/CBL2CAPChannel.h +50 -0
  225. package/sdk/ios/System/Library/Frameworks/CoreBluetooth.framework/Headers/CBManager.h +88 -0
  226. package/sdk/ios/System/Library/Frameworks/CoreBluetooth.framework/Headers/CBPeer.h +28 -0
  227. package/sdk/ios/System/Library/Frameworks/CoreBluetooth.framework/Headers/CBPeripheral.h +530 -0
  228. package/sdk/ios/System/Library/Frameworks/CoreBluetooth.framework/Headers/CBPeripheralManager.h +489 -0
  229. package/sdk/ios/System/Library/Frameworks/CoreBluetooth.framework/Headers/CBPeripheralManagerConstants.h +63 -0
  230. package/sdk/ios/System/Library/Frameworks/CoreBluetooth.framework/Headers/CBService.h +100 -0
  231. package/sdk/ios/System/Library/Frameworks/CoreBluetooth.framework/Headers/CBUUID.h +144 -0
  232. package/sdk/ios/System/Library/Frameworks/CoreBluetooth.framework/Headers/CoreBluetooth.apinotes +7 -0
  233. package/sdk/ios/System/Library/Frameworks/CoreBluetooth.framework/Headers/CoreBluetooth.h +32 -0
  234. package/sdk/ios/System/Library/Frameworks/CoreBluetooth.framework/Modules/module.modulemap +5 -0
  235. package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFArray.h +673 -0
  236. package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFAvailability.h +232 -0
  237. package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFBase.h +827 -0
  238. package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFCGTypes.h +131 -0
  239. package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFCalendar.h +121 -0
  240. package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFCharacterSet.h +387 -0
  241. package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFData.h +79 -0
  242. package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFDate.h +122 -0
  243. package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFDictionary.h +674 -0
  244. package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFError.h +182 -0
  245. package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFLocale.h +213 -0
  246. package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFNotificationCenter.h +82 -0
  247. package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFNumber.h +129 -0
  248. package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFSet.h +491 -0
  249. package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFString.h +883 -2
  250. package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFTimeZone.h +98 -0
  251. package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h +13 -223
  252. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGBase.h +359 -2
  253. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGGeometry.h +328 -0
  254. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.h +3 -66
  255. package/sdk/ios/System/Library/Frameworks/CoreNFC.framework/Headers/CoreNFC.apinotes +258 -0
  256. package/sdk/ios/System/Library/Frameworks/CoreNFC.framework/Headers/CoreNFC.h +31 -0
  257. package/sdk/ios/System/Library/Frameworks/CoreNFC.framework/Headers/NFCError.h +103 -0
  258. package/sdk/ios/System/Library/Frameworks/CoreNFC.framework/Headers/NFCFeliCaTag.h +267 -0
  259. package/sdk/ios/System/Library/Frameworks/CoreNFC.framework/Headers/NFCISO15693ReaderSession.h +59 -0
  260. package/sdk/ios/System/Library/Frameworks/CoreNFC.framework/Headers/NFCISO15693Tag.h +739 -0
  261. package/sdk/ios/System/Library/Frameworks/CoreNFC.framework/Headers/NFCISO7816Tag.h +159 -0
  262. package/sdk/ios/System/Library/Frameworks/CoreNFC.framework/Headers/NFCMiFareTag.h +94 -0
  263. package/sdk/ios/System/Library/Frameworks/CoreNFC.framework/Headers/NFCNDEFMessage.h +60 -0
  264. package/sdk/ios/System/Library/Frameworks/CoreNFC.framework/Headers/NFCNDEFPayload.h +121 -0
  265. package/sdk/ios/System/Library/Frameworks/CoreNFC.framework/Headers/NFCNDEFReaderSession.h +169 -0
  266. package/sdk/ios/System/Library/Frameworks/CoreNFC.framework/Headers/NFCNDEFTag.h +93 -0
  267. package/sdk/ios/System/Library/Frameworks/CoreNFC.framework/Headers/NFCPaymentTagReaderSession.h +58 -0
  268. package/sdk/ios/System/Library/Frameworks/CoreNFC.framework/Headers/NFCReaderSession.h +156 -0
  269. package/sdk/ios/System/Library/Frameworks/CoreNFC.framework/Headers/NFCTag.h +127 -0
  270. package/sdk/ios/System/Library/Frameworks/CoreNFC.framework/Headers/NFCTagReaderSession.h +201 -0
  271. package/sdk/ios/System/Library/Frameworks/CoreNFC.framework/Headers/NFCVASReaderSession.h +237 -0
  272. package/sdk/ios/System/Library/Frameworks/CoreNFC.framework/Headers/NSUserActivity+CoreNFC.h +35 -0
  273. package/sdk/ios/System/Library/Frameworks/CoreNFC.framework/Modules/module.modulemap +21 -0
  274. package/sdk/ios/System/Library/Frameworks/CoreTelephony.framework/Headers/CTCall.h +53 -0
  275. package/sdk/ios/System/Library/Frameworks/CoreTelephony.framework/Headers/CTCallCenter.h +45 -0
  276. package/sdk/ios/System/Library/Frameworks/CoreTelephony.framework/Headers/CTCarrier.h +87 -0
  277. package/sdk/ios/System/Library/Frameworks/CoreTelephony.framework/Headers/CTCellularData.h +39 -0
  278. package/sdk/ios/System/Library/Frameworks/CoreTelephony.framework/Headers/CTCellularPlanProperties.h +46 -0
  279. package/sdk/ios/System/Library/Frameworks/CoreTelephony.framework/Headers/CTCellularPlanProvisioning.h +33 -0
  280. package/sdk/ios/System/Library/Frameworks/CoreTelephony.framework/Headers/CTCellularPlanProvisioningRequest.h +36 -0
  281. package/sdk/ios/System/Library/Frameworks/CoreTelephony.framework/Headers/CTCellularPlanStatus.h +57 -0
  282. package/sdk/ios/System/Library/Frameworks/CoreTelephony.framework/Headers/CTQuickSwitch.h +53 -0
  283. package/sdk/ios/System/Library/Frameworks/CoreTelephony.framework/Headers/CTSubscriber.h +107 -0
  284. package/sdk/ios/System/Library/Frameworks/CoreTelephony.framework/Headers/CTSubscriberInfo.h +34 -0
  285. package/sdk/ios/System/Library/Frameworks/CoreTelephony.framework/Headers/CTTelephonyNetworkInfo.h +161 -0
  286. package/sdk/ios/System/Library/Frameworks/CoreTelephony.framework/Headers/CoreTelephonyDefines.h +39 -0
  287. package/sdk/ios/System/Library/Frameworks/CoreTelephony.framework/Modules/module.modulemap +5 -0
  288. package/sdk/ios/System/Library/Frameworks/CoreText.framework/Headers/CTDefines.h +92 -0
  289. package/sdk/ios/System/Library/Frameworks/CoreText.framework/Headers/CTFontDescriptor.h +634 -0
  290. package/sdk/ios/System/Library/Frameworks/CoreText.framework/Headers/CTFontTraits.h +118 -0
  291. package/sdk/ios/System/Library/Frameworks/CoreText.framework/Headers/CoreText.h +1 -0
  292. package/sdk/ios/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes +2497 -0
  293. package/sdk/ios/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h +2900 -370
  294. package/sdk/ios/System/Library/Frameworks/GameKit.framework/Headers/GKAccessPoint.h +110 -0
  295. package/sdk/ios/System/Library/Frameworks/GameKit.framework/Headers/GKAchievement.h +64 -0
  296. package/sdk/ios/System/Library/Frameworks/GameKit.framework/Headers/GKAchievementDescription.h +88 -0
  297. package/sdk/ios/System/Library/Frameworks/GameKit.framework/Headers/GKAchievementViewController.h +30 -0
  298. package/sdk/ios/System/Library/Frameworks/GameKit.framework/Headers/GKBasePlayer.h +15 -0
  299. package/sdk/ios/System/Library/Frameworks/GameKit.framework/Headers/GKChallenge.h +199 -0
  300. package/sdk/ios/System/Library/Frameworks/GameKit.framework/Headers/GKChallengeDefinition.h +71 -0
  301. package/sdk/ios/System/Library/Frameworks/GameKit.framework/Headers/GKChallengeEventHandler.h +43 -0
  302. package/sdk/ios/System/Library/Frameworks/GameKit.framework/Headers/GKChallengesViewController.h +33 -0
  303. package/sdk/ios/System/Library/Frameworks/GameKit.framework/Headers/GKCloudPlayer.h +19 -0
  304. package/sdk/ios/System/Library/Frameworks/GameKit.framework/Headers/GKDefines.h +17 -0
  305. package/sdk/ios/System/Library/Frameworks/GameKit.framework/Headers/GKDialogController.h +35 -0
  306. package/sdk/ios/System/Library/Frameworks/GameKit.framework/Headers/GKError.h +52 -0
  307. package/sdk/ios/System/Library/Frameworks/GameKit.framework/Headers/GKEventListener.h +36 -0
  308. package/sdk/ios/System/Library/Frameworks/GameKit.framework/Headers/GKFriendRequestComposeViewController.h +60 -0
  309. package/sdk/ios/System/Library/Frameworks/GameKit.framework/Headers/GKGameActivity.h +201 -0
  310. package/sdk/ios/System/Library/Frameworks/GameKit.framework/Headers/GKGameActivityDefinition.h +98 -0
  311. package/sdk/ios/System/Library/Frameworks/GameKit.framework/Headers/GKGameActivityListener.h +28 -0
  312. package/sdk/ios/System/Library/Frameworks/GameKit.framework/Headers/GKGameActivityPlayStyle.h +17 -0
  313. package/sdk/ios/System/Library/Frameworks/GameKit.framework/Headers/GKGameActivityState.h +22 -0
  314. package/sdk/ios/System/Library/Frameworks/GameKit.framework/Headers/GKGameCenterViewController.h +102 -0
  315. package/sdk/ios/System/Library/Frameworks/GameKit.framework/Headers/GKGameSession.h +87 -0
  316. package/sdk/ios/System/Library/Frameworks/GameKit.framework/Headers/GKGameSessionError.h +26 -0
  317. package/sdk/ios/System/Library/Frameworks/GameKit.framework/Headers/GKGameSessionEventListener.h +25 -0
  318. package/sdk/ios/System/Library/Frameworks/GameKit.framework/Headers/GKGameSessionSharingViewController.h +33 -0
  319. package/sdk/ios/System/Library/Frameworks/GameKit.framework/Headers/GKLeaderboard.h +205 -0
  320. package/sdk/ios/System/Library/Frameworks/GameKit.framework/Headers/GKLeaderboardEntry.h +23 -0
  321. package/sdk/ios/System/Library/Frameworks/GameKit.framework/Headers/GKLeaderboardScore.h +25 -0
  322. package/sdk/ios/System/Library/Frameworks/GameKit.framework/Headers/GKLeaderboardSet.h +64 -0
  323. package/sdk/ios/System/Library/Frameworks/GameKit.framework/Headers/GKLeaderboardViewController.h +34 -0
  324. package/sdk/ios/System/Library/Frameworks/GameKit.framework/Headers/GKLocalPlayer.h +321 -0
  325. package/sdk/ios/System/Library/Frameworks/GameKit.framework/Headers/GKMatch.h +94 -0
  326. package/sdk/ios/System/Library/Frameworks/GameKit.framework/Headers/GKMatchmaker.h +229 -0
  327. package/sdk/ios/System/Library/Frameworks/GameKit.framework/Headers/GKMatchmakerViewController.h +100 -0
  328. package/sdk/ios/System/Library/Frameworks/GameKit.framework/Headers/GKNotificationBanner.h +20 -0
  329. package/sdk/ios/System/Library/Frameworks/GameKit.framework/Headers/GKPeerPickerController.h +93 -0
  330. package/sdk/ios/System/Library/Frameworks/GameKit.framework/Headers/GKPlayer.h +82 -0
  331. package/sdk/ios/System/Library/Frameworks/GameKit.framework/Headers/GKPublicConstants.h +57 -0
  332. package/sdk/ios/System/Library/Frameworks/GameKit.framework/Headers/GKPublicProtocols.h +71 -0
  333. package/sdk/ios/System/Library/Frameworks/GameKit.framework/Headers/GKReleaseState.h +16 -0
  334. package/sdk/ios/System/Library/Frameworks/GameKit.framework/Headers/GKSavedGame.h +41 -0
  335. package/sdk/ios/System/Library/Frameworks/GameKit.framework/Headers/GKSavedGameListener.h +22 -0
  336. package/sdk/ios/System/Library/Frameworks/GameKit.framework/Headers/GKScore.h +73 -0
  337. package/sdk/ios/System/Library/Frameworks/GameKit.framework/Headers/GKSession.h +87 -0
  338. package/sdk/ios/System/Library/Frameworks/GameKit.framework/Headers/GKSessionError.h +30 -0
  339. package/sdk/ios/System/Library/Frameworks/GameKit.framework/Headers/GKTurnBasedMatch.h +314 -0
  340. package/sdk/ios/System/Library/Frameworks/GameKit.framework/Headers/GKTurnBasedMatchmakerViewController.h +69 -0
  341. package/sdk/ios/System/Library/Frameworks/GameKit.framework/Headers/GKVoiceChat.h +48 -0
  342. package/sdk/ios/System/Library/Frameworks/GameKit.framework/Headers/GKVoiceChatService.h +145 -0
  343. package/sdk/ios/System/Library/Frameworks/GameKit.framework/Headers/GameKit.apinotes +307 -0
  344. package/sdk/ios/System/Library/Frameworks/GameKit.framework/Headers/GameKit.h +79 -0
  345. package/sdk/ios/System/Library/Frameworks/GameKit.framework/Modules/module.modulemap +6 -0
  346. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKActivitySummary.h +122 -0
  347. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKActivitySummaryQuery.h +48 -0
  348. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKAnchoredObjectQuery.h +93 -0
  349. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKAppleSleepingBreathingDisturbancesClassification.h +39 -0
  350. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKAppleWalkingSteadinessClassification.h +49 -0
  351. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKAttachment.h +74 -0
  352. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKAttachmentStore.h +95 -0
  353. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKAudiogramSample.h +66 -0
  354. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKAudiogramSensitivityPoint.h +82 -0
  355. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKAudiogramSensitivityPointClampingRange.h +54 -0
  356. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKAudiogramSensitivityTest.h +101 -0
  357. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKCDADocumentSample.h +131 -0
  358. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKCategorySample.h +92 -0
  359. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKCategoryValues.h +279 -0
  360. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKCharacteristicObjects.h +79 -0
  361. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKCharacteristicValues.h +87 -0
  362. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKClinicalCoding.h +55 -0
  363. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKClinicalRecord.h +53 -0
  364. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKClinicalType.h +68 -0
  365. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKContactsLensSpecification.h +59 -0
  366. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKContactsPrescription.h +74 -0
  367. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKCorrelation.h +85 -0
  368. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKCorrelationQuery.h +57 -0
  369. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKCumulativeQuantitySample.h +36 -0
  370. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKCumulativeQuantitySeriesSample.h +23 -0
  371. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKDefines.h +114 -0
  372. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKDeletedObject.h +40 -0
  373. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKDevice.h +164 -0
  374. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKDiscreteQuantitySample.h +67 -0
  375. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKDocumentQuery.h +83 -0
  376. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKDocumentSample.h +29 -0
  377. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKElectrocardiogram.h +109 -0
  378. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKElectrocardiogramQuery.h +68 -0
  379. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKFHIRRelease.h +35 -0
  380. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKFHIRResource.h +81 -0
  381. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKFHIRVersion.h +50 -0
  382. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKGAD7Assessment.h +73 -0
  383. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKGlassesLensSpecification.h +81 -0
  384. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKGlassesPrescription.h +66 -0
  385. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKHealthConceptIdentifier.h +46 -0
  386. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKHealthStore.h +470 -0
  387. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKHeartbeatSeriesBuilder.h +104 -0
  388. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKHeartbeatSeriesQuery.h +47 -0
  389. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKHeartbeatSeriesSample.h +26 -0
  390. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKLensSpecification.h +53 -0
  391. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKLiveWorkoutBuilder.h +131 -0
  392. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKLiveWorkoutDataSource.h +67 -0
  393. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKLiveWorkoutZoneUpdate.h +25 -0
  394. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKMedicationConcept.h +95 -0
  395. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKMedicationDoseEvent.h +113 -0
  396. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKMetadata.h +583 -0
  397. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKMetadataEnums.h +250 -0
  398. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKObject.h +64 -0
  399. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKObjectType.h +294 -0
  400. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKObserverQuery.h +48 -0
  401. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKPHQ9Assessment.h +77 -0
  402. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKQuantity.h +55 -0
  403. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKQuantityAggregationStyle.h +30 -0
  404. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKQuantitySample.h +83 -0
  405. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKQuantitySeriesSampleBuilder.h +184 -0
  406. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKQuantitySeriesSampleQuery.h +90 -0
  407. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKQuery.h +722 -0
  408. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKQueryAnchor.h +33 -0
  409. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKQueryDescriptor.h +46 -0
  410. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKSample.h +48 -0
  411. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKSampleQuery.h +95 -0
  412. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKScoredAssessment.h +31 -0
  413. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKSeriesBuilder.h +40 -0
  414. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKSeriesSample.h +32 -0
  415. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKSource.h +45 -0
  416. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKSourceQuery.h +42 -0
  417. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKSourceRevision.h +78 -0
  418. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKStateOfMind.h +157 -0
  419. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKStatistics.h +166 -0
  420. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKStatisticsCollectionQuery.h +80 -0
  421. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKStatisticsQuery.h +37 -0
  422. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKTypeIdentifiers.h +359 -0
  423. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKUnit.h +287 -0
  424. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKUserAnnotatedMedication.h +60 -0
  425. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKUserAnnotatedMedicationQuery.h +38 -0
  426. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKVerifiableClinicalRecord.h +131 -0
  427. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKVerifiableClinicalRecordQuery.h +76 -0
  428. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKVerifiableClinicalRecordSubject.h +39 -0
  429. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKVisionPrescription.h +76 -0
  430. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKVisionPrism.h +123 -0
  431. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKWorkout.h +341 -0
  432. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKWorkoutActivity.h +127 -0
  433. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKWorkoutActivityType.h +147 -0
  434. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKWorkoutBuilder.h +264 -0
  435. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKWorkoutConfiguration.h +62 -0
  436. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKWorkoutEffortRelationshipQuery.h +80 -0
  437. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKWorkoutRoute.h +20 -0
  438. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKWorkoutRouteBuilder.h +102 -0
  439. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKWorkoutRouteQuery.h +67 -0
  440. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKWorkoutSession.h +364 -0
  441. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HealthKit.apinotes +5 -0
  442. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HealthKit.h +101 -0
  443. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Modules/module.modulemap +5 -0
  444. package/sdk/ios/System/Library/Frameworks/MediaAccessibility.framework/Headers/MAAudibleMedia.h +41 -0
  445. package/sdk/ios/System/Library/Frameworks/MediaAccessibility.framework/Headers/MACaptionAppearance.h +406 -0
  446. package/sdk/ios/System/Library/Frameworks/MediaAccessibility.framework/Headers/MADefinitions.h +38 -0
  447. package/sdk/ios/System/Library/Frameworks/MediaAccessibility.framework/Headers/MAFlashingLightsProcessing.h +53 -0
  448. package/sdk/ios/System/Library/Frameworks/MediaAccessibility.framework/Headers/MAImageCaptioning.h +55 -0
  449. package/sdk/ios/System/Library/Frameworks/MediaAccessibility.framework/Headers/MAMusicHaptics.h +69 -0
  450. package/sdk/ios/System/Library/Frameworks/MediaAccessibility.framework/Headers/MAVideoAccommodations.h +34 -0
  451. package/sdk/ios/System/Library/Frameworks/MediaAccessibility.framework/Headers/MediaAccessibility.h +14 -0
  452. package/sdk/ios/System/Library/Frameworks/MediaAccessibility.framework/Modules/module.modulemap +11 -0
  453. package/sdk/ios/System/Library/Frameworks/NetworkExtension.framework/Headers/NEAppProxyFlow.h +142 -0
  454. package/sdk/ios/System/Library/Frameworks/NetworkExtension.framework/Headers/NEAppProxyProvider.h +93 -0
  455. package/sdk/ios/System/Library/Frameworks/NetworkExtension.framework/Headers/NEAppProxyProviderManager.h +40 -0
  456. package/sdk/ios/System/Library/Frameworks/NetworkExtension.framework/Headers/NEAppProxyTCPFlow.h +63 -0
  457. package/sdk/ios/System/Library/Frameworks/NetworkExtension.framework/Headers/NEAppProxyUDPFlow.h +86 -0
  458. package/sdk/ios/System/Library/Frameworks/NetworkExtension.framework/Headers/NEAppPushManager.h +208 -0
  459. package/sdk/ios/System/Library/Frameworks/NetworkExtension.framework/Headers/NEAppPushProvider.h +87 -0
  460. package/sdk/ios/System/Library/Frameworks/NetworkExtension.framework/Headers/NEAppRule.h +80 -0
  461. package/sdk/ios/System/Library/Frameworks/NetworkExtension.framework/Headers/NEDNSProxyManager.h +109 -0
  462. package/sdk/ios/System/Library/Frameworks/NetworkExtension.framework/Headers/NEDNSProxyProvider.h +98 -0
  463. package/sdk/ios/System/Library/Frameworks/NetworkExtension.framework/Headers/NEDNSProxyProviderProtocol.h +45 -0
  464. package/sdk/ios/System/Library/Frameworks/NetworkExtension.framework/Headers/NEDNSSettings.h +124 -0
  465. package/sdk/ios/System/Library/Frameworks/NetworkExtension.framework/Headers/NEDNSSettingsManager.h +116 -0
  466. package/sdk/ios/System/Library/Frameworks/NetworkExtension.framework/Headers/NEEthernetTunnelNetworkSettings.h +45 -0
  467. package/sdk/ios/System/Library/Frameworks/NetworkExtension.framework/Headers/NEEthernetTunnelProvider.h +31 -0
  468. package/sdk/ios/System/Library/Frameworks/NetworkExtension.framework/Headers/NEFilterControlProvider.h +80 -0
  469. package/sdk/ios/System/Library/Frameworks/NetworkExtension.framework/Headers/NEFilterDataProvider.h +235 -0
  470. package/sdk/ios/System/Library/Frameworks/NetworkExtension.framework/Headers/NEFilterFlow.h +177 -0
  471. package/sdk/ios/System/Library/Frameworks/NetworkExtension.framework/Headers/NEFilterManager.h +138 -0
  472. package/sdk/ios/System/Library/Frameworks/NetworkExtension.framework/Headers/NEFilterPacketProvider.h +99 -0
  473. package/sdk/ios/System/Library/Frameworks/NetworkExtension.framework/Headers/NEFilterProvider.h +335 -0
  474. package/sdk/ios/System/Library/Frameworks/NetworkExtension.framework/Headers/NEFilterProviderConfiguration.h +94 -0
  475. package/sdk/ios/System/Library/Frameworks/NetworkExtension.framework/Headers/NEFilterRule.h +46 -0
  476. package/sdk/ios/System/Library/Frameworks/NetworkExtension.framework/Headers/NEFilterSettings.h +56 -0
  477. package/sdk/ios/System/Library/Frameworks/NetworkExtension.framework/Headers/NEFlowMetaData.h +45 -0
  478. package/sdk/ios/System/Library/Frameworks/NetworkExtension.framework/Headers/NEHotspotConfigurationManager.h +493 -0
  479. package/sdk/ios/System/Library/Frameworks/NetworkExtension.framework/Headers/NEHotspotHelper.h +529 -0
  480. package/sdk/ios/System/Library/Frameworks/NetworkExtension.framework/Headers/NEHotspotNetwork.h +87 -0
  481. package/sdk/ios/System/Library/Frameworks/NetworkExtension.framework/Headers/NEIPv4Settings.h +122 -0
  482. package/sdk/ios/System/Library/Frameworks/NetworkExtension.framework/Headers/NEIPv6Settings.h +121 -0
  483. package/sdk/ios/System/Library/Frameworks/NetworkExtension.framework/Headers/NENetworkRule.h +218 -0
  484. package/sdk/ios/System/Library/Frameworks/NetworkExtension.framework/Headers/NEOnDemandRule.h +210 -0
  485. package/sdk/ios/System/Library/Frameworks/NetworkExtension.framework/Headers/NEPacket.h +67 -0
  486. package/sdk/ios/System/Library/Frameworks/NetworkExtension.framework/Headers/NEPacketTunnelFlow.h +62 -0
  487. package/sdk/ios/System/Library/Frameworks/NetworkExtension.framework/Headers/NEPacketTunnelNetworkSettings.h +135 -0
  488. package/sdk/ios/System/Library/Frameworks/NetworkExtension.framework/Headers/NEPacketTunnelProvider.h +97 -0
  489. package/sdk/ios/System/Library/Frameworks/NetworkExtension.framework/Headers/NEProvider.h +160 -0
  490. package/sdk/ios/System/Library/Frameworks/NetworkExtension.framework/Headers/NEProxySettings.h +140 -0
  491. package/sdk/ios/System/Library/Frameworks/NetworkExtension.framework/Headers/NERelay.h +83 -0
  492. package/sdk/ios/System/Library/Frameworks/NetworkExtension.framework/Headers/NERelayManager.h +195 -0
  493. package/sdk/ios/System/Library/Frameworks/NetworkExtension.framework/Headers/NETransparentProxyManager.h +39 -0
  494. package/sdk/ios/System/Library/Frameworks/NetworkExtension.framework/Headers/NETransparentProxyNetworkSettings.h +62 -0
  495. package/sdk/ios/System/Library/Frameworks/NetworkExtension.framework/Headers/NETransparentProxyProvider.h +33 -0
  496. package/sdk/ios/System/Library/Frameworks/NetworkExtension.framework/Headers/NETunnelNetworkSettings.h +57 -0
  497. package/sdk/ios/System/Library/Frameworks/NetworkExtension.framework/Headers/NETunnelProvider.h +113 -0
  498. package/sdk/ios/System/Library/Frameworks/NetworkExtension.framework/Headers/NETunnelProviderManager.h +108 -0
  499. package/sdk/ios/System/Library/Frameworks/NetworkExtension.framework/Headers/NETunnelProviderProtocol.h +44 -0
  500. package/sdk/ios/System/Library/Frameworks/NetworkExtension.framework/Headers/NETunnelProviderSession.h +55 -0
  501. package/sdk/ios/System/Library/Frameworks/NetworkExtension.framework/Headers/NEURLFilter.h +51 -0
  502. package/sdk/ios/System/Library/Frameworks/NetworkExtension.framework/Headers/NEVPNConnection.h +162 -0
  503. package/sdk/ios/System/Library/Frameworks/NetworkExtension.framework/Headers/NEVPNManager.h +153 -0
  504. package/sdk/ios/System/Library/Frameworks/NetworkExtension.framework/Headers/NEVPNProtocol.h +135 -0
  505. package/sdk/ios/System/Library/Frameworks/NetworkExtension.framework/Headers/NEVPNProtocolIKEv2.h +357 -0
  506. package/sdk/ios/System/Library/Frameworks/NetworkExtension.framework/Headers/NEVPNProtocolIPSec.h +71 -0
  507. package/sdk/ios/System/Library/Frameworks/NetworkExtension.framework/Headers/NWBonjourServiceEndpoint.h +82 -0
  508. package/sdk/ios/System/Library/Frameworks/NetworkExtension.framework/Headers/NWEndpoint.h +40 -0
  509. package/sdk/ios/System/Library/Frameworks/NetworkExtension.framework/Headers/NWHostEndpoint.h +68 -0
  510. package/sdk/ios/System/Library/Frameworks/NetworkExtension.framework/Headers/NWPath.h +93 -0
  511. package/sdk/ios/System/Library/Frameworks/NetworkExtension.framework/Headers/NWTCPConnection.h +335 -0
  512. package/sdk/ios/System/Library/Frameworks/NetworkExtension.framework/Headers/NWTLSParameters.h +70 -0
  513. package/sdk/ios/System/Library/Frameworks/NetworkExtension.framework/Headers/NWUDPSession.h +207 -0
  514. package/sdk/ios/System/Library/Frameworks/NetworkExtension.framework/Headers/NetworkExtension.apinotes +351 -0
  515. package/sdk/ios/System/Library/Frameworks/NetworkExtension.framework/Headers/NetworkExtension.h +74 -0
  516. package/sdk/ios/System/Library/Frameworks/NetworkExtension.framework/Modules/module.modulemap +5 -0
  517. package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/QuartzCore.h +1 -0
  518. package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/ModelIO.h +84 -0
  519. package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/SCNAction.h +197 -0
  520. package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/SCNAnimation.h +428 -0
  521. package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/SCNAudioSource.h +170 -0
  522. package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/SCNBoundingVolume.h +50 -0
  523. package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/SCNCAAnimationExtensions.h +58 -0
  524. package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/SCNCamera.h +356 -0
  525. package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/SCNCameraController.h +124 -0
  526. package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/SCNConstraint.h +431 -0
  527. package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/SCNGeometry.h +591 -0
  528. package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/SCNHitTest.h +101 -0
  529. package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/SCNJavascript.h +58 -0
  530. package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/SCNLevelOfDetail.h +56 -0
  531. package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/SCNLight.h +350 -0
  532. package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/SCNMaterial.h +349 -0
  533. package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/SCNMaterialProperty.h +149 -0
  534. package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/SCNMorpher.h +79 -0
  535. package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/SCNNode.h +695 -0
  536. package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/SCNParametricGeometry.h +727 -0
  537. package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/SCNParticleSystem.h +462 -0
  538. package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/SCNPhysicsBehavior.h +219 -0
  539. package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/SCNPhysicsBody.h +148 -0
  540. package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/SCNPhysicsContact.h +34 -0
  541. package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/SCNPhysicsField.h +124 -0
  542. package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/SCNPhysicsShape.h +58 -0
  543. package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/SCNPhysicsWorld.h +90 -0
  544. package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/SCNReferenceNode.h +80 -0
  545. package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/SCNRenderer.h +102 -0
  546. package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/SCNScene.h +250 -0
  547. package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/SCNSceneRenderer.h +389 -0
  548. package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/SCNSceneSource.h +348 -0
  549. package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/SCNShadable.h +573 -0
  550. package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/SCNSkinner.h +84 -0
  551. package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/SCNTechnique.h +320 -0
  552. package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/SCNTransaction.h +64 -0
  553. package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/SCNView.h +170 -0
  554. package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/SceneKit.apinotes +423 -0
  555. package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/SceneKit.h +58 -0
  556. package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/SceneKitAvailability.h +10 -0
  557. package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/SceneKitDeprecated.h +88 -0
  558. package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/SceneKitTypes.h +264 -0
  559. package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/scn_metal +75 -0
  560. package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Modules/module.modulemap +12 -0
  561. package/sdk/ios/System/Library/Frameworks/Security.framework/Headers/CipherSuite.h +281 -0
  562. package/sdk/ios/System/Library/Frameworks/Security.framework/Headers/SecAccessControl.h +133 -0
  563. package/sdk/ios/System/Library/Frameworks/Security.framework/Headers/SecBase.h +906 -3
  564. package/sdk/ios/System/Library/Frameworks/Security.framework/Headers/SecCertificate.h +613 -0
  565. package/sdk/ios/System/Library/Frameworks/Security.framework/Headers/SecIdentity.h +232 -0
  566. package/sdk/ios/System/Library/Frameworks/Security.framework/Headers/SecItem.h +1284 -29
  567. package/sdk/ios/System/Library/Frameworks/Security.framework/Headers/SecKey.h +1616 -0
  568. package/sdk/ios/System/Library/Frameworks/Security.framework/Headers/SecPolicy.h +441 -0
  569. package/sdk/ios/System/Library/Frameworks/Security.framework/Headers/SecProtocolMetadata.h +429 -0
  570. package/sdk/ios/System/Library/Frameworks/Security.framework/Headers/SecProtocolObject.h +71 -0
  571. package/sdk/ios/System/Library/Frameworks/Security.framework/Headers/SecProtocolOptions.h +775 -0
  572. package/sdk/ios/System/Library/Frameworks/Security.framework/Headers/SecProtocolTypes.h +327 -0
  573. package/sdk/ios/System/Library/Frameworks/Security.framework/Headers/SecRandom.h +84 -0
  574. package/sdk/ios/System/Library/Frameworks/Security.framework/Headers/SecTrust.h +845 -0
  575. package/sdk/ios/System/Library/Frameworks/Security.framework/Headers/Security.h +13 -0
  576. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIKit.h +19 -0
  577. package/sdk/ios/usr/include/AvailabilityInternal.h +23 -0
  578. package/sdk/ios/usr/include/AvailabilityMacros.h +3985 -0
  579. package/sdk/ios/usr/include/Block.h +56 -0
  580. package/sdk/ios/usr/include/CommonCrypto/CommonCrypto.h +34 -0
  581. package/sdk/ios/usr/include/CommonCrypto/CommonCryptoError.h +78 -0
  582. package/sdk/ios/usr/include/CommonCrypto/CommonCryptor.h +763 -0
  583. package/sdk/ios/usr/include/CommonCrypto/CommonDigest.h +254 -47
  584. package/sdk/ios/usr/include/CommonCrypto/CommonHMAC.h +162 -0
  585. package/sdk/ios/usr/include/CommonCrypto/CommonKeyDerivation.h +136 -0
  586. package/sdk/ios/usr/include/CommonCrypto/CommonRandom.h +63 -0
  587. package/sdk/ios/usr/include/CommonCrypto/CommonSymmetricKeywrap.h +162 -0
  588. package/sdk/ios/usr/include/CommonCrypto/module.modulemap +15 -0
  589. package/sdk/ios/usr/include/ObjectiveC.apinotes +437 -0
  590. package/sdk/ios/usr/include/TargetConditionals.h +525 -14
  591. package/sdk/ios/usr/include/___wctype.h +193 -0
  592. package/sdk/ios/usr/include/__wctype.h +43 -0
  593. package/sdk/ios/usr/include/_abort.h +36 -0
  594. package/sdk/ios/usr/include/_assert.h +80 -0
  595. package/sdk/ios/usr/include/_static_assert.h +33 -0
  596. package/sdk/ios/usr/include/_stdlib.h +403 -0
  597. package/sdk/ios/usr/include/_string.h +231 -0
  598. package/sdk/ios/usr/include/_strings.h +101 -0
  599. package/sdk/ios/usr/include/_types/_wctrans_t.h +33 -0
  600. package/sdk/ios/usr/include/_types/_wctype_t.h +33 -0
  601. package/sdk/ios/usr/include/_wchar.h +263 -0
  602. package/sdk/ios/usr/include/_wctype.h +129 -0
  603. package/sdk/ios/usr/include/_xlocale.h +47 -0
  604. package/sdk/ios/usr/include/alloca.h +46 -0
  605. package/sdk/ios/usr/include/architecture/byte_order.h +381 -0
  606. package/sdk/ios/usr/include/arm/_limits.h +13 -0
  607. package/sdk/ios/usr/include/arm/arch.h +71 -0
  608. package/sdk/ios/usr/include/arm/limits.h +136 -0
  609. package/sdk/ios/usr/include/arpa/inet.h +100 -0
  610. package/sdk/ios/usr/include/assert.h +77 -10
  611. package/sdk/ios/usr/include/bsm/audit.h +434 -0
  612. package/sdk/ios/usr/include/copyfile.h +143 -0
  613. package/sdk/ios/usr/include/crt_externs.h +50 -0
  614. package/sdk/ios/usr/include/dispatch/base.h +369 -0
  615. package/sdk/ios/usr/include/dispatch/block.h +509 -0
  616. package/sdk/ios/usr/include/dispatch/data.h +290 -0
  617. package/sdk/ios/usr/include/dispatch/dispatch.h +68 -172
  618. package/sdk/ios/usr/include/dispatch/dispatch_swift_shims.h +61 -0
  619. package/sdk/ios/usr/include/dispatch/group.h +289 -0
  620. package/sdk/ios/usr/include/dispatch/introspection.h +190 -0
  621. package/sdk/ios/usr/include/dispatch/io.h +617 -0
  622. package/sdk/ios/usr/include/dispatch/object.h +680 -0
  623. package/sdk/ios/usr/include/dispatch/once.h +128 -0
  624. package/sdk/ios/usr/include/dispatch/queue.h +1824 -0
  625. package/sdk/ios/usr/include/dispatch/semaphore.h +124 -0
  626. package/sdk/ios/usr/include/dispatch/source.h +803 -0
  627. package/sdk/ios/usr/include/dispatch/time.h +144 -0
  628. package/sdk/ios/usr/include/dispatch/workloop.h +178 -0
  629. package/sdk/ios/usr/include/dlfcn.h +320 -7
  630. package/sdk/ios/usr/include/execinfo.h +100 -10
  631. package/sdk/ios/usr/include/ftw.h +63 -0
  632. package/sdk/ios/usr/include/gethostuuid.h +45 -0
  633. package/sdk/ios/usr/include/libkern/arm/OSByteOrder.h +195 -0
  634. package/sdk/ios/usr/include/limits.h +167 -4
  635. package/sdk/ios/usr/include/mach/arm/boolean.h +74 -0
  636. package/sdk/ios/usr/include/mach/arm/exception.h +86 -0
  637. package/sdk/ios/usr/include/mach/arm/kern_return.h +78 -0
  638. package/sdk/ios/usr/include/mach/arm/processor_info.h +76 -0
  639. package/sdk/ios/usr/include/mach/arm/rpc.h +39 -0
  640. package/sdk/ios/usr/include/mach/arm/thread_state.h +42 -0
  641. package/sdk/ios/usr/include/mach/arm/thread_status.h +302 -0
  642. package/sdk/ios/usr/include/mach/arm/vm_param.h +118 -0
  643. package/sdk/ios/usr/include/mach/arm/vm_types.h +162 -0
  644. package/sdk/ios/usr/include/mach/boolean.h +88 -4
  645. package/sdk/ios/usr/include/mach/clock.h +249 -0
  646. package/sdk/ios/usr/include/mach/clock_priv.h +203 -0
  647. package/sdk/ios/usr/include/mach/clock_types.h +127 -0
  648. package/sdk/ios/usr/include/mach/dyld_kernel.h +66 -0
  649. package/sdk/ios/usr/include/mach/error.h +117 -0
  650. package/sdk/ios/usr/include/mach/exc.h +285 -0
  651. package/sdk/ios/usr/include/mach/exception_types.h +204 -25
  652. package/sdk/ios/usr/include/mach/host_info.h +136 -51
  653. package/sdk/ios/usr/include/mach/host_notify.h +39 -0
  654. package/sdk/ios/usr/include/mach/host_priv.h +1167 -0
  655. package/sdk/ios/usr/include/mach/host_security.h +225 -0
  656. package/sdk/ios/usr/include/mach/host_special_ports.h +315 -0
  657. package/sdk/ios/usr/include/mach/kern_return.h +291 -2
  658. package/sdk/ios/usr/include/mach/kmod.h +180 -0
  659. package/sdk/ios/usr/include/mach/mach.h +237 -12
  660. package/sdk/ios/usr/include/mach/mach_error.h +93 -10
  661. package/sdk/ios/usr/include/mach/mach_host.h +1329 -5
  662. package/sdk/ios/usr/include/mach/mach_init.h +112 -13
  663. package/sdk/ios/usr/include/mach/mach_interface.h +52 -0
  664. package/sdk/ios/usr/include/mach/mach_port.h +1935 -4
  665. package/sdk/ios/usr/include/mach/mach_time.h +77 -14
  666. package/sdk/ios/usr/include/mach/mach_traps.h +311 -0
  667. package/sdk/ios/usr/include/mach/mach_types.h +297 -20
  668. package/sdk/ios/usr/include/mach/mach_voucher_types.h +259 -0
  669. package/sdk/ios/usr/include/mach/machine/boolean.h +40 -0
  670. package/sdk/ios/usr/include/mach/machine/exception.h +40 -0
  671. package/sdk/ios/usr/include/mach/machine/kern_return.h +40 -0
  672. package/sdk/ios/usr/include/mach/machine/processor_info.h +40 -0
  673. package/sdk/ios/usr/include/mach/machine/rpc.h +40 -0
  674. package/sdk/ios/usr/include/mach/machine/thread_state.h +44 -0
  675. package/sdk/ios/usr/include/mach/machine/thread_status.h +40 -0
  676. package/sdk/ios/usr/include/mach/machine/vm_param.h +40 -0
  677. package/sdk/ios/usr/include/mach/machine/vm_types.h +40 -0
  678. package/sdk/ios/usr/include/mach/machine.h +456 -142
  679. package/sdk/ios/usr/include/mach/memory_object_types.h +312 -0
  680. package/sdk/ios/usr/include/mach/message.h +972 -0
  681. package/sdk/ios/usr/include/mach/mig.h +180 -0
  682. package/sdk/ios/usr/include/mach/mig_errors.h +125 -0
  683. package/sdk/ios/usr/include/mach/mig_strncpy_zerofill_support.h +35 -0
  684. package/sdk/ios/usr/include/mach/ndr.h +207 -0
  685. package/sdk/ios/usr/include/mach/notify.h +141 -0
  686. package/sdk/ios/usr/include/mach/policy.h +235 -0
  687. package/sdk/ios/usr/include/mach/port.h +648 -0
  688. package/sdk/ios/usr/include/mach/processor.h +364 -0
  689. package/sdk/ios/usr/include/mach/processor_info.h +171 -0
  690. package/sdk/ios/usr/include/mach/processor_set.h +589 -0
  691. package/sdk/ios/usr/include/mach/rpc.h +135 -0
  692. package/sdk/ios/usr/include/mach/semaphore.h +78 -0
  693. package/sdk/ios/usr/include/mach/std_types.h +75 -0
  694. package/sdk/ios/usr/include/mach/sync_policy.h +47 -0
  695. package/sdk/ios/usr/include/mach/task.h +2887 -7
  696. package/sdk/ios/usr/include/mach/task_info.h +584 -19
  697. package/sdk/ios/usr/include/mach/task_inspect.h +57 -0
  698. package/sdk/ios/usr/include/mach/task_policy.h +182 -26
  699. package/sdk/ios/usr/include/mach/task_special_ports.h +135 -0
  700. package/sdk/ios/usr/include/mach/thread_act.h +1550 -5
  701. package/sdk/ios/usr/include/mach/thread_info.h +206 -28
  702. package/sdk/ios/usr/include/mach/thread_policy.h +268 -0
  703. package/sdk/ios/usr/include/mach/thread_special_ports.h +87 -0
  704. package/sdk/ios/usr/include/mach/thread_status.h +100 -0
  705. package/sdk/ios/usr/include/mach/thread_switch.h +77 -0
  706. package/sdk/ios/usr/include/mach/time_value.h +96 -4
  707. package/sdk/ios/usr/include/mach/vm_attributes.h +99 -0
  708. package/sdk/ios/usr/include/mach/vm_behavior.h +86 -0
  709. package/sdk/ios/usr/include/mach/vm_inherit.h +93 -0
  710. package/sdk/ios/usr/include/mach/vm_map.h +1558 -0
  711. package/sdk/ios/usr/include/mach/vm_page_size.h +68 -0
  712. package/sdk/ios/usr/include/mach/vm_prot.h +183 -7
  713. package/sdk/ios/usr/include/mach/vm_purgable.h +166 -0
  714. package/sdk/ios/usr/include/mach/vm_region.h +400 -36
  715. package/sdk/ios/usr/include/mach/vm_statistics.h +387 -96
  716. package/sdk/ios/usr/include/mach/vm_sync.h +84 -0
  717. package/sdk/ios/usr/include/mach/vm_types.h +194 -7
  718. package/sdk/ios/usr/include/mach-o/arch.h +154 -16
  719. package/sdk/ios/usr/include/mach-o/fat.h +89 -0
  720. package/sdk/ios/usr/include/mach-o/getsect.h +146 -12
  721. package/sdk/ios/usr/include/mach-o/loader.h +1679 -139
  722. package/sdk/ios/usr/include/mach_debug/hash_info.h +75 -0
  723. package/sdk/ios/usr/include/mach_debug/ipc_info.h +199 -0
  724. package/sdk/ios/usr/include/mach_debug/lockgroup_info.h +74 -0
  725. package/sdk/ios/usr/include/mach_debug/mach_debug_types.h +200 -0
  726. package/sdk/ios/usr/include/mach_debug/page_info.h +64 -0
  727. package/sdk/ios/usr/include/mach_debug/vm_info.h +149 -0
  728. package/sdk/ios/usr/include/mach_debug/zone_info.h +209 -0
  729. package/sdk/ios/usr/include/machine/limits.h +14 -0
  730. package/sdk/ios/usr/include/malloc/_malloc.h +143 -0
  731. package/sdk/ios/usr/include/malloc/_malloc_type.h +153 -0
  732. package/sdk/ios/usr/include/malloc/_platform.h +80 -0
  733. package/sdk/ios/usr/include/malloc/_ptrcheck.h +43 -0
  734. package/sdk/ios/usr/include/malloc/malloc.h +768 -0
  735. package/sdk/ios/usr/include/module.modulemap +4 -0
  736. package/sdk/ios/usr/include/net/if_types.h +152 -0
  737. package/sdk/ios/usr/include/objc/NSObjCRuntime.h +10 -0
  738. package/sdk/ios/usr/include/objc/NSObject.h +23 -25
  739. package/sdk/ios/usr/include/objc/objc-api.h +310 -0
  740. package/sdk/ios/usr/include/objc/objc.h +243 -0
  741. package/sdk/ios/usr/include/objc/runtime.h +1933 -0
  742. package/sdk/ios/usr/include/os/availability.h +168 -6
  743. package/sdk/ios/usr/include/os/base.h +351 -0
  744. package/sdk/ios/usr/include/os/clock.h +18 -0
  745. package/sdk/ios/usr/include/os/lock.h +232 -10
  746. package/sdk/ios/usr/include/os/log.h +521 -38
  747. package/sdk/ios/usr/include/os/object.h +320 -3
  748. package/sdk/ios/usr/include/os/trace.h +492 -0
  749. package/sdk/ios/usr/include/os/trace_base.h +167 -0
  750. package/sdk/ios/usr/include/os/workgroup.h +37 -0
  751. package/sdk/ios/usr/include/os/workgroup_base.h +91 -0
  752. package/sdk/ios/usr/include/os/workgroup_interval.h +156 -0
  753. package/sdk/ios/usr/include/os/workgroup_object.h +359 -0
  754. package/sdk/ios/usr/include/os/workgroup_parallel.h +76 -0
  755. package/sdk/ios/usr/include/os.modulemap +6 -0
  756. package/sdk/ios/usr/include/pthread/pthread_impl.h +66 -0
  757. package/sdk/ios/usr/include/pthread/sched.h +46 -0
  758. package/sdk/ios/usr/include/pthread.h +754 -4
  759. package/sdk/ios/usr/include/pwd.h +119 -0
  760. package/sdk/ios/usr/include/sched.h +46 -0
  761. package/sdk/ios/usr/include/secure/_string.h +295 -0
  762. package/sdk/ios/usr/include/secure/_strings.h +96 -0
  763. package/sdk/ios/usr/include/spawn.h +193 -0
  764. package/sdk/ios/usr/include/stddef.h +90 -0
  765. package/sdk/ios/usr/include/stdlib.h +62 -17
  766. package/sdk/ios/usr/include/string.h +62 -8
  767. package/sdk/ios/usr/include/sys/_pthread/_pthread_cond_t.h +32 -0
  768. package/sdk/ios/usr/include/sys/_pthread/_pthread_condattr_t.h +32 -0
  769. package/sdk/ios/usr/include/sys/_pthread/_pthread_key_t.h +32 -0
  770. package/sdk/ios/usr/include/sys/_pthread/_pthread_mutex_t.h +32 -0
  771. package/sdk/ios/usr/include/sys/_pthread/_pthread_mutexattr_t.h +32 -0
  772. package/sdk/ios/usr/include/sys/_pthread/_pthread_once_t.h +32 -0
  773. package/sdk/ios/usr/include/sys/_pthread/_pthread_rwlock_t.h +32 -0
  774. package/sdk/ios/usr/include/sys/_pthread/_pthread_rwlockattr_t.h +32 -0
  775. package/sdk/ios/usr/include/sys/_select.h +57 -0
  776. package/sdk/ios/usr/include/sys/_types/_blkcnt_t.h +32 -0
  777. package/sdk/ios/usr/include/sys/_types/_blksize_t.h +32 -0
  778. package/sdk/ios/usr/include/sys/_types/_caddr_t.h +32 -0
  779. package/sdk/ios/usr/include/sys/_types/_dev_t.h +32 -0
  780. package/sdk/ios/usr/include/sys/_types/_fsblkcnt_t.h +32 -0
  781. package/sdk/ios/usr/include/sys/_types/_fsfilcnt_t.h +32 -0
  782. package/sdk/ios/usr/include/sys/_types/_fsid_t.h +32 -0
  783. package/sdk/ios/usr/include/sys/_types/_fsobj_id_t.h +38 -0
  784. package/sdk/ios/usr/include/sys/_types/_graftdmg_un.h +64 -0
  785. package/sdk/ios/usr/include/sys/_types/_guid_t.h +37 -0
  786. package/sdk/ios/usr/include/sys/_types/_id_t.h +32 -0
  787. package/sdk/ios/usr/include/sys/_types/_ino64_t.h +32 -0
  788. package/sdk/ios/usr/include/sys/_types/_key_t.h +32 -0
  789. package/sdk/ios/usr/include/sys/_types/_mach_port_t.h +51 -0
  790. package/sdk/ios/usr/include/sys/_types/_mbstate_t.h +33 -0
  791. package/sdk/ios/usr/include/sys/_types/_mount_t.h +34 -0
  792. package/sdk/ios/usr/include/sys/_types/_nlink_t.h +32 -0
  793. package/sdk/ios/usr/include/sys/_types/_os_inline.h +34 -0
  794. package/sdk/ios/usr/include/sys/_types/_posix_vdisable.h +30 -0
  795. package/sdk/ios/usr/include/sys/_types/_rsize_t.h +55 -0
  796. package/sdk/ios/usr/include/sys/_types/_suseconds_t.h +32 -0
  797. package/sdk/ios/usr/include/sys/_types/_timeval.h +39 -0
  798. package/sdk/ios/usr/include/sys/_types/_u_char.h +31 -0
  799. package/sdk/ios/usr/include/sys/_types/_u_int.h +31 -0
  800. package/sdk/ios/usr/include/sys/_types/_u_short.h +31 -0
  801. package/sdk/ios/usr/include/sys/_types/_useconds_t.h +32 -0
  802. package/sdk/ios/usr/include/sys/_types/_uuid_t.h +32 -0
  803. package/sdk/ios/usr/include/sys/_types/_vnode_t.h +34 -0
  804. package/sdk/ios/usr/include/sys/acl.h +215 -0
  805. package/sdk/ios/usr/include/sys/attr.h +635 -0
  806. package/sdk/ios/usr/include/sys/cdefs.h +53 -0
  807. package/sdk/ios/usr/include/sys/event.h +388 -0
  808. package/sdk/ios/usr/include/sys/kauth.h +409 -0
  809. package/sdk/ios/usr/include/sys/mount.h +470 -0
  810. package/sdk/ios/usr/include/sys/queue.h +909 -0
  811. package/sdk/ios/usr/include/sys/resource.h +600 -0
  812. package/sdk/ios/usr/include/sys/select.h +134 -0
  813. package/sdk/ios/usr/include/sys/spawn.h +84 -0
  814. package/sdk/ios/usr/include/sys/sysctl.h +803 -57
  815. package/sdk/ios/usr/include/sys/syslimits.h +131 -11
  816. package/sdk/ios/usr/include/sys/types.h +236 -19
  817. package/sdk/ios/usr/include/sys/ucred.h +116 -0
  818. package/sdk/ios/usr/include/sys/un.h +105 -0
  819. package/sdk/ios/usr/include/sys/unistd.h +225 -0
  820. package/sdk/ios/usr/include/sys/vm.h +89 -0
  821. package/sdk/ios/usr/include/sys/wait.h +256 -0
  822. package/sdk/ios/usr/include/sysdir.h +79 -0
  823. package/sdk/ios/usr/include/unistd.h +799 -3
  824. package/sdk/ios/usr/include/uuid/uuid.h +69 -10
  825. package/sdk/ios/usr/include/wchar.h +71 -0
  826. package/sdk/ios/usr/include/wctype.h +35 -0
  827. package/sdk/ios/usr/include/xlocale/___wctype.h +146 -0
  828. package/sdk/ios/usr/include/xlocale/_ctype.h +240 -0
  829. package/sdk/ios/usr/include/xlocale/_stdlib.h +77 -0
  830. package/sdk/ios/usr/include/xlocale/_string.h +43 -0
  831. package/sdk/ios/usr/include/xlocale/_wchar.h +160 -0
  832. package/sdk/ios/usr/include/xlocale/_wctype.h +100 -0
  833. package/sdk/ios/usr/include/xlocale.h +61 -0
  834. package/sdk/ios/usr/include/xpc/availability.h +141 -0
  835. package/sdk/ios/usr/include/xpc/base.h +243 -0
  836. package/sdk/ios/wasm/include/AvailabilityInternal.h +24 -0
  837. package/sdk/ios/wasm/include/TargetConditionals.h +529 -0
  838. package/sdk/ios/wasm/include/_locale.h +3 -0
  839. package/sdk/ios/wasm/include/_locale_posix2008.h +3 -0
  840. package/sdk/ios/wasm/include/_types/_locale_t.h +3 -0
  841. package/sdk/ios/wasm/include/arpa/inet.h +15 -0
  842. package/sdk/ios/wasm/include/dirent.h +52 -0
  843. package/sdk/ios/wasm/include/dlfcn.h +13 -1
  844. package/sdk/ios/wasm/include/errno.h +22 -0
  845. package/sdk/ios/wasm/include/fcntl.h +29 -0
  846. package/sdk/ios/wasm/include/ftw.h +15 -0
  847. package/sdk/ios/wasm/include/libkern/_OSByteOrder.h +6 -0
  848. package/sdk/ios/wasm/include/limits.h +9 -0
  849. package/sdk/ios/wasm/include/mach/machine/boolean.h +1 -1
  850. package/sdk/ios/wasm/include/mach/machine/exception.h +1 -4
  851. package/sdk/ios/wasm/include/mach/machine/kern_return.h +1 -1
  852. package/sdk/ios/wasm/include/mach/machine/processor_info.h +1 -1
  853. package/sdk/ios/wasm/include/mach/machine/rpc.h +1 -1
  854. package/sdk/ios/wasm/include/mach/machine/thread_state.h +1 -2
  855. package/sdk/ios/wasm/include/mach/machine/thread_status.h +1 -2
  856. package/sdk/ios/wasm/include/mach/machine/vm_param.h +1 -2
  857. package/sdk/ios/wasm/include/mach/machine/vm_types.h +1 -17
  858. package/sdk/ios/wasm/include/machine/_endian.h +2 -0
  859. package/sdk/ios/wasm/include/machine/_param.h +2 -0
  860. package/sdk/ios/wasm/include/machine/endian.h +1 -1
  861. package/sdk/ios/wasm/include/machine/limits.h +106 -2
  862. package/sdk/ios/wasm/include/machine/param.h +152 -0
  863. package/sdk/ios/wasm/include/netinet/in.h +11 -0
  864. package/sdk/ios/wasm/include/os/object.h +10 -0
  865. package/sdk/ios/wasm/include/pthread.h +14 -0
  866. package/sdk/ios/wasm/include/stdio.h +12 -0
  867. package/sdk/ios/wasm/include/stdlib.h +13 -0
  868. package/sdk/ios/wasm/include/strings.h +9 -0
  869. package/sdk/ios/wasm/include/sys/_types/_iovec_t.h +6 -0
  870. package/sdk/ios/wasm/include/sys/_types/_mode_t.h +10 -0
  871. package/sdk/ios/wasm/include/sys/mman.h +2 -2
  872. package/sdk/ios/wasm/include/sys/param.h +4 -0
  873. package/sdk/ios/wasm/include/sys/resource.h +43 -0
  874. package/sdk/ios/wasm/include/sys/socket.h +75 -9
  875. package/sdk/ios/wasm/include/sys/stat.h +63 -0
  876. package/sdk/ios/wasm/include/sys/types.h +13 -0
  877. package/sdk/ios/wasm/include/sys/un.h +7 -0
  878. package/sdk/ios/wasm/include/time.h +3 -1
  879. package/sdk/ios/wasm/include/unistd.h +19 -3
  880. package/sdk/ios/wasm/include/xlocale/_stdlib.h +37 -0
  881. package/sdk/ios/wasm/storage-include/TargetConditionals.h +529 -0
  882. package/sdk/ios/wasm/storage-include/mach/machine/boolean.h +2 -0
  883. package/sdk/ios/wasm/storage-include/mach/machine/exception.h +5 -0
  884. package/sdk/ios/wasm/storage-include/mach/machine/kern_return.h +2 -0
  885. package/sdk/ios/wasm/storage-include/mach/machine/processor_info.h +2 -0
  886. package/sdk/ios/wasm/storage-include/mach/machine/rpc.h +2 -0
  887. package/sdk/ios/wasm/storage-include/mach/machine/thread_state.h +3 -0
  888. package/sdk/ios/wasm/storage-include/mach/machine/thread_status.h +3 -0
  889. package/sdk/ios/wasm/storage-include/mach/machine/vm_param.h +3 -0
  890. package/sdk/ios/wasm/storage-include/mach/machine/vm_types.h +18 -0
  891. package/sdk/ios/wasm/storage-include/machine/_endian.h +9 -0
  892. package/sdk/ios/wasm/storage-include/machine/_param.h +8 -0
  893. package/sdk/ios/wasm/storage-include/machine/_types.h +31 -0
  894. package/sdk/ios/wasm/storage-include/machine/endian.h +2 -0
  895. package/sdk/ios/wasm/storage-include/machine/limits.h +2 -0
  896. package/sdk/ios/wasm/storage-include/machine/types.h +15 -0
  897. package/sdk/native-hashes.json +80 -0
  898. package/skills/contrast/SKILL.md +4 -1
  899. package/src/android-root-module.ts +145 -0
  900. package/src/androidRootModuleContract.ts +39 -0
  901. package/src/assetCatalogContract.ts +10 -1
  902. package/src/backend-origin.ts +11 -8
  903. package/src/bridge-constants.ts +7 -0
  904. package/src/bridge-contract.ts +3 -1
  905. package/src/capture-contract.ts +3 -1
  906. package/src/cli-runtime.ts +6 -1
  907. package/src/codex-client.ts +11 -6
  908. package/src/dev-bundle-resolution.ts +124 -48
  909. package/src/device-catalog.ts +10 -4
  910. package/src/expo-discovery-cache.ts +272 -0
  911. package/src/expo-native-workspace.ts +207 -0
  912. package/src/expo-swift-host.ts +824 -33
  913. package/src/expo-swift-ready.ts +56 -38
  914. package/src/expoSwiftContract.ts +4 -1
  915. package/src/generated/swift-c-predefines.json +69 -13
  916. package/src/host/bridge-host.ts +33 -0
  917. package/src/host/fetch-proxy-handler.ts +19 -1
  918. package/src/host/network-policy-proxy.ts +421 -0
  919. package/src/host/network-policy.ts +121 -0
  920. package/src/host/staged-host-files.ts +80 -3
  921. package/src/host/websocket-frame-guard.ts +163 -0
  922. package/src/host/websocket-proxy-headers.ts +29 -0
  923. package/src/host/websocket-proxy.ts +100 -58
  924. package/src/installed-native-build-options.ts +154 -0
  925. package/src/installed-package-versions.ts +70 -50
  926. package/src/material-symbol-fonts.ts +6 -4
  927. package/src/menu.ts +6 -0
  928. package/src/metro-plugin.ts +8 -0
  929. package/src/metro-project-root.ts +44 -33
  930. package/src/native-app-identity-project.ts +5 -0
  931. package/src/native-app-identity.ts +16 -0
  932. package/src/native-dev-bundle-url.ts +0 -18
  933. package/src/native-firebase-config.ts +47 -4
  934. package/src/native-preparation.ts +30 -0
  935. package/src/nativePreparationContract.ts +3 -0
  936. package/src/nitro-adapter.lock.json +1072 -14
  937. package/src/nitro-adapter.ts +33 -24
  938. package/src/nitro-bundle.ts +132 -22
  939. package/src/nitro-compile.ts +47 -7
  940. package/src/nitro-dependencies.ts +226 -0
  941. package/src/nitro-source.ts +200 -40
  942. package/src/nitroAdapterContract.ts +100 -20
  943. package/src/node-http-fetch.ts +116 -0
  944. package/src/packageVersionsContract.ts +79 -0
  945. package/src/react-native-bridge-modules.ts +24 -1
  946. package/src/react-native-host-modules.ts +111 -4
  947. package/src/runtime-assets.ts +10 -0
  948. package/src/serverDiscoveryContract.ts +1 -0
  949. package/src/settingsContract.ts +0 -30
  950. package/src/sim-client.ts +1 -1
  951. package/src/storageSnapshotContract.ts +22 -10
  952. package/src/stub-pattern-matcher.ts +17 -4
  953. package/src/swift-binary-modules.ts +20 -5
  954. package/src/swift-compile.ts +1292 -4123
  955. package/src/swift-compiler-digest.ts +1 -2
  956. package/src/swift-coverage/package.ts +103 -58
  957. package/src/swift-coverage/xcode-assets.ts +26 -5
  958. package/src/swift-coverage/xcode-bridging.ts +1 -12
  959. package/src/swift-coverage/xcode-packages.ts +167 -52
  960. package/src/swift-coverage/xcode.ts +2 -6
  961. package/src/swift-cxx-declarations.ts +205 -0
  962. package/src/swift-cxx-deps.ts +48 -0
  963. package/src/swift-cxx-reachable.ts +297 -0
  964. package/src/swift-cxx-standin.ts +248 -0
  965. package/src/swift-distribution.lock.json +29 -20
  966. package/src/swift-host.ts +229 -24
  967. package/src/swift-objc-compile.ts +638 -219
  968. package/src/swift-objc-import.ts +19 -964
  969. package/src/swift-objc-platform.ts +2 -2
  970. package/src/swift-objc-runtime.ts +7 -0
  971. package/src/swift-objc-standin.ts +314 -64
  972. package/src/swift-package-manifest.ts +179 -38
  973. package/src/swift-package.ts +156 -29
  974. package/src/swift-packages.ts +193 -34
  975. package/src/swift-pdf-raster.ts +114 -0
  976. package/src/swift-shared-sdk.ts +45 -0
  977. package/src/swift-source-file.ts +10 -6
  978. package/src/swift-source-pods.ts +126 -41
  979. package/src/swift-standin-digest.ts +74 -0
  980. package/src/swift-standin-emit.ts +48 -4
  981. package/src/swift-standins.ts +334 -92
  982. package/src/swift-submit.ts +24 -6
  983. package/src/swift-toolchain.ts +49 -9
  984. package/src/swiftContract.ts +58 -29
  985. package/src/vite-plugin.ts +0 -23
  986. package/src/workspace-root.ts +15 -0
  987. package/src/xcode-json-project.ts +52 -1
  988. package/src/xcode-project.ts +355 -65
  989. package/src/settings-flags.ts +0 -107
  990. package/src/swift-objc-export.ts +0 -532
  991. package/src/swift-objc-metadata.ts +0 -534
@@ -1,158 +1,1698 @@
1
- #pragma once
1
+ /*
2
+ * Copyright (c) 1999-2010 Apple Inc. All Rights Reserved.
3
+ *
4
+ * @APPLE_LICENSE_HEADER_START@
5
+ *
6
+ * This file contains Original Code and/or Modifications of Original Code
7
+ * as defined in and that are subject to the Apple Public Source License
8
+ * Version 2.0 (the 'License'). You may not use this file except in
9
+ * compliance with the License. Please obtain a copy of the License at
10
+ * http://www.opensource.apple.com/apsl/ and read it before using this
11
+ * file.
12
+ *
13
+ * The Original Code and all software distributed under the License are
14
+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
15
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
16
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
17
+ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
18
+ * Please see the License for the specific language governing rights and
19
+ * limitations under the License.
20
+ *
21
+ * @APPLE_LICENSE_HEADER_END@
22
+ */
23
+ #ifndef _MACHO_LOADER_H_
24
+ #define _MACHO_LOADER_H_
25
+
26
+ /*
27
+ * This file describes the format of mach object files.
28
+ */
2
29
  #include <stdint.h>
3
- #include <mach/mach_types.h>
4
- #define LC_SEGMENT_64 0x19
5
- #define MH_MAGIC 0xfeedface
6
- #define MH_CIGAM 0xcefaedfe
7
- #define MH_MAGIC_64 0xfeedfacf
8
- #define MH_CIGAM_64 0xcffaedfe
9
- #define MH_EXECUTE 0x2
10
- #define MH_DYLIB 0x6
11
- #define MH_DYLIB_STUB 0x9
12
- #define MH_DYLIB_IN_CACHE 0x80000000
13
- #define LC_REQ_DYLD 0x80000000
14
- #define LC_SEGMENT 0x1
15
- #define LC_SYMTAB 0x2
16
- #define LC_DYSYMTAB 0xb
17
- #define LC_LOAD_DYLIB 0xc
18
- #define LC_ID_DYLIB 0xd
19
- #define LC_LOAD_WEAK_DYLIB (0x18 | LC_REQ_DYLD)
20
- #define LC_UUID 0x1b
21
- #define SECTION_TYPE 0x000000ff
22
- #define S_NON_LAZY_SYMBOL_POINTERS 0x6
23
- #define S_LAZY_SYMBOL_POINTERS 0x7
24
- #define S_THREAD_LOCAL_VARIABLE_POINTERS 0x14
25
- #define SEG_PAGEZERO "__PAGEZERO"
26
- #define SEG_TEXT "__TEXT"
27
- #define SECT_TEXT "__text"
28
- #define SECT_FVMLIB_INIT0 "__fvmlib_init0"
29
- #define SECT_FVMLIB_INIT1 "__fvmlib_init1"
30
- #define SEG_DATA "__DATA"
31
- #define SECT_DATA "__data"
32
- #define SECT_BSS "__bss"
33
- #define SECT_COMMON "__common"
34
- #define SEG_OBJC "__OBJC"
35
- #define SECT_OBJC_SYMBOLS "__symbol_table"
36
- #define SECT_OBJC_MODULES "__module_info"
37
- #define SECT_OBJC_STRINGS "__selector_strs"
38
- #define SECT_OBJC_REFS "__selector_refs"
39
- #define SEG_ICON "__ICON"
40
- #define SECT_ICON_HEADER "__header"
41
- #define SECT_ICON_TIFF "__tiff"
42
- #define SEG_LINKEDIT "__LINKEDIT"
43
- #define SEG_UNIXSTACK "__UNIXSTACK"
44
- #define SEG_IMPORT "__IMPORT"
30
+
31
+ /*
32
+ * <mach/machine.h> is needed here for the cpu_type_t and cpu_subtype_t types
33
+ * and contains the constants for the possible values of these types.
34
+ */
35
+ #if __has_include(<mach/machine.h>)
36
+ #include <mach/machine.h>
37
+ #endif
38
+
39
+ /*
40
+ * <mach/vm_prot.h> is needed here for the vm_prot_t type and contains the
41
+ * constants that are or'ed together for the possible values of this type.
42
+ */
43
+ #if __has_include(<mach/vm_prot.h>)
44
+ #include <mach/vm_prot.h>
45
+ #endif
46
+
47
+ /*
48
+ * <machine/thread_status.h> is expected to define the flavors of the thread
49
+ * states and the structures of those flavors for each machine.
50
+ */
51
+ #if __has_include(<mach/machine/thread_status.h>)
52
+ #include <mach/machine/thread_status.h>
53
+ #endif
54
+ #if __has_include(<architecture/byte_order.h>)
55
+ #include <architecture/byte_order.h>
56
+ #endif
57
+
58
+ /*
59
+ * The 32-bit mach header appears at the very beginning of the object file for
60
+ * 32-bit architectures.
61
+ */
45
62
  struct mach_header {
46
- uint32_t magic;
47
- int32_t cputype;
48
- int32_t cpusubtype;
49
- uint32_t filetype;
50
- uint32_t ncmds;
51
- uint32_t sizeofcmds;
52
- uint32_t flags;
63
+ uint32_t magic; /* mach magic number identifier */
64
+ int32_t cputype; /* cpu specifier */
65
+ int32_t cpusubtype; /* machine specifier */
66
+ uint32_t filetype; /* type of file */
67
+ uint32_t ncmds; /* number of load commands */
68
+ uint32_t sizeofcmds; /* the size of all the load commands */
69
+ uint32_t flags; /* flags */
70
+ };
71
+
72
+ /* Constant for the magic field of the mach_header (32-bit architectures) */
73
+ #define MH_MAGIC 0xfeedface /* the mach magic number */
74
+ #define MH_CIGAM 0xcefaedfe /* NXSwapInt(MH_MAGIC) */
75
+
76
+ /*
77
+ * The 64-bit mach header appears at the very beginning of object files for
78
+ * 64-bit architectures.
79
+ */
80
+ struct mach_header_64 {
81
+ uint32_t magic; /* mach magic number identifier */
82
+ int32_t cputype; /* cpu specifier */
83
+ int32_t cpusubtype; /* machine specifier */
84
+ uint32_t filetype; /* type of file */
85
+ uint32_t ncmds; /* number of load commands */
86
+ uint32_t sizeofcmds; /* the size of all the load commands */
87
+ uint32_t flags; /* flags */
88
+ uint32_t reserved; /* reserved */
53
89
  };
90
+
91
+ /* Constant for the magic field of the mach_header_64 (64-bit architectures) */
92
+ #define MH_MAGIC_64 0xfeedfacf /* the 64-bit mach magic number */
93
+ #define MH_CIGAM_64 0xcffaedfe /* NXSwapInt(MH_MAGIC_64) */
94
+
95
+ /*
96
+ * The layout of the file depends on the filetype. For all but the MH_OBJECT
97
+ * file type the segments are padded out and aligned on a segment alignment
98
+ * boundary for efficient demand pageing. The MH_EXECUTE, MH_FVMLIB, MH_DYLIB,
99
+ * MH_DYLINKER and MH_BUNDLE file types also have the headers included as part
100
+ * of their first segment.
101
+ *
102
+ * The file type MH_OBJECT is a compact format intended as output of the
103
+ * assembler and input (and possibly output) of the link editor (the .o
104
+ * format). All sections are in one unnamed segment with no segment padding.
105
+ * This format is used as an executable format when the file is so small the
106
+ * segment padding greatly increases its size.
107
+ *
108
+ * The file type MH_PRELOAD is an executable format intended for things that
109
+ * are not executed under the kernel (proms, stand alones, kernels, etc). The
110
+ * format can be executed under the kernel but may demand paged it and not
111
+ * preload it before execution.
112
+ *
113
+ * A core file is in MH_CORE format and can be any in an arbritray legal
114
+ * Mach-O file.
115
+ *
116
+ * Constants for the filetype field of the mach_header
117
+ */
118
+ #define MH_OBJECT 0x1 /* relocatable object file */
119
+ #define MH_EXECUTE 0x2 /* demand paged executable file */
120
+ #define MH_FVMLIB 0x3 /* fixed VM shared library file */
121
+ #define MH_CORE 0x4 /* core file */
122
+ #define MH_PRELOAD 0x5 /* preloaded executable file */
123
+ #define MH_DYLIB 0x6 /* dynamically bound shared library */
124
+ #define MH_DYLINKER 0x7 /* dynamic link editor */
125
+ #define MH_BUNDLE 0x8 /* dynamically bound bundle file */
126
+ #define MH_DYLIB_STUB 0x9 /* shared library stub for static
127
+ linking only, no section contents */
128
+ #define MH_DSYM 0xa /* companion file with only debug
129
+ sections */
130
+ #define MH_KEXT_BUNDLE 0xb /* x86_64 kexts */
131
+ #define MH_FILESET 0xc /* a file composed of other Mach-Os to
132
+ be run in the same userspace sharing
133
+ a single linkedit. */
134
+ #define MH_GPU_EXECUTE 0xd /* gpu program */
135
+ #define MH_GPU_DYLIB 0xe /* gpu support functions */
136
+
137
+
138
+ /* Constants for the flags field of the mach_header */
139
+ #define MH_NOUNDEFS 0x1 /* the object file has no undefined
140
+ references */
141
+ #define MH_INCRLINK 0x2 /* the object file is the output of an
142
+ incremental link against a base file
143
+ and can't be link edited again */
144
+ #define MH_DYLDLINK 0x4 /* the object file is input for the
145
+ dynamic linker and can't be staticly
146
+ link edited again */
147
+ #define MH_BINDATLOAD 0x8 /* the object file's undefined
148
+ references are bound by the dynamic
149
+ linker when loaded. */
150
+ #define MH_PREBOUND 0x10 /* the file has its dynamic undefined
151
+ references prebound. */
152
+ #define MH_SPLIT_SEGS 0x20 /* the file has its read-only and
153
+ read-write segments split */
154
+ #define MH_LAZY_INIT 0x40 /* the shared library init routine is
155
+ to be run lazily via catching memory
156
+ faults to its writeable segments
157
+ (obsolete) */
158
+ #define MH_TWOLEVEL 0x80 /* the image is using two-level name
159
+ space bindings */
160
+ #define MH_FORCE_FLAT 0x100 /* the executable is forcing all images
161
+ to use flat name space bindings */
162
+ #define MH_NOMULTIDEFS 0x200 /* this umbrella guarantees no multiple
163
+ defintions of symbols in its
164
+ sub-images so the two-level namespace
165
+ hints can always be used. */
166
+ #define MH_NOFIXPREBINDING 0x400 /* do not have dyld notify the
167
+ prebinding agent about this
168
+ executable */
169
+ #define MH_PREBINDABLE 0x800 /* the binary is not prebound but can
170
+ have its prebinding redone. only used
171
+ when MH_PREBOUND is not set. */
172
+ #define MH_ALLMODSBOUND 0x1000 /* indicates that this binary binds to
173
+ all two-level namespace modules of
174
+ its dependent libraries. only used
175
+ when MH_PREBINDABLE and MH_TWOLEVEL
176
+ are both set. */
177
+ #define MH_SUBSECTIONS_VIA_SYMBOLS 0x2000/* safe to divide up the sections into
178
+ sub-sections via symbols for dead
179
+ code stripping */
180
+ #define MH_CANONICAL 0x4000 /* the binary has been canonicalized
181
+ via the unprebind operation */
182
+ #define MH_WEAK_DEFINES 0x8000 /* the final linked image contains
183
+ external weak symbols */
184
+ #define MH_BINDS_TO_WEAK 0x10000 /* the final linked image uses
185
+ weak symbols */
186
+
187
+ #define MH_ALLOW_STACK_EXECUTION 0x20000/* When this bit is set, all stacks
188
+ in the task will be given stack
189
+ execution privilege. Only used in
190
+ MH_EXECUTE filetypes. */
191
+ #define MH_ROOT_SAFE 0x40000 /* When this bit is set, the binary
192
+ declares it is safe for use in
193
+ processes with uid zero */
194
+
195
+ #define MH_SETUID_SAFE 0x80000 /* When this bit is set, the binary
196
+ declares it is safe for use in
197
+ processes when issetugid() is true */
198
+
199
+ #define MH_NO_REEXPORTED_DYLIBS 0x100000 /* When this bit is set on a dylib,
200
+ the static linker does not need to
201
+ examine dependent dylibs to see
202
+ if any are re-exported */
203
+ #define MH_PIE 0x200000 /* When this bit is set, the OS will
204
+ load the main executable at a
205
+ random address. Only used in
206
+ MH_EXECUTE filetypes. */
207
+ #define MH_DEAD_STRIPPABLE_DYLIB 0x400000 /* Only for use on dylibs. When
208
+ linking against a dylib that
209
+ has this bit set, the static linker
210
+ will automatically not create a
211
+ LC_LOAD_DYLIB load command to the
212
+ dylib if no symbols are being
213
+ referenced from the dylib. */
214
+ #define MH_HAS_TLV_DESCRIPTORS 0x800000 /* Contains a section of type
215
+ S_THREAD_LOCAL_VARIABLES */
216
+
217
+ #define MH_NO_HEAP_EXECUTION 0x1000000 /* When this bit is set, the OS will
218
+ run the main executable with
219
+ a non-executable heap even on
220
+ platforms (e.g. i386) that don't
221
+ require it. Only used in MH_EXECUTE
222
+ filetypes. */
223
+
224
+ #define MH_APP_EXTENSION_SAFE 0x02000000 /* The code was linked for use in an
225
+ application extension. */
226
+
227
+ #define MH_NLIST_OUTOFSYNC_WITH_DYLDINFO 0x04000000 /* The external symbols
228
+ listed in the nlist symbol table do
229
+ not include all the symbols listed in
230
+ the dyld info. */
231
+
232
+ #define MH_SIM_SUPPORT 0x08000000 /* Allow LC_MIN_VERSION_MACOS and
233
+ LC_BUILD_VERSION load commands with
234
+ the platforms macOS, macCatalyst,
235
+ iOSSimulator, tvOSSimulator and
236
+ watchOSSimulator. */
237
+
238
+ #define MH_IMPLICIT_PAGEZERO 0x10000000 /* main executable has no __PAGEZERO
239
+ segment. Instead, loader (xnu)
240
+ will load program high and block
241
+ out all memory below it. */
242
+
243
+ #define MH_DYLIB_IN_CACHE 0x80000000 /* Only for use on dylibs. When this bit
244
+ is set, the dylib is part of the dyld
245
+ shared cache, rather than loose in
246
+ the filesystem. */
247
+
248
+ /*
249
+ * The load commands directly follow the mach_header. The total size of all
250
+ * of the commands is given by the sizeofcmds field in the mach_header. All
251
+ * load commands must have as their first two fields cmd and cmdsize. The cmd
252
+ * field is filled in with a constant for that command type. Each command type
253
+ * has a structure specifically for it. The cmdsize field is the size in bytes
254
+ * of the particular load command structure plus anything that follows it that
255
+ * is a part of the load command (i.e. section structures, strings, etc.). To
256
+ * advance to the next load command the cmdsize can be added to the offset or
257
+ * pointer of the current load command. The cmdsize for 32-bit architectures
258
+ * MUST be a multiple of 4 bytes and for 64-bit architectures MUST be a multiple
259
+ * of 8 bytes (these are forever the maximum alignment of any load commands).
260
+ * The padded bytes must be zero. All tables in the object file must also
261
+ * follow these rules so the file can be memory mapped. Otherwise the pointers
262
+ * to these tables will not work well or at all on some machines. With all
263
+ * padding zeroed like objects will compare byte for byte.
264
+ */
54
265
  struct load_command {
55
- uint32_t cmd;
56
- uint32_t cmdsize;
57
- };
58
- struct segment_command {
59
- uint32_t cmd;
60
- uint32_t cmdsize;
61
- char segname[16];
62
- uint32_t vmaddr;
63
- uint32_t vmsize;
64
- uint32_t fileoff;
65
- uint32_t filesize;
66
- int32_t maxprot;
67
- int32_t initprot;
68
- uint32_t nsects;
69
- uint32_t flags;
70
- };
71
- struct section {
72
- char sectname[16];
73
- char segname[16];
74
- uint32_t addr;
75
- uint32_t size;
76
- uint32_t offset;
77
- uint32_t align;
78
- uint32_t reloff;
79
- uint32_t nreloc;
80
- uint32_t flags;
266
+ uint32_t cmd; /* type of load command */
267
+ uint32_t cmdsize; /* total size of command in bytes */
268
+ };
269
+
270
+ /*
271
+ * After MacOS X 10.1 when a new load command is added that is required to be
272
+ * understood by the dynamic linker for the image to execute properly the
273
+ * LC_REQ_DYLD bit will be or'ed into the load command constant. If the dynamic
274
+ * linker sees such a load command it it does not understand will issue a
275
+ * "unknown load command required for execution" error and refuse to use the
276
+ * image. Other load commands without this bit that are not understood will
277
+ * simply be ignored.
278
+ */
279
+ #define LC_REQ_DYLD 0x80000000
280
+
281
+ /* Constants for the cmd field of all load commands, the type */
282
+ #define LC_SEGMENT 0x1 /* segment of this file to be mapped */
283
+ #define LC_SYMTAB 0x2 /* link-edit stab symbol table info */
284
+ #define LC_SYMSEG 0x3 /* link-edit gdb symbol table info (obsolete) */
285
+ #define LC_THREAD 0x4 /* thread */
286
+ #define LC_UNIXTHREAD 0x5 /* unix thread (includes a stack) */
287
+ #define LC_LOADFVMLIB 0x6 /* load a specified fixed VM shared library */
288
+ #define LC_IDFVMLIB 0x7 /* fixed VM shared library identification */
289
+ #define LC_IDENT 0x8 /* object identification info (obsolete) */
290
+ #define LC_FVMFILE 0x9 /* fixed VM file inclusion (internal use) */
291
+ #define LC_PREPAGE 0xa /* prepage command (internal use) */
292
+ #define LC_DYSYMTAB 0xb /* dynamic link-edit symbol table info */
293
+ #define LC_LOAD_DYLIB 0xc /* load a dynamically linked shared library */
294
+ #define LC_ID_DYLIB 0xd /* dynamically linked shared lib ident */
295
+ #define LC_LOAD_DYLINKER 0xe /* load a dynamic linker */
296
+ #define LC_ID_DYLINKER 0xf /* dynamic linker identification */
297
+ #define LC_PREBOUND_DYLIB 0x10 /* modules prebound for a dynamically */
298
+ /* linked shared library */
299
+ #define LC_ROUTINES 0x11 /* image routines */
300
+ #define LC_SUB_FRAMEWORK 0x12 /* sub framework */
301
+ #define LC_SUB_UMBRELLA 0x13 /* sub umbrella */
302
+ #define LC_SUB_CLIENT 0x14 /* sub client */
303
+ #define LC_SUB_LIBRARY 0x15 /* sub library */
304
+ #define LC_TWOLEVEL_HINTS 0x16 /* two-level namespace lookup hints */
305
+ #define LC_PREBIND_CKSUM 0x17 /* prebind checksum */
306
+
307
+ /*
308
+ * load a dynamically linked shared library that is allowed to be missing
309
+ * (all symbols are weak imported).
310
+ */
311
+ #define LC_LOAD_WEAK_DYLIB (0x18 | LC_REQ_DYLD)
312
+
313
+ #define LC_SEGMENT_64 0x19 /* 64-bit segment of this file to be
314
+ mapped */
315
+ #define LC_ROUTINES_64 0x1a /* 64-bit image routines */
316
+ #define LC_UUID 0x1b /* the uuid */
317
+ #define LC_RPATH (0x1c | LC_REQ_DYLD) /* runpath additions */
318
+ #define LC_CODE_SIGNATURE 0x1d /* local of code signature */
319
+ #define LC_SEGMENT_SPLIT_INFO 0x1e /* local of info to split segments */
320
+ #define LC_REEXPORT_DYLIB (0x1f | LC_REQ_DYLD) /* load and re-export dylib */
321
+ #define LC_LAZY_LOAD_DYLIB 0x20 /* delay load of dylib until first use */
322
+ #define LC_ENCRYPTION_INFO 0x21 /* encrypted segment information */
323
+ #define LC_DYLD_INFO 0x22 /* compressed dyld information */
324
+ #define LC_DYLD_INFO_ONLY (0x22|LC_REQ_DYLD) /* compressed dyld information only */
325
+ #define LC_LOAD_UPWARD_DYLIB (0x23 | LC_REQ_DYLD) /* load upward dylib */
326
+ #define LC_VERSION_MIN_MACOSX 0x24 /* build for MacOSX min OS version */
327
+ #define LC_VERSION_MIN_IPHONEOS 0x25 /* build for iPhoneOS min OS version */
328
+ #define LC_FUNCTION_STARTS 0x26 /* compressed table of function start addresses */
329
+ #define LC_DYLD_ENVIRONMENT 0x27 /* string for dyld to treat
330
+ like environment variable */
331
+ #define LC_MAIN (0x28|LC_REQ_DYLD) /* replacement for LC_UNIXTHREAD */
332
+ #define LC_DATA_IN_CODE 0x29 /* table of non-instructions in __text */
333
+ #define LC_SOURCE_VERSION 0x2A /* source version used to build binary */
334
+ #define LC_DYLIB_CODE_SIGN_DRS 0x2B /* Code signing DRs copied from linked dylibs */
335
+ #define LC_ENCRYPTION_INFO_64 0x2C /* 64-bit encrypted segment information */
336
+ #define LC_LINKER_OPTION 0x2D /* linker options in MH_OBJECT files */
337
+ #define LC_LINKER_OPTIMIZATION_HINT 0x2E /* optimization hints in MH_OBJECT files */
338
+ #define LC_VERSION_MIN_TVOS 0x2F /* build for AppleTV min OS version */
339
+ #define LC_VERSION_MIN_WATCHOS 0x30 /* build for Watch min OS version */
340
+ #define LC_NOTE 0x31 /* arbitrary data included within a Mach-O file */
341
+ #define LC_BUILD_VERSION 0x32 /* build for platform min OS version */
342
+ #define LC_DYLD_EXPORTS_TRIE (0x33 | LC_REQ_DYLD) /* used with linkedit_data_command, payload is trie */
343
+ #define LC_DYLD_CHAINED_FIXUPS (0x34 | LC_REQ_DYLD) /* used with linkedit_data_command */
344
+ #define LC_FILESET_ENTRY (0x35 | LC_REQ_DYLD) /* used with fileset_entry_command */
345
+ #define LC_ATOM_INFO 0x36 /* used with linkedit_data_command */
346
+ #define LC_FUNCTION_VARIANTS 0x37 /* used with linkedit_data_command */
347
+ #define LC_FUNCTION_VARIANT_FIXUPS 0x38 /* used with linkedit_data_command */
348
+ #define LC_TARGET_TRIPLE 0x39 /* target triple used to compile */
349
+ #define LC_LAZY_LOAD_DYLIB_INFO 0x3A /* used with linkedit_data_command */
350
+
351
+
352
+ /*
353
+ * A variable length string in a load command is represented by an lc_str
354
+ * union. The strings are stored just after the load command structure and
355
+ * the offset is from the start of the load command structure. The size
356
+ * of the string is reflected in the cmdsize field of the load command.
357
+ * Once again any padded bytes to bring the cmdsize field to a multiple
358
+ * of 4 bytes must be zero.
359
+ */
360
+ union lc_str {
361
+ uint32_t offset; /* offset to the string */
362
+ #ifndef __LP64__
363
+ char *ptr; /* pointer to the string */
364
+ #endif
365
+ };
366
+
367
+ /*
368
+ * The segment load command indicates that a part of this file is to be
369
+ * mapped into the task's address space. The size of this segment in memory,
370
+ * vmsize, maybe equal to or larger than the amount to map from this file,
371
+ * filesize. The file is mapped starting at fileoff to the beginning of
372
+ * the segment in memory, vmaddr. The rest of the memory of the segment,
373
+ * if any, is allocated zero fill on demand. The segment's maximum virtual
374
+ * memory protection and initial virtual memory protection are specified
375
+ * by the maxprot and initprot fields. If the segment has sections then the
376
+ * section structures directly follow the segment command and their size is
377
+ * reflected in cmdsize.
378
+ */
379
+ struct segment_command { /* for 32-bit architectures */
380
+ uint32_t cmd; /* LC_SEGMENT */
381
+ uint32_t cmdsize; /* includes sizeof section structs */
382
+ char segname[16]; /* segment name */
383
+ uint32_t vmaddr; /* memory address of this segment */
384
+ uint32_t vmsize; /* memory size of this segment */
385
+ uint32_t fileoff; /* file offset of this segment */
386
+ uint32_t filesize; /* amount to map from the file */
387
+ int32_t maxprot; /* maximum VM protection */
388
+ int32_t initprot; /* initial VM protection */
389
+ uint32_t nsects; /* number of sections in segment */
390
+ uint32_t flags; /* flags */
391
+ };
392
+
393
+ /*
394
+ * The 64-bit segment load command indicates that a part of this file is to be
395
+ * mapped into a 64-bit task's address space. If the 64-bit segment has
396
+ * sections then section_64 structures directly follow the 64-bit segment
397
+ * command and their size is reflected in cmdsize.
398
+ */
399
+ struct segment_command_64 { /* for 64-bit architectures */
400
+ uint32_t cmd; /* LC_SEGMENT_64 */
401
+ uint32_t cmdsize; /* includes sizeof section_64 structs */
402
+ char segname[16]; /* segment name */
403
+ uint64_t vmaddr; /* memory address of this segment */
404
+ uint64_t vmsize; /* memory size of this segment */
405
+ uint64_t fileoff; /* file offset of this segment */
406
+ uint64_t filesize; /* amount to map from the file */
407
+ int32_t maxprot; /* maximum VM protection */
408
+ int32_t initprot; /* initial VM protection */
409
+ uint32_t nsects; /* number of sections in segment */
410
+ uint32_t flags; /* flags */
411
+ };
412
+
413
+ /* Constants for the flags field of the segment_command */
414
+ #define SG_HIGHVM 0x1 /* the file contents for this segment is for
415
+ the high part of the VM space, the low part
416
+ is zero filled (for stacks in core files) */
417
+ #define SG_FVMLIB 0x2 /* this segment is the VM that is allocated by
418
+ a fixed VM library, for overlap checking in
419
+ the link editor */
420
+ #define SG_NORELOC 0x4 /* this segment has nothing that was relocated
421
+ in it and nothing relocated to it, that is
422
+ it maybe safely replaced without relocation*/
423
+ #define SG_PROTECTED_VERSION_1 0x8 /* This segment is protected. If the
424
+ segment starts at file offset 0, the
425
+ first page of the segment is not
426
+ protected. All other pages of the
427
+ segment are protected. */
428
+ #define SG_READ_ONLY 0x10 /* This segment is made read-only after fixups */
429
+
430
+
431
+
432
+ /*
433
+ * A segment is made up of zero or more sections. Non-MH_OBJECT files have
434
+ * all of their segments with the proper sections in each, and padded to the
435
+ * specified segment alignment when produced by the link editor. The first
436
+ * segment of a MH_EXECUTE and MH_FVMLIB format file contains the mach_header
437
+ * and load commands of the object file before its first section. The zero
438
+ * fill sections are always last in their segment (in all formats). This
439
+ * allows the zeroed segment padding to be mapped into memory where zero fill
440
+ * sections might be. The gigabyte zero fill sections, those with the section
441
+ * type S_GB_ZEROFILL, can only be in a segment with sections of this type.
442
+ * These segments are then placed after all other segments.
443
+ *
444
+ * The MH_OBJECT format has all of its sections in one segment for
445
+ * compactness. There is no padding to a specified segment boundary and the
446
+ * mach_header and load commands are not part of the segment.
447
+ *
448
+ * Sections with the same section name, sectname, going into the same segment,
449
+ * segname, are combined by the link editor. The resulting section is aligned
450
+ * to the maximum alignment of the combined sections and is the new section's
451
+ * alignment. The combined sections are aligned to their original alignment in
452
+ * the combined section. Any padded bytes to get the specified alignment are
453
+ * zeroed.
454
+ *
455
+ * The format of the relocation entries referenced by the reloff and nreloc
456
+ * fields of the section structure for mach object files is described in the
457
+ * header file <reloc.h>.
458
+ */
459
+ struct section { /* for 32-bit architectures */
460
+ char sectname[16]; /* name of this section */
461
+ char segname[16]; /* segment this section goes in */
462
+ uint32_t addr; /* memory address of this section */
463
+ uint32_t size; /* size in bytes of this section */
464
+ uint32_t offset; /* file offset of this section */
465
+ uint32_t align; /* section alignment (power of 2) */
466
+ uint32_t reloff; /* file offset of relocation entries */
467
+ uint32_t nreloc; /* number of relocation entries */
468
+ uint32_t flags; /* flags (section type and attributes)*/
469
+ uint32_t reserved1; /* reserved (for offset or index) */
470
+ uint32_t reserved2; /* reserved (for count or sizeof) */
471
+ };
472
+
473
+ struct section_64 { /* for 64-bit architectures */
474
+ char sectname[16]; /* name of this section */
475
+ char segname[16]; /* segment this section goes in */
476
+ uint64_t addr; /* memory address of this section */
477
+ uint64_t size; /* size in bytes of this section */
478
+ uint32_t offset; /* file offset of this section */
479
+ uint32_t align; /* section alignment (power of 2) */
480
+ uint32_t reloff; /* file offset of relocation entries */
481
+ uint32_t nreloc; /* number of relocation entries */
482
+ uint32_t flags; /* flags (section type and attributes)*/
483
+ uint32_t reserved1; /* reserved (for offset or index) */
484
+ uint32_t reserved2; /* reserved (for count or sizeof) */
485
+ uint32_t reserved3; /* reserved */
486
+ };
487
+
488
+ /*
489
+ * The flags field of a section structure is separated into two parts a section
490
+ * type and section attributes. The section types are mutually exclusive (it
491
+ * can only have one type) but the section attributes are not (it may have more
492
+ * than one attribute).
493
+ */
494
+ #define SECTION_TYPE 0x000000ff /* 256 section types */
495
+ #define SECTION_ATTRIBUTES 0xffffff00 /* 24 section attributes */
496
+
497
+ /* Constants for the type of a section */
498
+ #define S_REGULAR 0x0 /* regular section */
499
+ #define S_ZEROFILL 0x1 /* zero fill on demand section */
500
+ #define S_CSTRING_LITERALS 0x2 /* section with only literal C strings*/
501
+ #define S_4BYTE_LITERALS 0x3 /* section with only 4 byte literals */
502
+ #define S_8BYTE_LITERALS 0x4 /* section with only 8 byte literals */
503
+ #define S_LITERAL_POINTERS 0x5 /* section with only pointers to */
504
+ /* literals */
505
+ /*
506
+ * For the two types of symbol pointers sections and the symbol stubs section
507
+ * they have indirect symbol table entries. For each of the entries in the
508
+ * section the indirect symbol table entries, in corresponding order in the
509
+ * indirect symbol table, start at the index stored in the reserved1 field
510
+ * of the section structure. Since the indirect symbol table entries
511
+ * correspond to the entries in the section the number of indirect symbol table
512
+ * entries is inferred from the size of the section divided by the size of the
513
+ * entries in the section. For symbol pointers sections the size of the entries
514
+ * in the section is 4 bytes and for symbol stubs sections the byte size of the
515
+ * stubs is stored in the reserved2 field of the section structure.
516
+ */
517
+ #define S_NON_LAZY_SYMBOL_POINTERS 0x6 /* section with only non-lazy
518
+ symbol pointers */
519
+ #define S_LAZY_SYMBOL_POINTERS 0x7 /* section with only lazy symbol
520
+ pointers */
521
+ #define S_SYMBOL_STUBS 0x8 /* section with only symbol
522
+ stubs, byte size of stub in
523
+ the reserved2 field */
524
+ #define S_MOD_INIT_FUNC_POINTERS 0x9 /* section with only function
525
+ pointers for initialization*/
526
+ #define S_MOD_TERM_FUNC_POINTERS 0xa /* section with only function
527
+ pointers for termination */
528
+ #define S_COALESCED 0xb /* section contains symbols that
529
+ are to be coalesced */
530
+ #define S_GB_ZEROFILL 0xc /* zero fill on demand section
531
+ (that can be larger than 4
532
+ gigabytes) */
533
+ #define S_INTERPOSING 0xd /* section with only pairs of
534
+ function pointers for
535
+ interposing */
536
+ #define S_16BYTE_LITERALS 0xe /* section with only 16 byte
537
+ literals */
538
+ #define S_DTRACE_DOF 0xf /* section contains
539
+ DTrace Object Format */
540
+ #define S_LAZY_DYLIB_SYMBOL_POINTERS 0x10 /* section with only lazy
541
+ symbol pointers to lazy
542
+ loaded dylibs */
543
+ /*
544
+ * Section types to support thread local variables
545
+ */
546
+ #define S_THREAD_LOCAL_REGULAR 0x11 /* template of initial
547
+ values for TLVs */
548
+ #define S_THREAD_LOCAL_ZEROFILL 0x12 /* template of initial
549
+ values for TLVs */
550
+ #define S_THREAD_LOCAL_VARIABLES 0x13 /* TLV descriptors */
551
+ #define S_THREAD_LOCAL_VARIABLE_POINTERS 0x14 /* pointers to TLV
552
+ descriptors */
553
+ #define S_THREAD_LOCAL_INIT_FUNCTION_POINTERS 0x15 /* functions to call
554
+ to initialize TLV
555
+ values */
556
+ #define S_INIT_FUNC_OFFSETS 0x16 /* 32-bit offsets to
557
+ initializers */
558
+
559
+ /*
560
+ * Constants for the section attributes part of the flags field of a section
561
+ * structure.
562
+ */
563
+ #define SECTION_ATTRIBUTES_USR 0xff000000 /* User setable attributes */
564
+ #define S_ATTR_PURE_INSTRUCTIONS 0x80000000 /* section contains only true
565
+ machine instructions */
566
+ #define S_ATTR_NO_TOC 0x40000000 /* section contains coalesced
567
+ symbols that are not to be
568
+ in a ranlib table of
569
+ contents */
570
+ #define S_ATTR_STRIP_STATIC_SYMS 0x20000000 /* ok to strip static symbols
571
+ in this section in files
572
+ with the MH_DYLDLINK flag */
573
+ #define S_ATTR_NO_DEAD_STRIP 0x10000000 /* no dead stripping */
574
+ #define S_ATTR_LIVE_SUPPORT 0x08000000 /* blocks are live if they
575
+ reference live blocks */
576
+ #define S_ATTR_SELF_MODIFYING_CODE 0x04000000 /* Used with i386 code stubs
577
+ written on by dyld */
578
+ /*
579
+ * If a segment contains any sections marked with S_ATTR_DEBUG then all
580
+ * sections in that segment must have this attribute. No section other than
581
+ * a section marked with this attribute may reference the contents of this
582
+ * section. A section with this attribute may contain no symbols and must have
583
+ * a section type S_REGULAR. The static linker will not copy section contents
584
+ * from sections with this attribute into its output file. These sections
585
+ * generally contain DWARF debugging info.
586
+ */
587
+ #define S_ATTR_DEBUG 0x02000000 /* a debug section */
588
+ #define SECTION_ATTRIBUTES_SYS 0x00ffff00 /* system setable attributes */
589
+ #define S_ATTR_SOME_INSTRUCTIONS 0x00000400 /* section contains some
590
+ machine instructions */
591
+ #define S_ATTR_EXT_RELOC 0x00000200 /* section has external
592
+ relocation entries */
593
+ #define S_ATTR_LOC_RELOC 0x00000100 /* section has local
594
+ relocation entries */
595
+
596
+
597
+ /*
598
+ * The names of segments and sections in them are mostly meaningless to the
599
+ * link-editor. But there are few things to support traditional UNIX
600
+ * executables that require the link-editor and assembler to use some names
601
+ * agreed upon by convention.
602
+ *
603
+ * The initial protection of the "__TEXT" segment has write protection turned
604
+ * off (not writeable).
605
+ *
606
+ * The link-editor will allocate common symbols at the end of the "__common"
607
+ * section in the "__DATA" segment. It will create the section and segment
608
+ * if needed.
609
+ */
610
+
611
+ /* The currently known segment names and the section names in those segments */
612
+
613
+ #define SEG_PAGEZERO "__PAGEZERO" /* the pagezero segment which has no */
614
+ /* protections and catches NULL */
615
+ /* references for MH_EXECUTE files */
616
+
617
+
618
+ #define SEG_TEXT "__TEXT" /* the tradition UNIX text segment */
619
+ #define SECT_TEXT "__text" /* the real text part of the text */
620
+ /* section no headers, and no padding */
621
+ #define SECT_FVMLIB_INIT0 "__fvmlib_init0" /* the fvmlib initialization */
622
+ /* section */
623
+ #define SECT_FVMLIB_INIT1 "__fvmlib_init1" /* the section following the */
624
+ /* fvmlib initialization */
625
+ /* section */
626
+
627
+ #define SEG_DATA "__DATA" /* the tradition UNIX data segment */
628
+ #define SECT_DATA "__data" /* the real initialized data section */
629
+ /* no padding, no bss overlap */
630
+ #define SECT_BSS "__bss" /* the real uninitialized data section*/
631
+ /* no padding */
632
+ #define SECT_COMMON "__common" /* the section common symbols are */
633
+ /* allocated in by the link editor */
634
+
635
+ #define SEG_OBJC "__OBJC" /* objective-C runtime segment */
636
+ #define SECT_OBJC_SYMBOLS "__symbol_table" /* symbol table */
637
+ #define SECT_OBJC_MODULES "__module_info" /* module information */
638
+ #define SECT_OBJC_STRINGS "__selector_strs" /* string table */
639
+ #define SECT_OBJC_REFS "__selector_refs" /* string table */
640
+
641
+ #define SEG_ICON "__ICON" /* the icon segment */
642
+ #define SECT_ICON_HEADER "__header" /* the icon headers */
643
+ #define SECT_ICON_TIFF "__tiff" /* the icons in tiff format */
644
+
645
+ #define SEG_LINKEDIT "__LINKEDIT" /* the segment containing all structs */
646
+ /* created and maintained by the link */
647
+ /* editor. Created with -seglinkedit */
648
+ /* option to ld(1) for MH_EXECUTE and */
649
+ /* FVMLIB file types only */
650
+
651
+ #define SEG_UNIXSTACK "__UNIXSTACK" /* the unix stack segment */
652
+
653
+ #define SEG_IMPORT "__IMPORT" /* the segment for the self (dyld) */
654
+ /* modifing code stubs that has read, */
655
+ /* write and execute permissions */
656
+
657
+ /*
658
+ * Fixed virtual memory shared libraries are identified by two things. The
659
+ * target pathname (the name of the library as found for execution), and the
660
+ * minor version number. The address of where the headers are loaded is in
661
+ * header_addr. (THIS IS OBSOLETE and no longer supported).
662
+ */
663
+ struct fvmlib {
664
+ union lc_str name; /* library's target pathname */
665
+ uint32_t minor_version; /* library's minor version number */
666
+ uint32_t header_addr; /* library's header address */
667
+ };
668
+
669
+ /*
670
+ * A fixed virtual shared library (filetype == MH_FVMLIB in the mach header)
671
+ * contains a fvmlib_command (cmd == LC_IDFVMLIB) to identify the library.
672
+ * An object that uses a fixed virtual shared library also contains a
673
+ * fvmlib_command (cmd == LC_LOADFVMLIB) for each library it uses.
674
+ * (THIS IS OBSOLETE and no longer supported).
675
+ */
676
+ struct fvmlib_command {
677
+ uint32_t cmd; /* LC_IDFVMLIB or LC_LOADFVMLIB */
678
+ uint32_t cmdsize; /* includes pathname string */
679
+ struct fvmlib fvmlib; /* the library identification */
680
+ };
681
+
682
+ /*
683
+ * Dynamically linked shared libraries are identified by two things. The
684
+ * pathname (the name of the library as found for execution), and the
685
+ * compatibility version number. The pathname must match and the compatibility
686
+ * number in the user of the library must be greater than or equal to the
687
+ * library being used. The time stamp is used to record the time a library was
688
+ * built and copied into user so it can be use to determined if the library used
689
+ * at runtime is exactly the same as used to built the program.
690
+ */
691
+ struct dylib {
692
+ union lc_str name; /* library's path name */
693
+ uint32_t timestamp; /* library's build time stamp */
694
+ uint32_t current_version; /* library's current version number */
695
+ uint32_t compatibility_version; /* library's compatibility vers number*/
696
+ };
697
+
698
+ /*
699
+ * A dynamically linked shared library (filetype == MH_DYLIB in the mach header)
700
+ * contains a dylib_command (cmd == LC_ID_DYLIB) to identify the library.
701
+ * An object that uses a dynamically linked shared library also contains a
702
+ * dylib_command (cmd == LC_LOAD_DYLIB, LC_LOAD_WEAK_DYLIB, or
703
+ * LC_REEXPORT_DYLIB) for each library it uses.
704
+ */
705
+ struct dylib_command {
706
+ uint32_t cmd; /* LC_ID_DYLIB, LC_LOAD_{,WEAK_}DYLIB,
707
+ LC_REEXPORT_DYLIB */
708
+ uint32_t cmdsize; /* includes pathname string */
709
+ struct dylib dylib; /* the library identification */
710
+ };
711
+
712
+
713
+ /*
714
+ * An alternate encoding for: LC_LOAD_DYLIB.
715
+ * The flags field contains independent flags DYLIB_USE_*
716
+ * First supported in macOS 15, iOS 18.
717
+ */
718
+ struct dylib_use_command {
719
+ uint32_t cmd; /* LC_LOAD_DYLIB or LC_LOAD_WEAK_DYLIB */
720
+ uint32_t cmdsize; /* overall size, including path */
721
+ uint32_t nameoff; /* == 28, dylibs's path offset */
722
+ uint32_t marker; /* == DYLIB_USE_MARKER */
723
+ uint32_t current_version; /* dylib's current version number */
724
+ uint32_t compat_version; /* dylib's compatibility version number */
725
+ uint32_t flags; /* DYLIB_USE_... flags */
726
+ };
727
+ #define DYLIB_USE_WEAK_LINK 0x01
728
+ #define DYLIB_USE_REEXPORT 0x02
729
+ #define DYLIB_USE_UPWARD 0x04
730
+ #define DYLIB_USE_DELAYED_INIT 0x08
731
+
732
+ #define DYLIB_USE_MARKER 0x1a741800
733
+
734
+
735
+
736
+ /*
737
+ * A dynamically linked shared library may be a subframework of an umbrella
738
+ * framework. If so it will be linked with "-umbrella umbrella_name" where
739
+ * Where "umbrella_name" is the name of the umbrella framework. A subframework
740
+ * can only be linked against by its umbrella framework or other subframeworks
741
+ * that are part of the same umbrella framework. Otherwise the static link
742
+ * editor produces an error and states to link against the umbrella framework.
743
+ * The name of the umbrella framework for subframeworks is recorded in the
744
+ * following structure.
745
+ */
746
+ struct sub_framework_command {
747
+ uint32_t cmd; /* LC_SUB_FRAMEWORK */
748
+ uint32_t cmdsize; /* includes umbrella string */
749
+ union lc_str umbrella; /* the umbrella framework name */
750
+ };
751
+
752
+ /*
753
+ * For dynamically linked shared libraries that are subframework of an umbrella
754
+ * framework they can allow clients other than the umbrella framework or other
755
+ * subframeworks in the same umbrella framework. To do this the subframework
756
+ * is built with "-allowable_client client_name" and an LC_SUB_CLIENT load
757
+ * command is created for each -allowable_client flag. The client_name is
758
+ * usually a framework name. It can also be a name used for bundles clients
759
+ * where the bundle is built with "-client_name client_name".
760
+ */
761
+ struct sub_client_command {
762
+ uint32_t cmd; /* LC_SUB_CLIENT */
763
+ uint32_t cmdsize; /* includes client string */
764
+ union lc_str client; /* the client name */
765
+ };
766
+
767
+ /*
768
+ * A dynamically linked shared library may be a sub_umbrella of an umbrella
769
+ * framework. If so it will be linked with "-sub_umbrella umbrella_name" where
770
+ * Where "umbrella_name" is the name of the sub_umbrella framework. When
771
+ * staticly linking when -twolevel_namespace is in effect a twolevel namespace
772
+ * umbrella framework will only cause its subframeworks and those frameworks
773
+ * listed as sub_umbrella frameworks to be implicited linked in. Any other
774
+ * dependent dynamic libraries will not be linked it when -twolevel_namespace
775
+ * is in effect. The primary library recorded by the static linker when
776
+ * resolving a symbol in these libraries will be the umbrella framework.
777
+ * Zero or more sub_umbrella frameworks may be use by an umbrella framework.
778
+ * The name of a sub_umbrella framework is recorded in the following structure.
779
+ */
780
+ struct sub_umbrella_command {
781
+ uint32_t cmd; /* LC_SUB_UMBRELLA */
782
+ uint32_t cmdsize; /* includes sub_umbrella string */
783
+ union lc_str sub_umbrella; /* the sub_umbrella framework name */
784
+ };
785
+
786
+ /*
787
+ * A dynamically linked shared library may be a sub_library of another shared
788
+ * library. If so it will be linked with "-sub_library library_name" where
789
+ * Where "library_name" is the name of the sub_library shared library. When
790
+ * staticly linking when -twolevel_namespace is in effect a twolevel namespace
791
+ * shared library will only cause its subframeworks and those frameworks
792
+ * listed as sub_umbrella frameworks and libraries listed as sub_libraries to
793
+ * be implicited linked in. Any other dependent dynamic libraries will not be
794
+ * linked it when -twolevel_namespace is in effect. The primary library
795
+ * recorded by the static linker when resolving a symbol in these libraries
796
+ * will be the umbrella framework (or dynamic library). Zero or more sub_library
797
+ * shared libraries may be use by an umbrella framework or (or dynamic library).
798
+ * The name of a sub_library framework is recorded in the following structure.
799
+ * For example /usr/lib/libobjc_profile.A.dylib would be recorded as "libobjc".
800
+ */
801
+ struct sub_library_command {
802
+ uint32_t cmd; /* LC_SUB_LIBRARY */
803
+ uint32_t cmdsize; /* includes sub_library string */
804
+ union lc_str sub_library; /* the sub_library name */
805
+ };
806
+
807
+ /*
808
+ * A program (filetype == MH_EXECUTE) that is
809
+ * prebound to its dynamic libraries has one of these for each library that
810
+ * the static linker used in prebinding. It contains a bit vector for the
811
+ * modules in the library. The bits indicate which modules are bound (1) and
812
+ * which are not (0) from the library. The bit for module 0 is the low bit
813
+ * of the first byte. So the bit for the Nth module is:
814
+ * (linked_modules[N/8] >> N%8) & 1
815
+ */
816
+ struct prebound_dylib_command {
817
+ uint32_t cmd; /* LC_PREBOUND_DYLIB */
818
+ uint32_t cmdsize; /* includes strings */
819
+ union lc_str name; /* library's path name */
820
+ uint32_t nmodules; /* number of modules in library */
821
+ union lc_str linked_modules; /* bit vector of linked modules */
822
+ };
823
+
824
+ /*
825
+ * A program that uses a dynamic linker contains a dylinker_command to identify
826
+ * the name of the dynamic linker (LC_LOAD_DYLINKER). And a dynamic linker
827
+ * contains a dylinker_command to identify the dynamic linker (LC_ID_DYLINKER).
828
+ * A file can have at most one of these.
829
+ * This struct is also used for the LC_DYLD_ENVIRONMENT load command and
830
+ * contains string for dyld to treat like environment variable.
831
+ */
832
+ struct dylinker_command {
833
+ uint32_t cmd; /* LC_ID_DYLINKER, LC_LOAD_DYLINKER or
834
+ LC_DYLD_ENVIRONMENT */
835
+ uint32_t cmdsize; /* includes pathname string */
836
+ union lc_str name; /* dynamic linker's path name */
837
+ };
838
+
839
+ /*
840
+ * Thread commands contain machine-specific data structures suitable for
841
+ * use in the thread state primitives. The machine specific data structures
842
+ * follow the struct thread_command as follows.
843
+ * Each flavor of machine specific data structure is preceded by an uint32_t
844
+ * constant for the flavor of that data structure, an uint32_t that is the
845
+ * count of uint32_t's of the size of the state data structure and then
846
+ * the state data structure follows. This triple may be repeated for many
847
+ * flavors. The constants for the flavors, counts and state data structure
848
+ * definitions are expected to be in the header file <machine/thread_status.h>.
849
+ * These machine specific data structures sizes must be multiples of
850
+ * 4 bytes. The cmdsize reflects the total size of the thread_command
851
+ * and all of the sizes of the constants for the flavors, counts and state
852
+ * data structures.
853
+ *
854
+ * For executable objects that are unix processes there will be one
855
+ * thread_command (cmd == LC_UNIXTHREAD) created for it by the link-editor.
856
+ * This is the same as a LC_THREAD, except that a stack is automatically
857
+ * created (based on the shell's limit for the stack size). Command arguments
858
+ * and environment variables are copied onto that stack.
859
+ */
860
+ struct thread_command {
861
+ uint32_t cmd; /* LC_THREAD or LC_UNIXTHREAD */
862
+ uint32_t cmdsize; /* total size of this command */
863
+ /* uint32_t flavor flavor of thread state */
864
+ /* uint32_t count count of uint32_t's in thread state */
865
+ /* struct XXX_thread_state state thread state for this flavor */
866
+ /* ... */
867
+ };
868
+
869
+ /*
870
+ * The routines command contains the address of the dynamic shared library
871
+ * initialization routine and an index into the module table for the module
872
+ * that defines the routine. Before any modules are used from the library the
873
+ * dynamic linker fully binds the module that defines the initialization routine
874
+ * and then calls it. This gets called before any module initialization
875
+ * routines (used for C++ static constructors) in the library.
876
+ */
877
+ struct routines_command { /* for 32-bit architectures */
878
+ uint32_t cmd; /* LC_ROUTINES */
879
+ uint32_t cmdsize; /* total size of this command */
880
+ uint32_t init_address; /* address of initialization routine */
881
+ uint32_t init_module; /* index into the module table that */
882
+ /* the init routine is defined in */
81
883
  uint32_t reserved1;
82
884
  uint32_t reserved2;
885
+ uint32_t reserved3;
886
+ uint32_t reserved4;
887
+ uint32_t reserved5;
888
+ uint32_t reserved6;
83
889
  };
890
+
891
+ /*
892
+ * The 64-bit routines command. Same use as above.
893
+ */
894
+ struct routines_command_64 { /* for 64-bit architectures */
895
+ uint32_t cmd; /* LC_ROUTINES_64 */
896
+ uint32_t cmdsize; /* total size of this command */
897
+ uint64_t init_address; /* address of initialization routine */
898
+ uint64_t init_module; /* index into the module table that */
899
+ /* the init routine is defined in */
900
+ uint64_t reserved1;
901
+ uint64_t reserved2;
902
+ uint64_t reserved3;
903
+ uint64_t reserved4;
904
+ uint64_t reserved5;
905
+ uint64_t reserved6;
906
+ };
907
+
908
+ /*
909
+ * The symtab_command contains the offsets and sizes of the link-edit 4.3BSD
910
+ * "stab" style symbol table information as described in the header files
911
+ * <nlist.h> and <stab.h>.
912
+ */
84
913
  struct symtab_command {
85
- uint32_t cmd;
86
- uint32_t cmdsize;
87
- uint32_t symoff;
88
- uint32_t nsyms;
89
- uint32_t stroff;
90
- uint32_t strsize;
914
+ uint32_t cmd; /* LC_SYMTAB */
915
+ uint32_t cmdsize; /* sizeof(struct symtab_command) */
916
+ uint32_t symoff; /* symbol table offset */
917
+ uint32_t nsyms; /* number of symbol table entries */
918
+ uint32_t stroff; /* string table offset */
919
+ uint32_t strsize; /* string table size in bytes */
91
920
  };
921
+
922
+ /*
923
+ * This is the second set of the symbolic information which is used to support
924
+ * the data structures for the dynamically link editor.
925
+ *
926
+ * The original set of symbolic information in the symtab_command which contains
927
+ * the symbol and string tables must also be present when this load command is
928
+ * present. When this load command is present the symbol table is organized
929
+ * into three groups of symbols:
930
+ * local symbols (static and debugging symbols) - grouped by module
931
+ * defined external symbols - grouped by module (sorted by name if not lib)
932
+ * undefined external symbols (sorted by name if MH_BINDATLOAD is not set,
933
+ * and in order the were seen by the static
934
+ * linker if MH_BINDATLOAD is set)
935
+ * In this load command there are offsets and counts to each of the three groups
936
+ * of symbols.
937
+ *
938
+ * This load command contains a the offsets and sizes of the following new
939
+ * symbolic information tables:
940
+ * table of contents
941
+ * module table
942
+ * reference symbol table
943
+ * indirect symbol table
944
+ * The first three tables above (the table of contents, module table and
945
+ * reference symbol table) are only present if the file is a dynamically linked
946
+ * shared library. For executable and object modules, which are files
947
+ * containing only one module, the information that would be in these three
948
+ * tables is determined as follows:
949
+ * table of contents - the defined external symbols are sorted by name
950
+ * module table - the file contains only one module so everything in the
951
+ * file is part of the module.
952
+ * reference symbol table - is the defined and undefined external symbols
953
+ *
954
+ * For dynamically linked shared library files this load command also contains
955
+ * offsets and sizes to the pool of relocation entries for all sections
956
+ * separated into two groups:
957
+ * external relocation entries
958
+ * local relocation entries
959
+ * For executable and object modules the relocation entries continue to hang
960
+ * off the section structures.
961
+ */
92
962
  struct dysymtab_command {
93
- uint32_t cmd;
94
- uint32_t cmdsize;
95
- uint32_t ilocalsym;
96
- uint32_t nlocalsym;
97
- uint32_t iextdefsym;
98
- uint32_t nextdefsym;
99
- uint32_t iundefsym;
100
- uint32_t nundefsym;
101
- uint32_t tocoff;
102
- uint32_t ntoc;
103
- uint32_t modtaboff;
104
- uint32_t nmodtab;
105
- uint32_t extrefsymoff;
106
- uint32_t nextrefsyms;
107
- uint32_t indirectsymoff;
108
- uint32_t nindirectsyms;
109
- uint32_t extreloff;
110
- uint32_t nextrel;
111
- uint32_t locreloff;
112
- uint32_t nlocrel;
963
+ uint32_t cmd; /* LC_DYSYMTAB */
964
+ uint32_t cmdsize; /* sizeof(struct dysymtab_command) */
965
+
966
+ /*
967
+ * The symbols indicated by symoff and nsyms of the LC_SYMTAB load command
968
+ * are grouped into the following three groups:
969
+ * local symbols (further grouped by the module they are from)
970
+ * defined external symbols (further grouped by the module they are from)
971
+ * undefined symbols
972
+ *
973
+ * The local symbols are used only for debugging. The dynamic binding
974
+ * process may have to use them to indicate to the debugger the local
975
+ * symbols for a module that is being bound.
976
+ *
977
+ * The last two groups are used by the dynamic binding process to do the
978
+ * binding (indirectly through the module table and the reference symbol
979
+ * table when this is a dynamically linked shared library file).
980
+ */
981
+ uint32_t ilocalsym; /* index to local symbols */
982
+ uint32_t nlocalsym; /* number of local symbols */
983
+
984
+ uint32_t iextdefsym;/* index to externally defined symbols */
985
+ uint32_t nextdefsym;/* number of externally defined symbols */
986
+
987
+ uint32_t iundefsym; /* index to undefined symbols */
988
+ uint32_t nundefsym; /* number of undefined symbols */
989
+
990
+ /*
991
+ * For the for the dynamic binding process to find which module a symbol
992
+ * is defined in the table of contents is used (analogous to the ranlib
993
+ * structure in an archive) which maps defined external symbols to modules
994
+ * they are defined in. This exists only in a dynamically linked shared
995
+ * library file. For executable and object modules the defined external
996
+ * symbols are sorted by name and is use as the table of contents.
997
+ */
998
+ uint32_t tocoff; /* file offset to table of contents */
999
+ uint32_t ntoc; /* number of entries in table of contents */
1000
+
1001
+ /*
1002
+ * To support dynamic binding of "modules" (whole object files) the symbol
1003
+ * table must reflect the modules that the file was created from. This is
1004
+ * done by having a module table that has indexes and counts into the merged
1005
+ * tables for each module. The module structure that these two entries
1006
+ * refer to is described below. This exists only in a dynamically linked
1007
+ * shared library file. For executable and object modules the file only
1008
+ * contains one module so everything in the file belongs to the module.
1009
+ */
1010
+ uint32_t modtaboff; /* file offset to module table */
1011
+ uint32_t nmodtab; /* number of module table entries */
1012
+
1013
+ /*
1014
+ * To support dynamic module binding the module structure for each module
1015
+ * indicates the external references (defined and undefined) each module
1016
+ * makes. For each module there is an offset and a count into the
1017
+ * reference symbol table for the symbols that the module references.
1018
+ * This exists only in a dynamically linked shared library file. For
1019
+ * executable and object modules the defined external symbols and the
1020
+ * undefined external symbols indicates the external references.
1021
+ */
1022
+ uint32_t extrefsymoff; /* offset to referenced symbol table */
1023
+ uint32_t nextrefsyms; /* number of referenced symbol table entries */
1024
+
1025
+ /*
1026
+ * The sections that contain "symbol pointers" and "routine stubs" have
1027
+ * indexes and (implied counts based on the size of the section and fixed
1028
+ * size of the entry) into the "indirect symbol" table for each pointer
1029
+ * and stub. For every section of these two types the index into the
1030
+ * indirect symbol table is stored in the section header in the field
1031
+ * reserved1. An indirect symbol table entry is simply a 32bit index into
1032
+ * the symbol table to the symbol that the pointer or stub is referring to.
1033
+ * The indirect symbol table is ordered to match the entries in the section.
1034
+ */
1035
+ uint32_t indirectsymoff; /* file offset to the indirect symbol table */
1036
+ uint32_t nindirectsyms; /* number of indirect symbol table entries */
1037
+
1038
+ /*
1039
+ * To support relocating an individual module in a library file quickly the
1040
+ * external relocation entries for each module in the library need to be
1041
+ * accessed efficiently. Since the relocation entries can't be accessed
1042
+ * through the section headers for a library file they are separated into
1043
+ * groups of local and external entries further grouped by module. In this
1044
+ * case the presents of this load command who's extreloff, nextrel,
1045
+ * locreloff and nlocrel fields are non-zero indicates that the relocation
1046
+ * entries of non-merged sections are not referenced through the section
1047
+ * structures (and the reloff and nreloc fields in the section headers are
1048
+ * set to zero).
1049
+ *
1050
+ * Since the relocation entries are not accessed through the section headers
1051
+ * this requires the r_address field to be something other than a section
1052
+ * offset to identify the item to be relocated. In this case r_address is
1053
+ * set to the offset from the vmaddr of the first LC_SEGMENT command.
1054
+ * For MH_SPLIT_SEGS images r_address is set to the the offset from the
1055
+ * vmaddr of the first read-write LC_SEGMENT command.
1056
+ *
1057
+ * The relocation entries are grouped by module and the module table
1058
+ * entries have indexes and counts into them for the group of external
1059
+ * relocation entries for that the module.
1060
+ *
1061
+ * For sections that are merged across modules there must not be any
1062
+ * remaining external relocation entries for them (for merged sections
1063
+ * remaining relocation entries must be local).
1064
+ */
1065
+ uint32_t extreloff; /* offset to external relocation entries */
1066
+ uint32_t nextrel; /* number of external relocation entries */
1067
+
1068
+ /*
1069
+ * All the local relocation entries are grouped together (they are not
1070
+ * grouped by their module since they are only used if the object is moved
1071
+ * from it staticly link edited address).
1072
+ */
1073
+ uint32_t locreloff; /* offset to local relocation entries */
1074
+ uint32_t nlocrel; /* number of local relocation entries */
1075
+
1076
+ };
1077
+
1078
+ /*
1079
+ * An indirect symbol table entry is simply a 32bit index into the symbol table
1080
+ * to the symbol that the pointer or stub is refering to. Unless it is for a
1081
+ * non-lazy symbol pointer section for a defined symbol which strip(1) as
1082
+ * removed. In which case it has the value INDIRECT_SYMBOL_LOCAL. If the
1083
+ * symbol was also absolute INDIRECT_SYMBOL_ABS is or'ed with that.
1084
+ */
1085
+ #define INDIRECT_SYMBOL_LOCAL 0x80000000
1086
+ #define INDIRECT_SYMBOL_ABS 0x40000000
1087
+
1088
+
1089
+ /* a table of contents entry */
1090
+ struct dylib_table_of_contents {
1091
+ uint32_t symbol_index; /* the defined external symbol
1092
+ (index into the symbol table) */
1093
+ uint32_t module_index; /* index into the module table this symbol
1094
+ is defined in */
1095
+ };
1096
+
1097
+ /* a module table entry */
1098
+ struct dylib_module {
1099
+ uint32_t module_name; /* the module name (index into string table) */
1100
+
1101
+ uint32_t iextdefsym; /* index into externally defined symbols */
1102
+ uint32_t nextdefsym; /* number of externally defined symbols */
1103
+ uint32_t irefsym; /* index into reference symbol table */
1104
+ uint32_t nrefsym; /* number of reference symbol table entries */
1105
+ uint32_t ilocalsym; /* index into symbols for local symbols */
1106
+ uint32_t nlocalsym; /* number of local symbols */
1107
+
1108
+ uint32_t iextrel; /* index into external relocation entries */
1109
+ uint32_t nextrel; /* number of external relocation entries */
1110
+
1111
+ uint32_t iinit_iterm; /* low 16 bits are the index into the init
1112
+ section, high 16 bits are the index into
1113
+ the term section */
1114
+ uint32_t ninit_nterm; /* low 16 bits are the number of init section
1115
+ entries, high 16 bits are the number of
1116
+ term section entries */
1117
+
1118
+ uint32_t /* for this module address of the start of */
1119
+ objc_module_info_addr; /* the (__OBJC,__module_info) section */
1120
+ uint32_t /* for this module size of */
1121
+ objc_module_info_size; /* the (__OBJC,__module_info) section */
1122
+ };
1123
+
1124
+ /* a 64-bit module table entry */
1125
+ struct dylib_module_64 {
1126
+ uint32_t module_name; /* the module name (index into string table) */
1127
+
1128
+ uint32_t iextdefsym; /* index into externally defined symbols */
1129
+ uint32_t nextdefsym; /* number of externally defined symbols */
1130
+ uint32_t irefsym; /* index into reference symbol table */
1131
+ uint32_t nrefsym; /* number of reference symbol table entries */
1132
+ uint32_t ilocalsym; /* index into symbols for local symbols */
1133
+ uint32_t nlocalsym; /* number of local symbols */
1134
+
1135
+ uint32_t iextrel; /* index into external relocation entries */
1136
+ uint32_t nextrel; /* number of external relocation entries */
1137
+
1138
+ uint32_t iinit_iterm; /* low 16 bits are the index into the init
1139
+ section, high 16 bits are the index into
1140
+ the term section */
1141
+ uint32_t ninit_nterm; /* low 16 bits are the number of init section
1142
+ entries, high 16 bits are the number of
1143
+ term section entries */
1144
+
1145
+ uint32_t /* for this module size of */
1146
+ objc_module_info_size; /* the (__OBJC,__module_info) section */
1147
+ uint64_t /* for this module address of the start of */
1148
+ objc_module_info_addr; /* the (__OBJC,__module_info) section */
1149
+ };
1150
+
1151
+ /*
1152
+ * The entries in the reference symbol table are used when loading the module
1153
+ * (both by the static and dynamic link editors) and if the module is unloaded
1154
+ * or replaced. Therefore all external symbols (defined and undefined) are
1155
+ * listed in the module's reference table. The flags describe the type of
1156
+ * reference that is being made. The constants for the flags are defined in
1157
+ * <mach-o/nlist.h> as they are also used for symbol table entries.
1158
+ */
1159
+ struct dylib_reference {
1160
+ uint32_t isym:24, /* index into the symbol table */
1161
+ flags:8; /* flags to indicate the type of reference */
1162
+ };
1163
+
1164
+ /*
1165
+ * The twolevel_hints_command contains the offset and number of hints in the
1166
+ * two-level namespace lookup hints table.
1167
+ */
1168
+ struct twolevel_hints_command {
1169
+ uint32_t cmd; /* LC_TWOLEVEL_HINTS */
1170
+ uint32_t cmdsize; /* sizeof(struct twolevel_hints_command) */
1171
+ uint32_t offset; /* offset to the hint table */
1172
+ uint32_t nhints; /* number of hints in the hint table */
1173
+ };
1174
+
1175
+ /*
1176
+ * The entries in the two-level namespace lookup hints table are twolevel_hint
1177
+ * structs. These provide hints to the dynamic link editor where to start
1178
+ * looking for an undefined symbol in a two-level namespace image. The
1179
+ * isub_image field is an index into the sub-images (sub-frameworks and
1180
+ * sub-umbrellas list) that made up the two-level image that the undefined
1181
+ * symbol was found in when it was built by the static link editor. If
1182
+ * isub-image is 0 the the symbol is expected to be defined in library and not
1183
+ * in the sub-images. If isub-image is non-zero it is an index into the array
1184
+ * of sub-images for the umbrella with the first index in the sub-images being
1185
+ * 1. The array of sub-images is the ordered list of sub-images of the umbrella
1186
+ * that would be searched for a symbol that has the umbrella recorded as its
1187
+ * primary library. The table of contents index is an index into the
1188
+ * library's table of contents. This is used as the starting point of the
1189
+ * binary search or a directed linear search.
1190
+ */
1191
+ struct twolevel_hint {
1192
+ uint32_t
1193
+ isub_image:8, /* index into the sub images */
1194
+ itoc:24; /* index into the table of contents */
1195
+ };
1196
+
1197
+ /*
1198
+ * The prebind_cksum_command contains the value of the original check sum for
1199
+ * prebound files or zero. When a prebound file is first created or modified
1200
+ * for other than updating its prebinding information the value of the check sum
1201
+ * is set to zero. When the file has it prebinding re-done and if the value of
1202
+ * the check sum is zero the original check sum is calculated and stored in
1203
+ * cksum field of this load command in the output file. If when the prebinding
1204
+ * is re-done and the cksum field is non-zero it is left unchanged from the
1205
+ * input file.
1206
+ */
1207
+ struct prebind_cksum_command {
1208
+ uint32_t cmd; /* LC_PREBIND_CKSUM */
1209
+ uint32_t cmdsize; /* sizeof(struct prebind_cksum_command) */
1210
+ uint32_t cksum; /* the check sum or zero */
113
1211
  };
1212
+
1213
+ /*
1214
+ * The uuid load command contains a single 128-bit unique random number that
1215
+ * identifies an object produced by the static link editor.
1216
+ */
114
1217
  struct uuid_command {
115
- uint32_t cmd;
116
- uint32_t cmdsize;
117
- uint8_t uuid[16];
1218
+ uint32_t cmd; /* LC_UUID */
1219
+ uint32_t cmdsize; /* sizeof(struct uuid_command) */
1220
+ uint8_t uuid[16]; /* the 128-bit uuid */
118
1221
  };
1222
+
1223
+ /*
1224
+ * The rpath_command contains a path which at runtime should be added to
1225
+ * the current run path used to find @rpath prefixed dylibs.
1226
+ */
1227
+ struct rpath_command {
1228
+ uint32_t cmd; /* LC_RPATH */
1229
+ uint32_t cmdsize; /* includes string */
1230
+ union lc_str path; /* path to add to run path */
1231
+ };
1232
+
1233
+ /*
1234
+ * The target_triple_command contains a string which specifies the
1235
+ * target triple (e.g. "arm64e-apple-macosx15.0.0") used to compile the code.
1236
+ */
1237
+ struct target_triple_command {
1238
+ uint32_t cmd; /* LC_TARGET_TRIPLE */
1239
+ uint32_t cmdsize; /* including string */
1240
+ union lc_str triple; /* target triple string */
1241
+ };
1242
+
1243
+ /*
1244
+ * The linkedit_data_command contains the offsets and sizes of a blob
1245
+ * of data in the __LINKEDIT segment.
1246
+ */
119
1247
  struct linkedit_data_command {
120
- uint32_t cmd;
121
- uint32_t cmdsize;
122
- uint32_t dataoff;
123
- uint32_t datasize;
1248
+ uint32_t cmd; /* LC_CODE_SIGNATURE, LC_SEGMENT_SPLIT_INFO,
1249
+ LC_FUNCTION_STARTS, LC_DATA_IN_CODE,
1250
+ LC_DYLIB_CODE_SIGN_DRS, LC_ATOM_INFO,
1251
+ LC_LINKER_OPTIMIZATION_HINT,
1252
+ LC_DYLD_EXPORTS_TRIE,
1253
+ LC_FUNCTION_VARIANTS, LC_FUNCTION_VARIANT_FIXUPS,
1254
+ LC_DYLD_CHAINED_FIXUPS, or LC_LAZY_LOAD_DYLIB_INFO */
1255
+ uint32_t cmdsize; /* sizeof(struct linkedit_data_command) */
1256
+ uint32_t dataoff; /* file offset of data in __LINKEDIT segment */
1257
+ uint32_t datasize; /* file size of data in __LINKEDIT segment */
124
1258
  };
125
- /* arm64 layout: the 32-bit ptr member is not declared */
126
- union lc_str {
127
- uint32_t offset;
1259
+
1260
+ /*
1261
+ * The encryption_info_command contains the file offset and size of an
1262
+ * of an encrypted segment.
1263
+ */
1264
+ struct encryption_info_command {
1265
+ uint32_t cmd; /* LC_ENCRYPTION_INFO */
1266
+ uint32_t cmdsize; /* sizeof(struct encryption_info_command) */
1267
+ uint32_t cryptoff; /* file offset of encrypted range */
1268
+ uint32_t cryptsize; /* file size of encrypted range */
1269
+ uint32_t cryptid; /* which enryption system,
1270
+ 0 means not-encrypted yet */
128
1271
  };
129
- struct dylib {
130
- union lc_str name;
131
- uint32_t timestamp;
132
- uint32_t current_version;
133
- uint32_t compatibility_version;
1272
+
1273
+ /*
1274
+ * The encryption_info_command_64 contains the file offset and size of an
1275
+ * of an encrypted segment (for use in x86_64 targets).
1276
+ */
1277
+ struct encryption_info_command_64 {
1278
+ uint32_t cmd; /* LC_ENCRYPTION_INFO_64 */
1279
+ uint32_t cmdsize; /* sizeof(struct encryption_info_command_64) */
1280
+ uint32_t cryptoff; /* file offset of encrypted range */
1281
+ uint32_t cryptsize; /* file size of encrypted range */
1282
+ uint32_t cryptid; /* which enryption system,
1283
+ 0 means not-encrypted yet */
1284
+ uint32_t pad; /* padding to make this struct's size a multiple
1285
+ of 8 bytes */
134
1286
  };
135
- struct dylib_command {
136
- uint32_t cmd;
137
- uint32_t cmdsize;
138
- struct dylib dylib;
1287
+
1288
+ /*
1289
+ * The version_min_command contains the min OS version on which this
1290
+ * binary was built to run.
1291
+ */
1292
+ struct version_min_command {
1293
+ uint32_t cmd; /* LC_VERSION_MIN_MACOSX or
1294
+ LC_VERSION_MIN_IPHONEOS or
1295
+ LC_VERSION_MIN_WATCHOS or
1296
+ LC_VERSION_MIN_TVOS */
1297
+ uint32_t cmdsize; /* sizeof(struct min_version_command) */
1298
+ uint32_t version; /* X.Y.Z is encoded in nibbles xxxx.yy.zz */
1299
+ uint32_t sdk; /* X.Y.Z is encoded in nibbles xxxx.yy.zz */
139
1300
  };
140
- #define INDIRECT_SYMBOL_LOCAL 0x80000000
141
- #define INDIRECT_SYMBOL_ABS 0x40000000
142
- struct mach_header_64 {
143
- uint32_t magic;
144
- int32_t cputype, cpusubtype;
145
- uint32_t filetype, ncmds, sizeofcmds, flags, reserved;
146
- };
147
- struct segment_command_64 {
148
- uint32_t cmd, cmdsize;
149
- char segname[16];
150
- uint64_t vmaddr, vmsize, fileoff, filesize;
151
- int32_t maxprot, initprot;
152
- uint32_t nsects, flags;
153
- };
154
- struct section_64 {
155
- char sectname[16], segname[16];
156
- uint64_t addr, size;
157
- uint32_t offset, align, reloff, nreloc, flags, reserved1, reserved2, reserved3;
1301
+
1302
+ /*
1303
+ * The build_version_command contains the min OS version on which this
1304
+ * binary was built to run for its platform. The list of known platforms and
1305
+ * tool values following it.
1306
+ */
1307
+ struct build_version_command {
1308
+ uint32_t cmd; /* LC_BUILD_VERSION */
1309
+ uint32_t cmdsize; /* sizeof(struct build_version_command) plus */
1310
+ /* ntools * sizeof(struct build_tool_version) */
1311
+ uint32_t platform; /* platform */
1312
+ uint32_t minos; /* X.Y.Z is encoded in nibbles xxxx.yy.zz */
1313
+ uint32_t sdk; /* X.Y.Z is encoded in nibbles xxxx.yy.zz */
1314
+ uint32_t ntools; /* number of tool entries following this */
1315
+ };
1316
+
1317
+ struct build_tool_version {
1318
+ uint32_t tool; /* enum for the tool */
1319
+ uint32_t version; /* version number of the tool */
1320
+ };
1321
+
1322
+ /* Known values for the platform field above. */
1323
+ #define PLATFORM_UNKNOWN 0
1324
+ #define PLATFORM_ANY 0xFFFFFFFF
1325
+ #define PLATFORM_MACOS 1
1326
+ #define PLATFORM_IOS 2
1327
+ #define PLATFORM_TVOS 3
1328
+ #define PLATFORM_WATCHOS 4
1329
+ #define PLATFORM_BRIDGEOS 5
1330
+ #define PLATFORM_MACCATALYST 6
1331
+ #define PLATFORM_IOSSIMULATOR 7
1332
+ #define PLATFORM_TVOSSIMULATOR 8
1333
+ #define PLATFORM_WATCHOSSIMULATOR 9
1334
+ #define PLATFORM_DRIVERKIT 10
1335
+ #define PLATFORM_VISIONOS 11
1336
+ #define PLATFORM_VISIONOSSIMULATOR 12
1337
+
1338
+ #define PLATFORM_FIRMWARE 13
1339
+ #define PLATFORM_SEPOS 14
1340
+
1341
+ #define PLATFORM_MACOS_EXCLAVECORE 15
1342
+ #define PLATFORM_MACOS_EXCLAVEKIT 16
1343
+ #define PLATFORM_IOS_EXCLAVECORE 17
1344
+ #define PLATFORM_IOS_EXCLAVEKIT 18
1345
+ #define PLATFORM_TVOS_EXCLAVECORE 19
1346
+ #define PLATFORM_TVOS_EXCLAVEKIT 20
1347
+ #define PLATFORM_WATCHOS_EXCLAVECORE 21
1348
+ #define PLATFORM_WATCHOS_EXCLAVEKIT 22
1349
+ #define PLATFORM_VISIONOS_EXCLAVECORE 23
1350
+ #define PLATFORM_VISIONOS_EXCLAVEKIT 24
1351
+
1352
+ #ifndef __OPEN_SOURCE__
1353
+
1354
+ #endif /* __OPEN_SOURCE__ */
1355
+
1356
+
1357
+ #ifndef __OPEN_SOURCE__
1358
+
1359
+ #endif // __OPEN_SOURCE__
1360
+
1361
+ /* Known values for the tool field above. */
1362
+ #define TOOL_CLANG 1
1363
+ #define TOOL_SWIFT 2
1364
+ #define TOOL_LD 3
1365
+ #define TOOL_LLD 4
1366
+
1367
+ /* values for gpu tools (1024 to 1048) */
1368
+ #define TOOL_METAL 1024
1369
+ #define TOOL_AIRLLD 1025
1370
+ #define TOOL_AIRNT 1026
1371
+ #define TOOL_AIRNT_PLUGIN 1027
1372
+ #define TOOL_AIRPACK 1028
1373
+ #define TOOL_GPUARCHIVER 1031
1374
+ #define TOOL_METAL_FRAMEWORK 1032
1375
+
1376
+
1377
+ /*
1378
+ * The dyld_info_command contains the file offsets and sizes of
1379
+ * the new compressed form of the information dyld needs to
1380
+ * load the image. This information is used by dyld on Mac OS X
1381
+ * 10.6 and later. All information pointed to by this command
1382
+ * is encoded using byte streams, so no endian swapping is needed
1383
+ * to interpret it.
1384
+ */
1385
+ struct dyld_info_command {
1386
+ uint32_t cmd; /* LC_DYLD_INFO or LC_DYLD_INFO_ONLY */
1387
+ uint32_t cmdsize; /* sizeof(struct dyld_info_command) */
1388
+
1389
+ /*
1390
+ * Dyld rebases an image whenever dyld loads it at an address different
1391
+ * from its preferred address. The rebase information is a stream
1392
+ * of byte sized opcodes whose symbolic names start with REBASE_OPCODE_.
1393
+ * Conceptually the rebase information is a table of tuples:
1394
+ * <seg-index, seg-offset, type>
1395
+ * The opcodes are a compressed way to encode the table by only
1396
+ * encoding when a column changes. In addition simple patterns
1397
+ * like "every n'th offset for m times" can be encoded in a few
1398
+ * bytes.
1399
+ */
1400
+ uint32_t rebase_off; /* file offset to rebase info */
1401
+ uint32_t rebase_size; /* size of rebase info */
1402
+
1403
+ /*
1404
+ * Dyld binds an image during the loading process, if the image
1405
+ * requires any pointers to be initialized to symbols in other images.
1406
+ * The bind information is a stream of byte sized
1407
+ * opcodes whose symbolic names start with BIND_OPCODE_.
1408
+ * Conceptually the bind information is a table of tuples:
1409
+ * <seg-index, seg-offset, type, symbol-library-ordinal, symbol-name, addend>
1410
+ * The opcodes are a compressed way to encode the table by only
1411
+ * encoding when a column changes. In addition simple patterns
1412
+ * like for runs of pointers initialzed to the same value can be
1413
+ * encoded in a few bytes.
1414
+ */
1415
+ uint32_t bind_off; /* file offset to binding info */
1416
+ uint32_t bind_size; /* size of binding info */
1417
+
1418
+ /*
1419
+ * Some C++ programs require dyld to unique symbols so that all
1420
+ * images in the process use the same copy of some code/data.
1421
+ * This step is done after binding. The content of the weak_bind
1422
+ * info is an opcode stream like the bind_info. But it is sorted
1423
+ * alphabetically by symbol name. This enable dyld to walk
1424
+ * all images with weak binding information in order and look
1425
+ * for collisions. If there are no collisions, dyld does
1426
+ * no updating. That means that some fixups are also encoded
1427
+ * in the bind_info. For instance, all calls to "operator new"
1428
+ * are first bound to libstdc++.dylib using the information
1429
+ * in bind_info. Then if some image overrides operator new
1430
+ * that is detected when the weak_bind information is processed
1431
+ * and the call to operator new is then rebound.
1432
+ */
1433
+ uint32_t weak_bind_off; /* file offset to weak binding info */
1434
+ uint32_t weak_bind_size; /* size of weak binding info */
1435
+
1436
+ /*
1437
+ * Some uses of external symbols do not need to be bound immediately.
1438
+ * Instead they can be lazily bound on first use. The lazy_bind
1439
+ * are contains a stream of BIND opcodes to bind all lazy symbols.
1440
+ * Normal use is that dyld ignores the lazy_bind section when
1441
+ * loading an image. Instead the static linker arranged for the
1442
+ * lazy pointer to initially point to a helper function which
1443
+ * pushes the offset into the lazy_bind area for the symbol
1444
+ * needing to be bound, then jumps to dyld which simply adds
1445
+ * the offset to lazy_bind_off to get the information on what
1446
+ * to bind.
1447
+ */
1448
+ uint32_t lazy_bind_off; /* file offset to lazy binding info */
1449
+ uint32_t lazy_bind_size; /* size of lazy binding infs */
1450
+
1451
+ /*
1452
+ * The symbols exported by a dylib are encoded in a trie. This
1453
+ * is a compact representation that factors out common prefixes.
1454
+ * It also reduces LINKEDIT pages in RAM because it encodes all
1455
+ * information (name, address, flags) in one small, contiguous range.
1456
+ * The export area is a stream of nodes. The first node sequentially
1457
+ * is the start node for the trie.
1458
+ *
1459
+ * Nodes for a symbol start with a uleb128 that is the length of
1460
+ * the exported symbol information for the string so far.
1461
+ * If there is no exported symbol, the node starts with a zero byte.
1462
+ * If there is exported info, it follows the length.
1463
+ *
1464
+ * First is a uleb128 containing flags. Normally, it is followed by
1465
+ * a uleb128 encoded offset which is location of the content named
1466
+ * by the symbol from the mach_header for the image. If the flags
1467
+ * is EXPORT_SYMBOL_FLAGS_REEXPORT, then following the flags is
1468
+ * a uleb128 encoded library ordinal, then a zero terminated
1469
+ * UTF8 string. If the string is zero length, then the symbol
1470
+ * is re-export from the specified dylib with the same name.
1471
+ * If the flags is EXPORT_SYMBOL_FLAGS_STUB_AND_RESOLVER, then following
1472
+ * the flags is two uleb128s: the stub offset and the resolver offset.
1473
+ * The stub is used by non-lazy pointers. The resolver is used
1474
+ * by lazy pointers and must be called to get the actual address to use.
1475
+ *
1476
+ * After the optional exported symbol information is a byte of
1477
+ * how many edges (0-255) that this node has leaving it,
1478
+ * followed by each edge.
1479
+ * Each edge is a zero terminated UTF8 of the addition chars
1480
+ * in the symbol, followed by a uleb128 offset for the node that
1481
+ * edge points to.
1482
+ *
1483
+ */
1484
+ uint32_t export_off; /* file offset to lazy binding info */
1485
+ uint32_t export_size; /* size of lazy binding infs */
1486
+ };
1487
+
1488
+ /*
1489
+ * The following are used to encode rebasing information
1490
+ */
1491
+ #define REBASE_TYPE_POINTER 1
1492
+ #define REBASE_TYPE_TEXT_ABSOLUTE32 2
1493
+ #define REBASE_TYPE_TEXT_PCREL32 3
1494
+
1495
+ #define REBASE_OPCODE_MASK 0xF0
1496
+ #define REBASE_IMMEDIATE_MASK 0x0F
1497
+ #define REBASE_OPCODE_DONE 0x00
1498
+ #define REBASE_OPCODE_SET_TYPE_IMM 0x10
1499
+ #define REBASE_OPCODE_SET_SEGMENT_AND_OFFSET_ULEB 0x20
1500
+ #define REBASE_OPCODE_ADD_ADDR_ULEB 0x30
1501
+ #define REBASE_OPCODE_ADD_ADDR_IMM_SCALED 0x40
1502
+ #define REBASE_OPCODE_DO_REBASE_IMM_TIMES 0x50
1503
+ #define REBASE_OPCODE_DO_REBASE_ULEB_TIMES 0x60
1504
+ #define REBASE_OPCODE_DO_REBASE_ADD_ADDR_ULEB 0x70
1505
+ #define REBASE_OPCODE_DO_REBASE_ULEB_TIMES_SKIPPING_ULEB 0x80
1506
+
1507
+
1508
+ /*
1509
+ * The following are used to encode binding information
1510
+ */
1511
+ #define BIND_TYPE_POINTER 1
1512
+ #define BIND_TYPE_TEXT_ABSOLUTE32 2
1513
+ #define BIND_TYPE_TEXT_PCREL32 3
1514
+
1515
+ #define BIND_SPECIAL_DYLIB_SELF 0
1516
+ #define BIND_SPECIAL_DYLIB_MAIN_EXECUTABLE -1
1517
+ #define BIND_SPECIAL_DYLIB_FLAT_LOOKUP -2
1518
+ #define BIND_SPECIAL_DYLIB_WEAK_LOOKUP -3
1519
+
1520
+ #define BIND_SYMBOL_FLAGS_WEAK_IMPORT 0x1
1521
+ #define BIND_SYMBOL_FLAGS_NON_WEAK_DEFINITION 0x8
1522
+
1523
+ #define BIND_OPCODE_MASK 0xF0
1524
+ #define BIND_IMMEDIATE_MASK 0x0F
1525
+ #define BIND_OPCODE_DONE 0x00
1526
+ #define BIND_OPCODE_SET_DYLIB_ORDINAL_IMM 0x10
1527
+ #define BIND_OPCODE_SET_DYLIB_ORDINAL_ULEB 0x20
1528
+ #define BIND_OPCODE_SET_DYLIB_SPECIAL_IMM 0x30
1529
+ #define BIND_OPCODE_SET_SYMBOL_TRAILING_FLAGS_IMM 0x40
1530
+ #define BIND_OPCODE_SET_TYPE_IMM 0x50
1531
+ #define BIND_OPCODE_SET_ADDEND_SLEB 0x60
1532
+ #define BIND_OPCODE_SET_SEGMENT_AND_OFFSET_ULEB 0x70
1533
+ #define BIND_OPCODE_ADD_ADDR_ULEB 0x80
1534
+ #define BIND_OPCODE_DO_BIND 0x90
1535
+ #define BIND_OPCODE_DO_BIND_ADD_ADDR_ULEB 0xA0
1536
+ #define BIND_OPCODE_DO_BIND_ADD_ADDR_IMM_SCALED 0xB0
1537
+ #define BIND_OPCODE_DO_BIND_ULEB_TIMES_SKIPPING_ULEB 0xC0
1538
+ #define BIND_OPCODE_THREADED 0xD0
1539
+ #define BIND_SUBOPCODE_THREADED_SET_BIND_ORDINAL_TABLE_SIZE_ULEB 0x00
1540
+ #define BIND_SUBOPCODE_THREADED_APPLY 0x01
1541
+
1542
+
1543
+ /*
1544
+ * The following are used on the flags byte of a terminal node
1545
+ * in the export information.
1546
+ */
1547
+ #define EXPORT_SYMBOL_FLAGS_KIND_MASK 0x03
1548
+ #define EXPORT_SYMBOL_FLAGS_KIND_REGULAR 0x00
1549
+ #define EXPORT_SYMBOL_FLAGS_KIND_THREAD_LOCAL 0x01
1550
+ #define EXPORT_SYMBOL_FLAGS_KIND_ABSOLUTE 0x02
1551
+ #define EXPORT_SYMBOL_FLAGS_WEAK_DEFINITION 0x04
1552
+ #define EXPORT_SYMBOL_FLAGS_REEXPORT 0x08
1553
+ #define EXPORT_SYMBOL_FLAGS_STUB_AND_RESOLVER 0x10
1554
+ #define EXPORT_SYMBOL_FLAGS_STATIC_RESOLVER 0x20
1555
+
1556
+
1557
+ /*
1558
+ * The linker_option_command contains linker options embedded in object files.
1559
+ */
1560
+ struct linker_option_command {
1561
+ uint32_t cmd; /* LC_LINKER_OPTION only used in MH_OBJECT filetypes */
1562
+ uint32_t cmdsize;
1563
+ uint32_t count; /* number of strings */
1564
+ /* concatenation of zero terminated UTF8 strings.
1565
+ Zero filled at end to align */
1566
+ };
1567
+
1568
+ /*
1569
+ * The symseg_command contains the offset and size of the GNU style
1570
+ * symbol table information as described in the header file <symseg.h>.
1571
+ * The symbol roots of the symbol segments must also be aligned properly
1572
+ * in the file. So the requirement of keeping the offsets aligned to a
1573
+ * multiple of a 4 bytes translates to the length field of the symbol
1574
+ * roots also being a multiple of a long. Also the padding must again be
1575
+ * zeroed. (THIS IS OBSOLETE and no longer supported).
1576
+ */
1577
+ struct symseg_command {
1578
+ uint32_t cmd; /* LC_SYMSEG */
1579
+ uint32_t cmdsize; /* sizeof(struct symseg_command) */
1580
+ uint32_t offset; /* symbol segment offset */
1581
+ uint32_t size; /* symbol segment size in bytes */
1582
+ };
1583
+
1584
+ /*
1585
+ * The ident_command contains a free format string table following the
1586
+ * ident_command structure. The strings are null terminated and the size of
1587
+ * the command is padded out with zero bytes to a multiple of 4 bytes/
1588
+ * (THIS IS OBSOLETE and no longer supported).
1589
+ */
1590
+ struct ident_command {
1591
+ uint32_t cmd; /* LC_IDENT */
1592
+ uint32_t cmdsize; /* strings that follow this command */
1593
+ };
1594
+
1595
+ /*
1596
+ * The fvmfile_command contains a reference to a file to be loaded at the
1597
+ * specified virtual address. (Presently, this command is reserved for
1598
+ * internal use. The kernel ignores this command when loading a program into
1599
+ * memory).
1600
+ */
1601
+ struct fvmfile_command {
1602
+ uint32_t cmd; /* LC_FVMFILE */
1603
+ uint32_t cmdsize; /* includes pathname string */
1604
+ union lc_str name; /* files pathname */
1605
+ uint32_t header_addr; /* files virtual address */
1606
+ };
1607
+
1608
+
1609
+ /*
1610
+ * The entry_point_command is a replacement for thread_command.
1611
+ * It is used for main executables to specify the location (file offset)
1612
+ * of main(). If -stack_size was used at link time, the stacksize
1613
+ * field will contain the stack size need for the main thread.
1614
+ */
1615
+ struct entry_point_command {
1616
+ uint32_t cmd; /* LC_MAIN only used in MH_EXECUTE filetypes */
1617
+ uint32_t cmdsize; /* 24 */
1618
+ uint64_t entryoff; /* file (__TEXT) offset of main() */
1619
+ uint64_t stacksize;/* if not zero, initial stack size */
1620
+ };
1621
+
1622
+
1623
+ /*
1624
+ * The source_version_command is an optional load command containing
1625
+ * the version of the sources used to build the binary.
1626
+ */
1627
+ struct source_version_command {
1628
+ uint32_t cmd; /* LC_SOURCE_VERSION */
1629
+ uint32_t cmdsize; /* 16 */
1630
+ uint64_t version; /* A.B.C.D.E packed as a24.b10.c10.d10.e10 */
1631
+ };
1632
+
1633
+
1634
+ /*
1635
+ * The LC_DATA_IN_CODE load commands uses a linkedit_data_command
1636
+ * to point to an array of data_in_code_entry entries. Each entry
1637
+ * describes a range of data in a code section.
1638
+ */
1639
+ struct data_in_code_entry {
1640
+ uint32_t offset; /* from mach_header to start of data range*/
1641
+ uint16_t length; /* number of bytes in data range */
1642
+ uint16_t kind; /* a DICE_KIND_* value */
1643
+ };
1644
+ #define DICE_KIND_DATA 0x0001
1645
+ #define DICE_KIND_JUMP_TABLE8 0x0002
1646
+ #define DICE_KIND_JUMP_TABLE16 0x0003
1647
+ #define DICE_KIND_JUMP_TABLE32 0x0004
1648
+ #define DICE_KIND_ABS_JUMP_TABLE32 0x0005
1649
+
1650
+
1651
+
1652
+ /*
1653
+ * Sections of type S_THREAD_LOCAL_VARIABLES contain an array
1654
+ * of tlv_descriptor structures.
1655
+ */
1656
+ struct tlv_descriptor
1657
+ {
1658
+ void* (*thunk)(struct tlv_descriptor*);
1659
+ unsigned long key;
1660
+ unsigned long offset;
1661
+ };
1662
+
1663
+ /*
1664
+ * LC_NOTE commands describe a region of arbitrary data included in a Mach-O
1665
+ * file. Its initial use is to record extra data in MH_CORE files.
1666
+ */
1667
+ struct note_command {
1668
+ uint32_t cmd; /* LC_NOTE */
1669
+ uint32_t cmdsize; /* sizeof(struct note_command) */
1670
+ char data_owner[16]; /* owner name for this LC_NOTE */
1671
+ uint64_t offset; /* file offset of this data */
1672
+ uint64_t size; /* length of data region */
1673
+ };
1674
+
1675
+ /*
1676
+ * LC_FILESET_ENTRY commands describe constituent Mach-O files that are part
1677
+ * of a fileset. In one implementation, entries are dylibs with individual
1678
+ * mach headers and repositionable text and data segments. Each entry is
1679
+ * further described by its own mach header.
1680
+ */
1681
+ struct fileset_entry_command {
1682
+ uint32_t cmd; /* LC_FILESET_ENTRY */
1683
+ uint32_t cmdsize; /* includes entry_id string */
1684
+ uint64_t vmaddr; /* memory address of the entry */
1685
+ uint64_t fileoff; /* file offset of the entry */
1686
+ union lc_str entry_id; /* contained entry id */
1687
+ uint32_t reserved; /* reserved */
158
1688
  };
1689
+
1690
+ /*
1691
+ * These deprecated values may still be used within Apple but are mechanically
1692
+ * removed from public API. The mechanical process may produce unusual results.
1693
+ */
1694
+ #if (!defined(PLATFORM_MACCATALYST))
1695
+ #define PLATFORM_MACCATALYST PLATFORM_MACCATALYST
1696
+ #endif
1697
+
1698
+ #endif /* _MACHO_LOADER_H_ */