D-Programming-Language/druntime — pull request #473 by mxfm (2013-04-08 17:27:16+00:00)
Title: Remove druntime dependency on _Dmain() function

Currently druntime links to _Dmain symbol. This is inconvenient in situations where D language is used to write dynamic libraries: _Dmain symbol is still expected yet it is not needed. This commit provides _Dmain function. If user writes his version of main function, it would be caught by linker, called upon initialization and druntime version would be ignored. If user does not provide _Dmain() (relying on other code to be run at startup) but D runtime is still called at initialization, it would throw Error.