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/
This archive was generated by hypermail 2b29 : Sat Jan 15 2000 - 21:00:22 EST