[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2 02/10] elfload: fix size of registers for N32
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] [PATCH v2 02/10] elfload: fix size of registers for N32 |
Date: |
Thu, 04 Apr 2013 18:00:15 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130311 Thunderbird/17.0.4 |
Il 04/04/2013 17:46, Peter Maydell ha scritto:
> On 4 April 2013 16:41, Paolo Bonzini <address@hidden> wrote:
>> Il 04/04/2013 17:32, Peter Maydell ha scritto:
>>> This is kind of ugly but it looks like the kernel is kind
>>> of ugly too (ie elf_greg_t as a type is not defined the
>>> same way necessarily for all targets and ABIs). At some
>>> point this type should probably live in a header file
>>> in linux-user/$arch/ but for now I guess it can pass.
>>>
>>> Reviewed-by: Peter Maydell <address@hidden>
>>
>> I'll add abi_reg to abitypes.h and move tswapreg there, so
>> that the signal handling structures could use it too.
>
> I started off thinking that was the right thing, but then
> I realised that the signal handling structures vary in what
> they use (eg the MIPS ones tend to really use u32 and u64),
> so they aren't necessarily the same type as elf_greg_t).
Right, MIPS o32 uses uint64_t. So I'll keep target_elf_greg_t as in v2.
> I think the conceptual ideal is that we should have
> abi types which match the kernel's user-facing types.
> This is a bit messed up here because the kernel doesn't
> actually expose elf_greg_t in most archs (and because
> MIPS has different types for "what the kernel thinks
> long is" vs "what userspace thinks long is", which is
> just plain confusing when looking at non-user-facing
> struct definitions).
Paolo
[Qemu-devel] [PATCH v2 03/10] elfload: use tswapreg consistently in elf_core_copy_regs, Paolo Bonzini, 2013/04/03
[Qemu-devel] [PATCH v2 04/10] elfload: use abi_short/ushort instead of target_short/ushort, Paolo Bonzini, 2013/04/03
[Qemu-devel] [PATCH v2 06/10] elfload: only give abi_long/ulong the alignment specified by the target, Paolo Bonzini, 2013/04/03