This is the mail archive of the
binutils@sourceware.cygnus.com
mailing list for the binutils project.
Re: wince gcc and clmips incompatibility
- To: dj at delorie dot com
- Subject: Re: wince gcc and clmips incompatibility
- From: "Reed Kotler" <reedkotler at hotmail dot com>
- Date: Tue, 23 May 2000 17:57:34 PDT
- Cc: binutils at sourceware dot cygnus dot com
>From: DJ Delorie <dj@delorie.com>
>To: reedkotler@hotmail.com
>CC: binutils@sourceware.cygnus.com
>Subject: Re: wince gcc and clmips incompatibility
>Date: Tue, 23 May 2000 17:39:40 -0400
>
> > The "pair" relocation is known by gcc wince but is not emitted
> > in this case. I will try and fix it.
>
>The reason is that gcc's MIPS backend can optimize the low and high
>loads separately, so there may not always be a pair of relocs. For
>example, it may do a HI reloc followed by two LO relocs. Forcing gcc
>to emit a pair of relocs for this, regardless of the type, would
>drastically effect its optimizer.
i don't know mips coff but this seems to possibly be just a plain bug.
see function mips_swap_reloc_out in pe-mips.c, line 603
case MIPS_R_REFLO:
if (reloc_src->r_vaddr == prev_addr)
{
/* FIXME: only slightly hackish. If we see a REFLO pointing to
the same address as a REFHI, we assume this is the matching
PAIR reloc and output it accordingly. The symndx is really
the low 16 bits of the addend */
bfd_h_put_32 (abfd, reloc_src->r_vaddr,
(bfd_byte *) reloc_dst->r_vaddr);
bfd_h_put_32 (abfd, reloc_src->r_symndx,
(bfd_byte *) reloc_dst->r_symndx);
bfd_h_put_16(abfd, MIPS_R_PAIR, (bfd_byte *)
reloc_dst->r_type);
return RELSZ;
}
break;
I'm not sure exactly why the PAIR wasnt emitted.
________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com