You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2024/10/12 04:29:31 UTC

(nuttx) 18/20: modlib:if use LMA, not set bss

This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git

commit 0dd522825966bad59e9fc4ad097d648cfc1860e2
Author: anjiahao <an...@xiaomi.com>
AuthorDate: Mon Jul 29 12:28:48 2024 +0800

    modlib:if use LMA, not set bss
    
    Signed-off-by: anjiahao <an...@xiaomi.com>
---
 libs/libc/modlib/modlib_load.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/libs/libc/modlib/modlib_load.c b/libs/libc/modlib/modlib_load.c
index 8c9a962114..63e12ab382 100644
--- a/libs/libc/modlib/modlib_load.c
+++ b/libs/libc/modlib/modlib_load.c
@@ -398,10 +398,12 @@ static inline int modlib_loadfile(FAR struct mod_loadinfo_s *loadinfo)
            * section must be cleared.
            */
 
+#ifndef CONFIG_MODLIB_LOADTO_LMA
           else if (*pptr != NULL)
             {
               memset(*pptr, 0, shdr->sh_size);
             }
+#endif
 
           /* Update sh_addr to point to copy in memory */