| To: | Franck Bui-Huu <vagabon.xyz@gmail.com> |
|---|---|
| Subject: | Re: struct sigcontext for N32 userland |
| From: | Ralf Baechle <ralf@linux-mips.org> |
| Date: | Tue, 13 Feb 2007 11:38:26 +0000 |
| Cc: | Atsushi Nemoto <anemo@mba.ocn.ne.jp>, linux-mips@linux-mips.org |
| In-reply-to: | <cda58cb80702130027o1ebec149ib25090881f7ac6a1@mail.gmail.com> |
| Original-recipient: | rfc822;linux-mips@linux-mips.org |
| References: | <20070213.005113.89067116.anemo@mba.ocn.ne.jp> <cda58cb80702130027o1ebec149ib25090881f7ac6a1@mail.gmail.com> |
| Sender: | linux-mips-bounce@linux-mips.org |
| User-agent: | Mutt/1.4.2.2i |
On Tue, Feb 13, 2007 at 09:27:20AM +0100, Franck Bui-Huu wrote:
> On 2/12/07, Atsushi Nemoto <anemo@mba.ocn.ne.jp> wrote:
> >If N32 userland refers asm-mips/sigcontext.h, struct sigcontext cause
> >some troubles.
> >
> >#if _MIPS_SIM == _MIPS_SIM_ABI64 || _MIPS_SIM == _MIPS_SIM_NABI32
> >
> >struct sigcontext {
> > unsigned long sc_regs[32];
> >...
> >
> >
> >The kernel use 64-bit for sc_regs[0], and both N32/N64 userland
> >expects it was 64-bit. But size of 'long' on N32 is actually 32-bit.
> >So this definition make some confusion.
> >
> >glibc has its own sigcontext.h and it uses 'unsigned long long' for
> >sc_regs, so no real problem with glibc.
Looks like a case for __u32, __u64 then.
> Just out of curiosity, for what purpose does the glibc use sigcontext ?
Afair it doesn't use sigcontext itself but makes it available to
applications through <signal.h>. Typical users are virtual machines,
JITs, debuggers, user space virtual memory.
Ralf
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | [PATCH 3/3] Rename CONFIG_BUILD_ELF64 into CONFIG_64BIT_BUILD_ELF32, Franck Bui-Huu |
|---|---|
| Next by Date: | Re: [PATCH] fix irq handling of DECstations, Ralf Baechle |
| Previous by Thread: | Re: struct sigcontext for N32 userland, Franck Bui-Huu |
| Next by Thread: | Re: struct sigcontext for N32 userland, Atsushi Nemoto |
| Indexes: | [Date] [Thread] [Top] [All Lists] |