Re: asm-x86/sigcontext.h changes break userland

From: Jakub Jelinek
Date: Wed Feb 13 2008 - 07:49:52 EST


On Wed, Feb 13, 2008 at 08:26:50AM +0100, Ingo Molnar wrote:
>
> * Jakub Jelinek <jakub@xxxxxxxxxx> wrote:
>
> > x86: use generic register names in struct sigcontext
> > http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=742fa54a62be6a263df14a553bf832724471dfbe
> >
> > changeset breaks userland, e.g. it is not possible to compile gcc
> > anymore (both 32-bit and 64-bit libgcc), and I expect any other
> > program which pokes into struct sigcontext. The register names with e
> > resp. r have been in use for years, what's the point breaking it now?
>
> ok - does the patch below solve the problem for you?

Yes, this fixes it. Thanks.

FYI, gcc uses glibc headers to get at struct sigcontext, but
on i386 (and many other arches) glibc's <bits/sigcontext.h> just includes
<asm/sigcontext.h>. On x86_64, ia64 and sparc* glibc doesn't include
asm/sigcontext.h, but provides its own definitions, so for gcc itself
only changing 32-bit parts woiuld be enough. That said, there are certainly
programs which include asm/sigcontext.h directly (plus there are other c
libraries, some of which may use asm/sigcontext.h).

Jakub
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/