i386-specific G++ bug

Richard Henderson rth@cygnus.com
Sun Sep 28 12:18:00 GMT 1997


> The problem is that the following instruction is output:
> 
> 	movl _foo__Fv@GOT(%ebx),%edx
> 
> for the reference to foo() inside bar().  Since foo() is static, this
> is an invalid GOT reference.  The correct instruction would be:
> 
> 	leal _foo__Fv@GOTOFF(%ebx),%edx

While the later is more efficient, and should in fact be used in this
situation, the former should work.  If it doesn't, it is a linker bug.

What version of binutils are you using?


r~



More information about the Gcc mailing list