My project is to load an ELF executable file by using dynamic loader ld.so. After I mapped the executable and the loader in memory. I start the loader program. But, I got the error message as below, Inconsistency detected by ld.so: rtld.c: 306: _dl_start_final: Assertion `info- >l.l_tls_modid == 0' failed! The info is declared in the function _dl_start. The info->l.l_tls_modid has never been assigned to any value after that (USE_TLS is defined, USE_THREAD and DONT_USE_BOOTSTRAP_MAP is not defined). When loader ran to line 306--assert (info->l.l_tls_modid), It failed. Obviously, itβs because the info is not initialized after declaration. Now I have to clean the memory above the stack- top before I start the loader program to get it works.
You're doing something outside the spec, there's nothing we can help with.