This is the mail archive of the
binutils@sourceware.cygnus.com
mailing list for the binutils project.
Re: gas generating bad code for i386
- To: aph at pasanda dot cygnus dot co dot uk
- Subject: Re: gas generating bad code for i386
- From: Ian Lance Taylor <ian at zembu dot com>
- Date: 7 Mar 2000 15:04:19 -0500
- CC: ftr at oracom dot com, binutils at sourceware dot cygnus dot com
- References: <20000307200028.29749.qmail@pasanda.cygnus.co.uk>
Date: 7 Mar 2000 20:00:28 -0000
From: Andrew Haley <aph@pasanda.cygnus.co.uk>
> 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.
This has changed. With the current sources `call 4' generates a
relocation for a PC relative call to the absolute address 4.
Ian