lkml.org 
[lkml]   [2000]   [Jan]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Subject_syscall2 in PIC code on ix86
Date
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/

\
 
 \ /
  Last update: 2005-03-22 13:55    [W:0.082 / U:0.680 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site