gas generating bad code for i386

Andrew Haley aph@pasanda.cygnus.co.uk
Tue Mar 7 12:00:00 GMT 2000


> Date: 7 Mar 2000 14:55:56 -0500
> From: Ian Lance Taylor <ian@zembu.com>
>
>       Absolute (as opposed to PC relative) call and jump operands must be
>    prefixed with `*'.  If no `*' is specified, `as' always chooses PC
>    relative addressing for jump/call labels.
> 
> That has to do with the addressing mode, not the target of the jump.
> I read `je 4' as a PC relative jump to the absolute address 4.  The
> current version of gas generates that, using a PC relative relocation.

Yes, but I think what he's referring to is the (IMHO unfortunate) fact
that `call 4' generates a relative call; that is, four bytes from the
following PC.  It doesn't generate a call to address 4.

Andrew.



More information about the Binutils mailing list