This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]