This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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.




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]