No way to specify DllMain in DLL projects in Silver

If you look at IslandRTL I do implement dllmainstartup:


method ExternalCalls.DllMainCRTStartup(aModule: rtl.HMODULE; aReason: rtl.DWORD; aReserved: ^Void): Boolean;
begin
  fModuleHandle := aModule;
  var m: VoidMethod;
  if aReason = rtl.DLL_PROCESS_ATTACH then begin
    m := @DllEntry;
    if assigned(m) then m();
  end;
  if aReason = rtl.DLL_PROCESS_ATTACH then
    m := @DllExit;
    if assigned(m) then m();
  exit true;
end;

You should be able to override these two:

    [SymbolName('__elements_dll_entry'), &Weak]
    class method DllEntry;  external;
    [SymbolName('__elements_dll_exit'), &Weak]
    class method DllExit;  external;

(By defining non weak static methods with no arguments with those symbol names)

Never tried this myself though.