This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: mips: branches to external labels are broken
On Nov 26, 2002, cgd@broadcom.com wrote:
> At Tue, 26 Nov 2002 12:40:23 +0000 (UTC), "Thiemo Seufer" wrote:
>> > Which specs? There's no spec I'm aware of that introduces any
>> > relocation type that could be used for branch targets. R_MIPS_PC16 is
>> > certainly not it,
>>
>> R_MIPS_PC16 is defined in the ELF ABI as relocation against an external
>> symbol, and branches are the only PC-relative MIPS insns.
> [just thought about this a little]
> could you just as well use R_MIPS_PC16 to calculate PC-relative
> offsets for something like:
Right. I wouldn't be surprised if we already did something like that.
There's even code in tc_gen_reloc() that turns a BFD_RELOC_16 with
fixp->fx_pcrel set into BFD_RELOC_16_PCREL, but I doubt it's ever
triggered at the moment.
--
Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer aoliva@{redhat.com, gcc.gnu.org}
CS PhD student at IC-Unicamp oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist Professional serial bug killer