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


##########
libs/libc/elf/elf_load.c:
##########
@@ -364,6 +365,13 @@ static inline int libelf_loadfile(FAR struct 
mod_loadinfo_s *loadinfo)
             {
               if (phdr->p_flags & PF_X)
                 {
+                  if (loadinfo->fdpic && loadinfo->xipbase != 0)

Review Comment:
   A PIC ELF module links to ET_EXEC, so it takes the section path, where the 
skip at elf_load.c:493 already tests xipbase alone. The ET_DYN objects that are 
not FDPIC are the shared libraries, and elf_load.c:797 still gives them one 
combined allocation that the text must be copied into.



-- 
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