This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: PATCH: Use x86_64/bits/{sigcontext,siginfo}.h for i386 and x86-64
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: Roland McGrath <roland at hack dot frob dot com>
- Cc: GNU C Library <libc-alpha at sourceware dot org>
- Date: Thu, 31 May 2012 21:42:32 -0700
- Subject: Re: PATCH: Use x86_64/bits/{sigcontext,siginfo}.h for i386 and x86-64
- References: <20120531145533.GA23995@intel.com><20120531222140.EE6472C095@topped-with-meat.com><CAMe9rOrHRONFELKAzO3PnsJWPbSci+sdJT3wc+4NSKQcMK3AUg@mail.gmail.com>
On Thu, May 31, 2012 at 5:31 PM, H.J. Lu <hjl.tools@gmail.com> wrote:
> On Thu, May 31, 2012 at 3:21 PM, Roland McGrath <roland@hack.frob.com> wrote:
>> bits/siginfo.h is OK.
>>
>> For bits/sigcontext.h the linux/ version uses the kernel header while the
>> linux/x86_64/ version instead duplicates most of its contents. ?Recent
>> kernel headers define some additional structures and macros that something
>> might be using, so strictly speaking this regresses the i386 API.
>>
>> As Joseph pointed out earlier, you should be citing all these differences
>> up front rather than us having to look at each file to check for them.
>>
>> Please examine the x86_64 asm/sigcontext.h for the earliest kernel-headers
>> version with which x86_64 glibc is compatible. ?If that version cannot be
>> used, then linux/x86_64/bits/sigcontext.h needs to be updated to add all
>> the missing bits from today's kernels' arch/x86/include/asm/sigcontext.h
>> before we can unify with the i386 version. ?If instead the old x86_64
>> kernel header has everything for the i386 case that the same kernel
>> version's i386 asm/sigcontext.h has, then we should just drop
>> linux/x86_64/bits/sigcontext.h entirely so the linux/ file using the
>> kernel header will be used instead.
>>
>
> I totally forgot about it. ?I have verified that asm/sigcontext.h from
> the Linux kernel 3.4 is 100% compatible with i386, x32 and x86-64.
> I believe the early kernels are compatible with i386 and x86-64.
> OK to install if it passes tests on x32 and x86-64?
>
> Thanks.
>
>
> --
> H.J.
> ---
> ? ? ? ?* sysdeps/unix/sysv/linux/x86_64/bits/sigcontext.h: Removed.
>
It doesn't work with kernel 2.4.20, whose x86-64 asm/sigcontext.h
only supports x86-64, not i386.
--
H.J.