From 6a0965307b1231b9bee879fc471e47ee942623c6 Mon Sep 17 00:00:00 2001 From: anjiahao Date: Mon, 29 Jul 2024 12:28:48 +0800 Subject: [PATCH] modlib:if use LMA, not set bss Signed-off-by: anjiahao --- 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 8c9a962114919..63e12ab382a76 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 */