This is the mail archive of the
mailing list for the glibc project.
Re: Thanks (__cmpdi2) and...
- To: glibc-linux at ricardo dot ecn dot wfu dot edu
- Subject: Re: Thanks (__cmpdi2) and...
- From: Wolfgang Sourdeau <wolfgang at ultim dot net>
- Date: Thu, 11 May 2000 09:40:11 -0400 (EDT)
- Reply-To: glibc-linux at ricardo dot ecn dot wfu dot edu
> _syscall3(int, perf, int op, int counter, int event);
> When doing: gcc -fpic -g -Wall foo.c
> I get: Fixed or forbidden register 3 (bx) spilled for class BREG.
> Error, bomb, choke...
> I realize that this is not really a glibc question, so feel free to
> ignore. Last one, I promise!
It is a question both related to the kernel and glibc. When you declare
such as syscall, it is expanded in an asm block where the ebx registry
is used to transmit parameters to the kernel with interrupt 0x80.
The problem is that ebx is used by the PIC encoding for something I
don't remember (it contains the address of sth... the glibc guys will
explain this better than me). But the result is that there is a clash
between the do.
Something I noticed, which might as well considered as a bug somehow, is
that if you compile your code without "-fpic" and still link your .o
files as a shared library, you don't have that clash and the library is
still working. I don't know exactly what is the mechanics behind this,
maybe the library becomes unstable...
Any explanation or link to related documents ?
A chicken is an egg's way of producing more eggs.