Description
Description
There are several DllImports in the BCL for iOS (and the other Apple platforms) that contain references to native functions that don't exist. It's highly preferable to not have any P/Invokes to native functions that don't exist, because it allows the AOT compiler to generate more efficient code. It also makes other performance improvements possible.
-
System.Diagnostics.Process.dl
- P/Invoke to
SystemNative_ConfigureTerminalForChildProcess
inlibSystem.Native.dylib
, butlibSystem.Native.dylib
doesn't provide that function. Tracked in Annotate APIs throwing PNSE on iOS/tvOS/MacCatalyst #47910
- P/Invoke to
-
System.Net.Quic.dll
-
MsQuicOpen
Library:libmsquic.dylib
-
-
System.Reflection.Metadata.dll
-
ReadFile
Library:kernel32.dll
-
-
System.Security.Cryptography.Algorithms.dll, System.Security.Cryptography.OpenSsl.dll and System.Security.Cryptography.X509Certificates.dll
- Numerous references to functions in
libSystem.Security.Cryptography.Native.Apple.dylib
of the formAppleCryptoNative_*
orCryptoNative_*
. Tracked in Annotate APIs throwing PNSE on iOS/tvOS/MacCatalyst #47910
- Numerous references to functions in
-
System.Private.CoreLib.dll
- Numerous references to functions in
libSystem.Globalization.Native.dylib
of the formGlobalizationNative_*
. I believe this is because of pending work (issue #?)
- Two functions from
libhostpolicy.dylib
(corehost_resolve_component_dependencies
andcorehost_set_error_writer
). This has also been reported in iOS (and other Apple platforms): System.Private.CoreLib.dll has P/Invokes to a libhostpolicy library that isn't shipped #38543.
- Numerous references to functions in
This is from the microsoft.netcore.app.runtime.ios-arm64 pack (6.0.0-alpha.1.21063.13).
Full output from custom tool I wrote: https://gist.github.com/rolfbjarne/b9a6f16d2a6697c0d8dfc46c39160404