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


##########
libs/libc/elf/elf_bind.c:
##########
@@ -733,6 +733,24 @@ static int libelf_relocatedyn(FAR struct module_s *modp,
           case DT_PLTRELSZ:
             reldata.relsz[I_PLT] = dyn[i].d_un.d_val;
             break;
+          case DT_NEEDED:

Review Comment:
   done



##########
include/nuttx/fdpic.h:
##########
@@ -159,6 +159,34 @@ static inline void fdpic_invoke(uintptr_t arg,
     }
 }
 
+/****************************************************************************
+ * Name: fdpic_call
+ *
+ * Description:
+ *   Call a function of a module the caller is not running in, such as a
+ *   constructor of a module being loaded or a destructor of one being
+ *   unloaded, with the data base that function needs.
+ *
+ *   A zero base means the function is not a module's, or the caller already
+ *   carries the right one, and it is called directly.  A non-FDPIC object
+ *   has a GOT too, so the caller decides which base to pass, not this.
+ *
+ * Input Parameters:
+ *   fn  - The function to call.
+ *   got - The data base to enter it with, or zero.
+ *
+ ****************************************************************************/
+
+static inline void fdpic_call(CODE void (*fn)(void), uintptr_t got)

Review Comment:
   done



##########
include/nuttx/lib/elf.h:
##########
@@ -190,6 +190,18 @@ struct module_s
   uint16_t nsect;                      /* Number of entries in sectalloc array 
*/
 #endif
   int dynamic;                         /* Module is a dynamic shared object */
+  bool fdpic;                          /* Module is an FDPIC object: its two

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