Open
Description
For icalls, Mono can optionally be compiled wihout the big icall table in icall-def-netcore.h
. Instead, the icall table is defined by a special IL Linker step based on the icalls that are actually reachable from managed code.
This allows the native linker to tree-shake the native code and remove unused icalls. (Otherwise every icall looks like it is referenced from the big native function pointer array that is defined based on the contents of icall-def-netcore).
As we migrate to using QCalls more, we should enhance that infrastructure to also allow the qcall tables to be created based on use, too.