The compiler is able to generater position independant code but as far as I remember, there are still some issues in druntime which make it difficult to create dynamic librarys in D. You need to somehow initialize the runtime.