diff options
author | Yongbok Kim | 2015-04-20 17:15:20 +0200 |
---|---|---|
committer | Riku Voipio | 2015-06-15 10:36:58 +0200 |
commit | 79cb1f1d698da5e1e183863aa3c8a91b2e750664 (patch) | |
tree | 138c92cbe930ece6b8a68fa50009b55cc6c85d86 /linux-user | |
parent | linux-user: Allocate thunk size dynamically (diff) | |
download | qemu-79cb1f1d698da5e1e183863aa3c8a91b2e750664.tar.gz qemu-79cb1f1d698da5e1e183863aa3c8a91b2e750664.tar.xz qemu-79cb1f1d698da5e1e183863aa3c8a91b2e750664.zip |
linux-user: Use abi_ulong for TARGET_ELF_PAGESTART
TARGET_ELF_PAGESTART is required to use abi_ulong to correctly handle
addresses for different target bits width.
This patch fixes a problem when running a 64-bit user mode application
on 32-bit host machines.
Signed-off-by: Yongbok Kim <yongbok.kim@imgtec.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
Diffstat (limited to 'linux-user')
-rw-r--r-- | linux-user/elfload.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/linux-user/elfload.c b/linux-user/elfload.c index b71e866973..17883686f0 100644 --- a/linux-user/elfload.c +++ b/linux-user/elfload.c @@ -1256,7 +1256,8 @@ struct exec /* Necessary parameters */ #define TARGET_ELF_EXEC_PAGESIZE TARGET_PAGE_SIZE -#define TARGET_ELF_PAGESTART(_v) ((_v) & ~(unsigned long)(TARGET_ELF_EXEC_PAGESIZE-1)) +#define TARGET_ELF_PAGESTART(_v) ((_v) & \ + ~(abi_ulong)(TARGET_ELF_EXEC_PAGESIZE-1)) #define TARGET_ELF_PAGEOFFSET(_v) ((_v) & (TARGET_ELF_EXEC_PAGESIZE-1)) #define DLINFO_ITEMS 14 |