This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: Reloc BUG in as
Geoff Keating <geoffk@geoffk.org> writes:
> > Date: Fri, 2 Mar 2001 03:06:04 +0100 (CET)
> > From: Mikulas Patocka <mikulas@artax.karlin.mff.cuni.cz>
> >
> > Hi.
> >
> > as sometimes does not create reloc entry. It is a bug. Tested on binutils
> > 2.10.91.
>
> Actually, it's the reverse, isn't it? GAS should never create the
> reloc for 'call a-b', since it can compute it correctly while assembling.
That is arguably true. However, in that case gas needs to generate a
call to the absolute address. But it doesn't. It generates a
PC-relative call.
There are two correct options: 1) generate a call to the absolute
address; 2) generate a PC-relative call with a relocation which the
linker will resolve to the absolute address. In the failing case, gas
takes neither option.
Ian