Linux-kernel mailing list archive 2000-02,: _syscall2 in PIC code on ix86

# _syscall2 in PIC code on ix86

Keith Owens (kaos@ocs.com.au)
Thu, 13 Jan 2000 21:45:53 +1100

- Messages sorted by: [ date ][ thread ][ subject ][ author ]
- Next message: Richard B. Johnson: "Re: Bad Floppy buffering in Verion 2.3.36"
- Previous message: Leos Bitto: "Re: Linux 2.2.15pre1"
- Next in thread: H. Peter Anvin: "Re: _syscall2 in PIC code on ix86"
- Reply: H. Peter Anvin: "Re: _syscall2 in PIC code on ix86"

Has anybody succeeded in using _syscall2 in code compiled with -fPIC on
ix86? I'm trying to convert modutils to a shared library and the
syscall is getting in the way. Minimal program to demonstrate the
problem.

/* x.c */
#include <errno.h>
#include <stdlib.h>
#include <asm/unistd.h>
#define __NR__create_module 167
_syscall2(long, _create_module, const char *, name, size_t, size);

# gcc -Wall -fPIC -o x.o x.c
x.c: In function `_create_module':
x.c:5: fixed or forbidden register 3 (bx) was spilled for class BREG.
This may be due to a compiler bug or to impossible asm
statements or clauses.

Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/egcs-2.91.66/specs
gcc version egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)

gcc 2.7.2.3 has the same problem. Changing optimization or adding
-shared makes no difference.

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

- Next message: Richard B. Johnson: "Re: Bad Floppy buffering in Verion 2.3.36"
- Previous message: Leos Bitto: "Re: Linux 2.2.15pre1"
- Next in thread: H. Peter Anvin: "Re: _syscall2 in PIC code on ix86"
- Reply: H. Peter Anvin: "Re: _syscall2 in PIC code on ix86"