On 4/15/21 3:04 AM, Philippe Mathieu-Daudé wrote:
From: Laurent Vivier<laur...@vivier.eu>

When the mem_size of the segment is bigger than the file_size,
and if this space doesn't overlap another segment, it needs
to be cleared.

This bug is very similar to the one we had for linux-user,
22d113b52f41 ("linux-user: Fix loading of BSS segments"),
where .bss section is encoded as an extension of the the data
one by setting the segment p_memsz > p_filesz.

Signed-off-by: Laurent Vivier<laur...@vivier.eu>
Message-Id:<20210414105838.205019-1-laur...@vivier.eu>
[PMD: Use recently added address_space_set()]
Signed-off-by: Philippe Mathieu-Daudé<phi...@redhat.com>
---
  include/hw/elf_ops.h | 13 +++++++++++++
  1 file changed, 13 insertions(+)

Reviewed-by: Richard Henderson <richard.hender...@linaro.org>

r~

Reply via email to