From 9689e3a3a7895308b7b2eac3fa6e4d560cf4b8c7 Mon Sep 17 00:00:00 2001 From: DJ Delorie Date: Wed, 5 Jan 2011 22:04:09 +0000 Subject: * reloc.c: Add BFD_RELOC_RX_OP_NEG. * libbfd.h: Regenerate. * bfd-in2.h: Regenerate. * elf32-rx.c: Add it to the list, corresponding to R_RX_OPneg. * config/tc-rx.c (tc_gen_reloc): Emit an RX_OP_NEG expression instead of an RH_NEG32 one. --- gas/ChangeLog | 5 +++++ gas/config/tc-rx.c | 18 ++++++++++++++++++ 2 files changed, 23 insertions(+) (limited to 'gas') diff --git a/gas/ChangeLog b/gas/ChangeLog index 0097e8f..257c830 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,8 @@ +2011-01-05 DJ Delorie + + * config/tc-rx.c (tc_gen_reloc): Emit an RX_OP_NEG expression + instead of an RH_NEG32 one. + 2011-01-05 Jonathan Wakely * doc/c-i386.texi: Clarify --n32. diff --git a/gas/config/tc-rx.c b/gas/config/tc-rx.c index aa58286..d198050 100644 --- a/gas/config/tc-rx.c +++ b/gas/config/tc-rx.c @@ -2405,6 +2405,24 @@ tc_gen_reloc (asection * seg ATTRIBUTE_UNUSED, fixS * fixp) reloc[4] = NULL; break; + case BFD_RELOC_RX_NEG32: + reloc[0]->howto = bfd_reloc_type_lookup (stdoutput, BFD_RELOC_RX_SYM); + + reloc[1] = (arelent *) xmalloc (sizeof (arelent)); + reloc[1]->howto = bfd_reloc_type_lookup (stdoutput, BFD_RELOC_RX_OP_NEG); + reloc[1]->addend = 0; + reloc[1]->sym_ptr_ptr = reloc[0]->sym_ptr_ptr; + reloc[1]->address = fixp->fx_frag->fr_address + fixp->fx_where; + + reloc[2] = (arelent *) xmalloc (sizeof (arelent)); + reloc[2]->howto = bfd_reloc_type_lookup (stdoutput, BFD_RELOC_RX_ABS32); + reloc[2]->addend = 0; + reloc[2]->sym_ptr_ptr = reloc[0]->sym_ptr_ptr; + reloc[2]->address = fixp->fx_frag->fr_address + fixp->fx_where; + + reloc[3] = NULL; + break; + default: reloc[0]->howto = bfd_reloc_type_lookup (stdoutput, fixp->fx_r_type); reloc[1] = NULL; -- cgit v1.1