* Joel Stanley <joel@jms.id.au>:
> On Tue, 1 Aug 2023 at 23:28, Helge Deller <deller@gmx.de> wrote:
> >
> > This patch series is a fix-up for some current problems
> > regarding heap memory / brk handling in qemu which happens
> > on some 32-bit platforms, e.g. problems loading static
> > binaries.
> >
> > This series includes the 5 patches from Akihiko Odaki
> > with some additional fixes and cleanups by me.
>
> This has the same segfault as the branch that I previously tested,
> when running on a ppc64le host..
>
> As a reminder, the ppc64le machine (normally, and does in this case)
> uses a 64K page size. I think this is a detail that is missing from
> your chroot testing.
Could you try with this hunk on top of the patch series ?
Helge
diff --git a/linux-user/elfload.c b/linux-user/elfload.c
index 8f5a79b537..a61e3d1080 100644
--- a/linux-user/elfload.c
+++ b/linux-user/elfload.c
@@ -3178,7 +3178,7 @@ static void load_elf_image(const char *image_name, int image_fd,
info->start_data = -1;
info->end_data = 0;
/* possible start for brk is behind all sections of this ELF file. */
- info->brk = TARGET_PAGE_ALIGN(load_offset + hiaddr);
+ info->brk = HOST_PAGE_ALIGN(load_offset + hiaddr);
info->elf_flags = ehdr->e_flags;
prot_exec = PROT_EXEC;