diff options
author | Laurent Vivier <laurent@vivier.eu> | 2018-07-16 21:53:49 +0200 |
---|---|---|
committer | Laurent Vivier <laurent@vivier.eu> | 2018-07-22 21:32:50 +0200 |
commit | 33143c446eb88de28ea3088b279feda8f693e398 (patch) | |
tree | 5301441d6ca8958b24bd207ce71817cf8da6afe7 /linux-user/qemu.h | |
parent | 5b3ecd3d941a0ae8a8cfbba5ab8139b2bf104822 (diff) |
linux-user: fix ELF load alignment error
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.
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
[lv: fixed "info->alignment = 0"]
Message-Id: <20180716195349.29959-1-laurent@vivier.eu>
Diffstat (limited to 'linux-user/qemu.h')
-rw-r--r-- | linux-user/qemu.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/linux-user/qemu.h b/linux-user/qemu.h index bb85c81aa4..7b16a1cdea 100644 --- a/linux-user/qemu.h +++ b/linux-user/qemu.h @@ -51,6 +51,7 @@ struct image_info { abi_ulong file_string; uint32_t elf_flags; int personality; + abi_ulong alignment; /* The fields below are used in FDPIC mode. */ abi_ulong loadmap_addr; |