Open migthymax opened 1 year ago
To add a bit to the ticket : we should have keep support for ctor/dtors and just be able to use init_array/fini_array when need it. Checking the elf.library's changelog, i find that Alfkil add support for fini/init, but it wasn't tested. There are relevant part:
- Elf32_CallConstructors/Destructors have been updated to account for .init_array and .fini_array sections (untested).
So, that to be seen if elf.library is "ok" with.
And just in case we need that later , there are pretty good discussion of fini/init/ctor/dtor stuff on gnu.org, with bunch of test cases and stuff: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=46770
also there nice article about which may help us too: https://maskray.me/blog/2021-11-07-init-ctors-init-array
Support for init_array/fini_array which redeem the old dtors/ctors mechanism for constructors/destructors