This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
GCC doesn't reload %ebx with the GOT ptr after __asm__
- From: fcorneli at elis dot rug dot ac dot be
- To: bug-gcc at gnu dot org
- Cc: Frank dot Cornelis at elis dot rug dot ac dot be
- Date: Fri, 6 Dec 2002 15:13:04 +0100 (CET)
- Subject: GCC doesn't reload %ebx with the GOT ptr after __asm__
Hi,
When generating PIC code and clobbering %ebx in inline asm, putting %ebx
in the list of clobbered registers doesn't result in GCC restoring the
content of %ebx after the inline asm code. This makes the code to generate
segmentation faults when accessing global symbols.
This bug has already been reported with demo-code at:
http://www.geocrawler.com/archives/3/356/1998/11/0/1955259/
I'm using GCC 3.2. Has this already been fixed in GCC 3.2.1 ?
Is someone working on it?
For now I'm using 'pushl %%ebx' ... 'popl %%ebx' to handle the problem,
but I really would love to see it the correct way (putting %ebx in the
list of clobbering registers).
You may always contact me at Frank.Cornelis@elis.rug.ac.be
Greetings,
Frank.