binfmt/elf: bss section should init to zero
Signed-off-by: hujun5 <hujun5@xiaomi.com>
This commit is contained in:
parent
d89e0996f5
commit
9f1cb4135b
@ -194,6 +194,15 @@ static inline int elf_loadfile(FAR struct elf_loadinfo_s *loadinfo)
|
||||
}
|
||||
}
|
||||
|
||||
/* If there is no data in an allocated section, then the
|
||||
* allocated section must be cleared.
|
||||
*/
|
||||
|
||||
else
|
||||
{
|
||||
memset((FAR uint8_t *)shdr->sh_addr, 0, shdr->sh_size);
|
||||
}
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user