--headers main_5_1_compat Sections: Idx Name Size VMA Type 0 __text 00000f9c 0000000100002d64 TEXT 1 __stubs 000000d8 0000000100003d00 TEXT 2 __stub_helper 000000f0 0000000100003dd8 TEXT 3 __swift5_entry 00000004 0000000100003ec8 DATA 4 __const 00000006 0000000100003ecc DATA 5 __cstring 0000009b 0000000100003ed2 DATA 6 __unwind_info 00000090 0000000100003f70 DATA 7 __got 00000008 0000000100004000 DATA 8 __const 00000008 0000000100004008 DATA 9 __objc_imageinfo 00000008 0000000100004010 DATA 10 __la_symbol_ptr 00000090 0000000100008000 DATA 11 __swift51_hooks 000000b8 0000000100008090 DATA 12 __data 00000009 0000000100008148 DATA 13 __bss 000000c8 0000000100008158 BSS $ du -h main 36K main $ objdump --macho --headers main Sections: Idx Name Size VMA Type 0 __text 0000000c 0000000100003fa4 TEXT 1 __swift5_entry 00000004 0000000100003fb0 DATA 2 __const 00000002 0000000100003fb4 DATA 3 __unwind_info 00000048 0000000100003fb8 DATA 4 __objc_imageinfo 00000008 0000000100004000 DATA 19
// In "/usr/lib/swift-5.5/macosx/libswift_Concurrency.dylib" const FunctionTypeMetadata * swift_getFunctionTypeMetadataGlobalActorStandalone(...); // In "libswiftCompatibilityConcurrency.a" const FunctionTypeMetadata * swift_getFunctionTypeMetadataGlobalActorBackDeploy(...) { static BuilderFn builderFn; static dispatch_once_t builderToken; dispatch_once(&builderToken, ^{ // Prefer the function from the Swift runtime if it is available. builderFn = reinterpret_cast<BuilderFn>( dlsym(RTLD_DEFAULT, "swift_getFunctionTypeMetadataGlobalActor")); if (builderFn) return; builderFn = reinterpret_cast<BuilderFn>( dlsym(RTLD_DEFAULT, "swift_getFunctionTypeMetadataGlobalActorStandalone")); }); return builderFn(...); } https://github.com/apple/swift/blob/main/stdlib/public/BackDeployConcurrency/Metadata.cpp 38
on what's available in older runtimes • Make swift_async_extendedFramePointerFlags = 0 in back- deployed configurations • Back-deploy creation of global-actor-qualified function type metadata. • Use private concurrent queues for back-deployed 41