You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by "pkarashchenko (via GitHub)" <gi...@apache.org> on 2023/09/01 20:44:24 UTC
[GitHub] [nuttx] pkarashchenko commented on a diff in pull request #10462: ELF Loader
pkarashchenko commented on code in PR #10462:
URL: https://github.com/apache/nuttx/pull/10462#discussion_r1313502561
##########
include/nuttx/arch.h:
##########
@@ -772,6 +772,21 @@ void up_textheap_free(FAR void *p);
bool up_textheap_heapmember(FAR void *p);
#endif
+/****************************************************************************
+ * Name: up_copy_section
+ *
+ * Description:
+ * Copy section from general temporary buffer(src) to special addr(dest).
+ *
+ * Returned Value:
+ * Zero (OK) on success; a negated errno value on failure.
+ *
+ ****************************************************************************/
+
+#if defined(CONFIG_ARCH_USE_COPY_SECTION)
+int up_copy_section(void *dest, const void *src, size_t n);
Review Comment:
```suggestion
int up_copy_section(FAR void *dest, FAR const void *src, size_t n);
```
##########
binfmt/libelf/libelf_uninit.c:
##########
@@ -94,6 +94,12 @@ int elf_freebuffers(FAR struct elf_loadinfo_s *loadinfo)
{
/* Release all working allocations */
+ if (loadinfo->phdr)
+ {
+ kmm_free((FAR void *)loadinfo->phdr);
+ loadinfo->phdr = NULL;
Review Comment:
```suggestion
loadinfo->phdr = NULL;
```
--
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: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org