casaroli commented on code in PR #20131:
URL: https://github.com/apache/nuttx/pull/20131#discussion_r4110951137


##########
libs/libc/elf/elf_insert.c:
##########
@@ -414,7 +422,13 @@ FAR void *libelf_insert(FAR const char *filename, FAR 
const char *modname)
   modp->datasize  = loadinfo.datasize;
 #endif
 
-  /* Call the module initializer */
+  /* Call the module initializer.  An FDPIC object's constructors reach its
+   * globals through its own data base, which the loading thread does not
+   * carry; a non-FDPIC one runs on the base it is entered with, so it gets
+   * none of its own.
+   */
+
+  gotbase = loadinfo.fdpic ? loadinfo.gotbase : 0;

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]

Reply via email to