Ref: #17374 (comment)
We currently look for UnmanagedCallersOnly entry points in all assemblies:
<!-- Process UnmanagedCallersOnly attributes from every assembly -->
<UnmanagedEntryPointsAssembly Remove="System.Private.CoreLib" />
<UnmanagedEntryPointsAssembly Include="@(_UpdatedManagedAssemblyToLink->'%(Filename)')" />
We must to do this for all assemblies we've modified using the managed static registrar, but it might not be necessary for any other assemblies.
So we need to look into whether we can shrink this list of assemblies.