[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: |
Peter Maydell |
Subject: |
Re: [Qemu-devel] [PATCH v2 02/10] elfload: fix size of registers for N32 |
Date: |
Thu, 4 Apr 2013 16:46:24 +0100 |
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).
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).
-- PMM
[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