This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: fPIC and %ebx
On Wed, Nov 14, 2001 at 10:54:59PM -0500, Joy Mukherjee wrote:
> The problem is that whenever, I call
> a function, the value of %ebx is being reset to the original one at the
> beginning of the function.
This is how ELF PIC code is intended to work. You want something
else entirely, and the compiler doesn't support that.
The closest equivalent that I can imagine is non-pic code with a
global hard register variable that points to your data structure.
See http://gcc.gnu.org/onlinedocs/gcc-3.0/gcc_5.html#SEC105.
r~