patacongo commented on issue #12356: URL: https://github.com/apache/nuttx/issues/12356#issuecomment-2125864651
> However, that alone did not solve the issue. I had to remove the calls `exec_ctores()` and `atexit(exec_dtors)` from `crt0.c` in order to not crash on ELF load. exec_ctors() is really simple, but it depends on a table of constructor addresses created by the build logic. These are defined by binfmt/libelf/gnu-elf.ld or similar: ``` /* Linker defined symbols to .ctors and .dtors */ extern initializer_t _sctors[]; extern initializer_t _ectors[]; extern initializer_t _sdtors[]; extern initializer_t _edtors[]; ``` Check whatever linker script you use to build the elf modules. Check that those symbols exist in the module. These define a table of constructor destructor address. Constructors start at _sctors and end at _ectors. Make sure that there are constructors in the table. Issues with atexit() may be like those of #1263. I don't know the state of that. > Regardless, I can live with NuttX kernel build that has no C++ static constructor support given everything else appears to be working flawlessly. But you shouldn't have to! -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org