casaroli commented on code in PR #20131:
URL: https://github.com/apache/nuttx/pull/20131#discussion_r4110950073
##########
libs/libc/elf/elf_remove.c:
##########
@@ -59,12 +63,17 @@ int libelf_uninit(FAR struct module_s *modp)
}
#endif
- /* Is there an uninitializer? */
+ /* Is there an uninitializer? Like the constructors, an FDPIC object's
+ * destructors reach its globals through its own data base, which the
+ * unloading thread does not carry.
+ */
+
+ gotbase = modp->fdpic ? modp->gotbase : 0;
Review Comment:
done. it is zero now
##########
libs/libc/elf/elf_remove.c:
##########
@@ -59,12 +63,17 @@ int libelf_uninit(FAR struct module_s *modp)
}
#endif
- /* Is there an uninitializer? */
+ /* Is there an uninitializer? Like the constructors, an FDPIC object's
+ * destructors reach its globals through its own data base, which the
+ * unloading thread does not carry.
+ */
+
+ gotbase = modp->fdpic ? modp->gotbase : 0;
array = (FAR void (**)(void))modp->finiarr;
for (i = 0; i < modp->nfini; i++)
{
- array[i]();
+ fdpic_call(array[i], gotbase);
Review Comment:
done
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]