This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: [patch] MIPS: Use BFD_RELOC_UNUSED when no relocation
- From: Thiemo Seufer <ica2_ts at csv dot ica dot uni-stuttgart dot de>
- To: binutils at sources dot redhat dot com
- Date: Tue, 29 Jun 2004 13:27:14 +0200
- Subject: Re: [patch] MIPS: Use BFD_RELOC_UNUSED when no relocation
- References: <Pine.LNX.4.55.0406281736300.23162@jurand.ds.pg.gda.pl>
Maciej W. Rozycki wrote:
[snip]
> --- binutils-2.15.91-20040625.macro/gas/config/tc-mips.c 2004-06-15 03:25:28.000000000 +0000
> +++ binutils-2.15.91-20040625/gas/config/tc-mips.c 2004-06-27 11:09:41.000000000 +0000
> @@ -2079,7 +2079,7 @@ append_insn (struct mips_cl_insn *ip, ex
> }
>
> fixp[0] = fixp[1] = fixp[2] = NULL;
> - if (address_expr != NULL && *reloc_type < BFD_RELOC_UNUSED)
> + if (address_expr != NULL)
This may break the mips16 support, I'd use "<= BFD_RELOC_UNUSED".
> {
> if (address_expr->X_op == O_constant)
> {
> @@ -2112,6 +2112,7 @@ append_insn (struct mips_cl_insn *ip, ex
> ip->insn_opcode |= (address_expr->X_add_number >> 16) & 0xffff;
> break;
>
> + case BFD_RELOC_UNUSED:
> case BFD_RELOC_LO16:
> case BFD_RELOC_MIPS_GOT_DISP:
> ip->insn_opcode |= address_expr->X_add_number & 0xffff;
> @@ -2147,7 +2148,7 @@ append_insn (struct mips_cl_insn *ip, ex
> internalError ();
> }
> }
> - else
> + else if (*reloc_type < BFD_RELOC_UNUSED)
> need_reloc:
Same problem, AFAICS this shouldn't change.
Thiemo