Patchwork [01/19] linux-user: stack_base is now mandatory on all targets

login
register
mail settings
Submitter riku.voipio@linaro.org
Date Feb. 3, 2012, 2:49 p.m.
Message ID <d0fd11ffd3e2cb65234da354f14d745e5fbfce67.1328280144.git.riku.voipio@linaro.org>
Download mbox | patch
Permalink /patch/139409/
State New
Headers show

Comments

riku.voipio@linaro.org - Feb. 3, 2012, 2:49 p.m.
From: Riku Voipio <riku.voipio@linaro.org>

Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
---
 linux-user/qemu.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
Laurent Desnogues - Feb. 8, 2012, 9:46 a.m.
On Fri, Feb 3, 2012 at 3:49 PM,  <riku.voipio@linaro.org> wrote:
> From: Riku Voipio <riku.voipio@linaro.org>
>
> Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
> ---
>  linux-user/qemu.h |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/linux-user/qemu.h b/linux-user/qemu.h
> index 55ad9d8..30e2abd 100644
> --- a/linux-user/qemu.h
> +++ b/linux-user/qemu.h
> @@ -123,10 +123,10 @@ typedef struct TaskState {
>  #endif
>  #if defined(TARGET_ARM) || defined(TARGET_M68K) || defined(TARGET_UNICORE32)
>     /* Extra fields for semihosted binaries.  */
> -    uint32_t stack_base;
>     uint32_t heap_base;
>     uint32_t heap_limit;
>  #endif
> +    uint32_t stack_base;

Shouldn't this be abi_ulong instead of uint32_t?

>     int used; /* non zero if used */
>     struct image_info *info;
>     struct linux_binprm *bprm;

Laurent
Laurent Desnogues - March 7, 2013, 11:03 a.m.
On Wed, Feb 8, 2012 at 10:46 AM, Laurent Desnogues
<laurent.desnogues@gmail.com> wrote:
> On Fri, Feb 3, 2012 at 3:49 PM,  <riku.voipio@linaro.org> wrote:
>> From: Riku Voipio <riku.voipio@linaro.org>
>>
>> Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
>> ---
>>  linux-user/qemu.h |    2 +-
>>  1 files changed, 1 insertions(+), 1 deletions(-)
>>
>> diff --git a/linux-user/qemu.h b/linux-user/qemu.h
>> index 55ad9d8..30e2abd 100644
>> --- a/linux-user/qemu.h
>> +++ b/linux-user/qemu.h
>> @@ -123,10 +123,10 @@ typedef struct TaskState {
>>  #endif
>>  #if defined(TARGET_ARM) || defined(TARGET_M68K) || defined(TARGET_UNICORE32)
>>     /* Extra fields for semihosted binaries.  */
>> -    uint32_t stack_base;
>>     uint32_t heap_base;
>>     uint32_t heap_limit;
>>  #endif
>> +    uint32_t stack_base;
>
> Shouldn't this be abi_ulong instead of uint32_t?

Ping...

Yes it's more than a year old, but if Aarch64 support with semihosting
ever comes to life :)

Laurent

>>     int used; /* non zero if used */
>>     struct image_info *info;
>>     struct linux_binprm *bprm;
>
> Laurent
riku.voipio@linaro.org - March 11, 2013, 3 p.m.
>>>  #if defined(TARGET_ARM) || defined(TARGET_M68K) || defined(TARGET_UNICORE32)
>>>     /* Extra fields for semihosted binaries.  */
>>> -    uint32_t stack_base;
>>>     uint32_t heap_base;
>>>     uint32_t heap_limit;
>>>  #endif
>>> +    uint32_t stack_base;

>> Shouldn't this be abi_ulong instead of uint32_t?

> Ping...

> Yes it's more than a year old, but if Aarch64 support with semihosting
> ever comes to life :)

You are right, but we need to change the other variables as well, and
the tswap32 code in semihosting code while at it? I think the change
is probable better done in the patches that actually add aarch64
semihosting support to qemu.

Riku

Patch

diff --git a/linux-user/qemu.h b/linux-user/qemu.h
index 55ad9d8..30e2abd 100644
--- a/linux-user/qemu.h
+++ b/linux-user/qemu.h
@@ -123,10 +123,10 @@  typedef struct TaskState {
 #endif
 #if defined(TARGET_ARM) || defined(TARGET_M68K) || defined(TARGET_UNICORE32)
     /* Extra fields for semihosted binaries.  */
-    uint32_t stack_base;
     uint32_t heap_base;
     uint32_t heap_limit;
 #endif
+    uint32_t stack_base;
     int used; /* non zero if used */
     struct image_info *info;
     struct linux_binprm *bprm;