This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [Patch] [MIPS] Add support for the R_MIPS_EH relocation
- From: Richard Sandiford <rdsandiford at googlemail dot com>
- To: "Moore\, Catherine" <Catherine_Moore at mentor dot com>
- Cc: "binutils\ at sourceware dot org" <binutils at sourceware dot org>
- Date: Sat, 04 May 2013 10:34:08 +0100
- Subject: Re: [Patch] [MIPS] Add support for the R_MIPS_EH relocation
- References: <FD3DCEAC5B03E9408544A1E416F11242F8FB4644 at NA-MBX-01 dot mgc dot mentorg dot com>
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