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