I'm trying to understand the swift runtime and it's security implications, since even parts of the standard library is implemented in C++!!! I'm trying this on Linux at the moment, because that's the platform I'm most familiar with.
I wanted to ask what's the entry point into the swift Runtime from the dynamic-linker/libc, because I could not find the
main(int, char**) function either in the swift runtime library or the compiler source code? (I did find
SILGenFunction::emitArtificialTopLevel which the compiler seems to be using to artificially inject
NSApplicationMain into the application, but I could not find the
main(int,char**) function anywhere.)
Since the executable is not statically linked, it has to follow System-V ABI so that
ld.so can launch the application correctly and will really appreciate if someone can point out how
ld.so/libc hands over control to swift runtime.