qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] linux-user: Use abi_ulong for TARGET_ELF_PAGESTART
@ 2015-04-20 15:15 Yongbok Kim
  2015-06-02  9:12 ` Yongbok Kim
  0 siblings, 1 reply; 3+ messages in thread
From: Yongbok Kim @ 2015-04-20 15:15 UTC (permalink / raw)
  To: qemu-devel; +Cc: peter.maydell, riku.voipio

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>
---
 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 399c021..edf0cf4 100644
--- a/linux-user/elfload.c
+++ b/linux-user/elfload.c
@@ -1227,7 +1227,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
-- 
1.7.5.4

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] [PATCH] linux-user: Use abi_ulong for TARGET_ELF_PAGESTART
  2015-04-20 15:15 [Qemu-devel] [PATCH] linux-user: Use abi_ulong for TARGET_ELF_PAGESTART Yongbok Kim
@ 2015-06-02  9:12 ` Yongbok Kim
  2015-06-12 12:42   ` Riku Voipio
  0 siblings, 1 reply; 3+ messages in thread
From: Yongbok Kim @ 2015-06-02  9:12 UTC (permalink / raw)
  To: qemu-devel; +Cc: peter.maydell, riku.voipio

ping!

On 20/04/2015 16:15, Yongbok Kim wrote:
> 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>
> ---
>  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 399c021..edf0cf4 100644
> --- a/linux-user/elfload.c
> +++ b/linux-user/elfload.c
> @@ -1227,7 +1227,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
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] [PATCH] linux-user: Use abi_ulong for TARGET_ELF_PAGESTART
  2015-06-02  9:12 ` Yongbok Kim
@ 2015-06-12 12:42   ` Riku Voipio
  0 siblings, 0 replies; 3+ messages in thread
From: Riku Voipio @ 2015-06-12 12:42 UTC (permalink / raw)
  To: Yongbok Kim; +Cc: qemu-devel

Hi,

Applied to linux-user que, thanks

Riku

On Tuesday, June 2, 2015 12:12:21 PM EEST, Yongbok Kim wrote:
> ping!
>
> On 20/04/2015 16:15, Yongbok Kim wrote:
>> 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> ...
>
>
>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-06-12 12:42 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-04-20 15:15 [Qemu-devel] [PATCH] linux-user: Use abi_ulong for TARGET_ELF_PAGESTART Yongbok Kim
2015-06-02  9:12 ` Yongbok Kim
2015-06-12 12:42   ` Riku Voipio

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).