xrw67 / elfloader

load so file into current memory space and run function
MIT License
80 stars 28 forks source link

[Request] Call constructor after load and call destructor before unload #3

Open nk4z0u opened 4 months ago

nk4z0u commented 4 months ago

A .so file may contain .init, .init_array, .fini and .fini_array. Taking constructor as an example, the .init and .init_array should be called firstly after the module is loaded and before call run_elf_module. That's because functions such as -eentry will be included in .init_array, and should be called firstly after loaded, otherwise the initialization won't be done and the call to run_elf_module may fail because of the dependency on initialization.

May I ask if you will update this project?

Thanks for your awesome work.