Previously, some pseudoinstructions like "call" only accepted
symbolic addresses and rejected constant addresses with an
esoteric internal error. This patch enables them by deferring
application of constant relocations to md_apply_fix, rather than
eagerly applying them during instruction assembly.
gas/ChangeLog
2017-01-09 Andrew Waterman <andrew@sifive.com>
* config/tc-riscv.c (append_insn): Don't eagerly apply relocations
against constants.
(md_apply_fix): Mark relocations against constants as "done."
against constants.
(md_apply_fix): Mark relocations against constants as "done."
+2017-01-09 Andrew Waterman <andrew@sifive.com>
+
+ * config/tc-riscv.c (append_insn): Don't eagerly apply relocations
+ against constants.
+ (md_apply_fix): Mark relocations against constants as "done."
+
2017-01-09 Palmer Dabbelt <palmer@dabbelt.com>
Kito Cheng <kito.cheng@gmail.com>
address_expr->X_add_number);
return;
}
- else if (address_expr->X_op == O_constant)
- ip->insn_opcode |= riscv_apply_const_reloc (reloc_type,
- address_expr->X_add_number);
else
{
howto = bfd_reloc_type_lookup (stdoutput, reloc_type);
case BFD_RELOC_RISCV_LO12_S:
bfd_putl32 (riscv_apply_const_reloc (fixP->fx_r_type, *valP)
| bfd_getl32 (buf), buf);
+ if (fixP->fx_addsy == NULL)
+ fixP->fx_done = TRUE;
relaxable = TRUE;
break;