dotnet / runtimelab

This repo is for experimentation and exploring new ideas that may or may not make it into the main dotnet/runtime repo.
MIT License
1.42k stars 198 forks source link

[NativeAOT-LLVM] what should be in __managed__Startup #1816

Closed yowl closed 2 years ago

yowl commented 2 years ago

When you call a native library the RhpReversePInvoke2 attempts to initialize the runtime calling __managed__Startup. Should this be very similar to __managed__Main except it calls Internal_CompilerGenerated__Module___NativeLibraryStartup instead of StartupCodeMain?

jkotas commented 2 years ago

Yes, that sounds right.

yowl commented 2 years ago

Thanks, what is the relationship between this initialisation and CoreRT_StaticInitialization ?

yowl commented 2 years ago

Ok, never mind on that, I see its for some kind of callback.