DT_INIT, Initialization Function for a kernel module
Posted: Tue Dec 12, 2017 6:55 am
I am creating a modular kernel, and for that I have a ModuleLoader. I have read that for freestanding compilation the build system (ld) does not creating any DT_INIT dynamic entry in the table (dynamic section). Before creating threads for each module's KModuleMain function, I need a mechanism to call their internal initialization function especially to call the global object constructors. Does anyone know how to set a DT_INIT function in the linker-script for ld & how to call all global object constructors in the shared library (kernel modules are implemented as dynamic shared libraries in the CircuitKernel)?
Kernel-link: https://github.com/SukantPal/CircuitKernel
Kernel-link: https://github.com/SukantPal/CircuitKernel