]> Git Repo - qemu.git/commitdiff
linux-user: Use abi_ulong for TARGET_ELF_PAGESTART
authorYongbok Kim <[email protected]>
Mon, 20 Apr 2015 15:15:20 +0000 (16:15 +0100)
committerRiku Voipio <[email protected]>
Mon, 15 Jun 2015 08:36:58 +0000 (11:36 +0300)
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 <[email protected]>
Reviewed-by: Peter Maydell <[email protected]>
Signed-off-by: Riku Voipio <[email protected]>
linux-user/elfload.c

index b71e86697362b893b822314840c87ec8da8d2832..17883686f0704b85e5dbd7e80ca9f433f390f108 100644 (file)
@@ -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
This page took 0.028313 seconds and 4 git commands to generate.