qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] linux-user: fix ELF load alignment error


From: Richard Henderson
Subject: Re: [Qemu-devel] [PATCH] linux-user: fix ELF load alignment error
Date: Mon, 16 Jul 2018 16:46:16 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0

On 07/16/2018 12:53 PM, Laurent Vivier wrote:
> When we try to use some targets on ppc64, it can happen the target
> doesn't support the host page size to align ELF load sections and
> fails with:
> 
>   ELF load command alignment not page-aligned
> 
> Since commit a70daba3771 ("linux-user: Tell guest about big host
> page sizes") the host page size is used to align ELF sections, but
> this doesn't work if the alignment required by the load section is
> smaller than the host one.  For these cases, we continue to use the
> TARGET_PAGE_SIZE instead of the host one.
> 
> I have tested this change on ppc64, and it fixes qemu linux-user for:
>   s390x, m68k, i386, arm, aarch64, hppa
> and I have tested it doesn't break the following targets:
>   x86_64, mips64el, sh4
> mips and mipsel abort, but I think for another reason.
...
>      loaddr = -1, hiaddr = 0;
> +    info->alignment |=  0;

Plain assignment for initialization.

Otherwise,
Reviewed-by: Richard Henderson <address@hidden>


r~



reply via email to

[Prev in Thread] Current Thread [Next in Thread]