[Patch] [MIPS] Add support for the R_MIPS_EH relocation
Moore, Catherine
Catherine_Moore@mentor.com
Mon May 6 21:59:00 GMT 2013
Updated patch attached. OK?
> -----Original Message-----
> From: Richard Sandiford [mailto:rdsandiford@googlemail.com]
> Sent: Saturday, May 04, 2013 5:34 AM
> To: Moore, Catherine
> Cc: binutils@sourceware.org
> Subject: Re: [Patch] [MIPS] Add support for the R_MIPS_EH relocation
>
> Looks good, but:
>
> "Moore, Catherine" <Catherine_Moore@mentor.com> writes:
> > Index: bfd/elf32-mips.c
> >
> ==========================================================
> =========
> > RCS file: /cvs/src/src/bfd/elf32-mips.c,v retrieving revision 1.215
> > diff -p -u -r1.215 elf32-mips.c
> > --- bfd/elf32-mips.c 21 Feb 2013 03:02:29 -0000 1.215
> > +++ bfd/elf32-mips.c 2 May 2013 20:00:53 -0000
> > @@ -1538,6 +1538,22 @@ static reloc_howto_type elf_mips_jump_sl
> > 0x0, /* dst_mask */
> > FALSE); /* pcrel_offset */
> >
> > +/* Used in EH tables. */
> > +static reloc_howto_type elf_mips_eh_howto =
> > + HOWTO (R_MIPS_EH, /* type */
> > + 0, /* rightshift */
> > + 2, /* size (0 = byte, 1 = short, 2 = long) */
> > + 32, /* bitsize */
> > + FALSE, /* pc_relative */
> > + 0, /* bitpos */
> > + complain_overflow_signed, /* complain_on_overflow */
> > + bfd_elf_generic_reloc, /* special_function */
>
> Please use _bfd_mips_elf_generic_reloc instead. Same for n32 and 64.
>
> > @@ -17813,6 +17814,9 @@ mips_fix_adjustable (fixS *fixp)
> > && (fixp->fx_pcrel || jalr_reloc_p (fixp->fx_r_type)))
> > return 0;
> >
> > + if (fixp->fx_r_type == BFD_RELOC_MIPS_EH)
> > + return 0;
> > +
>
> Please add a comment saying why EH relocs can't be made section-relative.
>
> Richard
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mips-eh-reloc.cl
Type: application/octet-stream
Size: 711 bytes
Desc: mips-eh-reloc.cl
URL: <https://sourceware.org/pipermail/binutils/attachments/20130506/66224faa/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mips-eh-reloc.patch2
Type: application/octet-stream
Size: 9863 bytes
Desc: mips-eh-reloc.patch2
URL: <https://sourceware.org/pipermail/binutils/attachments/20130506/66224faa/attachment-0001.obj>
More information about the Binutils
mailing list