* reloc.c: Add BFD_RELOC_RX_OP_NEG.
authorDJ Delorie <dj@redhat.com>
Wed, 5 Jan 2011 22:04:09 +0000 (22:04 +0000)
committerDJ Delorie <dj@redhat.com>
Wed, 5 Jan 2011 22:04:09 +0000 (22:04 +0000)
* 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.

bfd/ChangeLog
bfd/bfd-in2.h
bfd/elf32-rx.c
bfd/libbfd.h
bfd/reloc.c
gas/ChangeLog
gas/config/tc-rx.c

index 0369051..eb99588 100644 (file)
@@ -1,3 +1,10 @@
+2011-01-05  DJ Delorie  <dj@redhat.com>
+
+       * 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.
+
 2011-01-03  H.J. Lu  <hongjiu.lu@intel.com>
 
        * cpu-i386.c (bfd_i386_compatible): New.
index e75eb0d..8531f8d 100644 (file)
@@ -3991,6 +3991,7 @@ instructions  */
   BFD_RELOC_RX_GPRELL,
   BFD_RELOC_RX_SYM,
   BFD_RELOC_RX_OP_SUBTRACT,
+  BFD_RELOC_RX_OP_NEG,
   BFD_RELOC_RX_ABS8,
   BFD_RELOC_RX_ABS16,
   BFD_RELOC_RX_ABS16_REV,
index ac587ef..7855d5e 100644 (file)
@@ -248,6 +248,7 @@ static const struct rx_reloc_map rx_reloc_map [] =
   { BFD_RELOC_RX_RELAX,                R_RX_RH_RELAX },
   { BFD_RELOC_RX_SYM,          R_RX_SYM },
   { BFD_RELOC_RX_OP_SUBTRACT,  R_RX_OPsub },
+  { BFD_RELOC_RX_OP_NEG,       R_RX_OPneg },
   { BFD_RELOC_RX_ABS8,         R_RX_ABS8 },
   { BFD_RELOC_RX_ABS16,                R_RX_ABS16 },
   { BFD_RELOC_RX_ABS16_REV,    R_RX_ABS16_REV },
index 5687082..1cf63ce 100644 (file)
@@ -1800,6 +1800,7 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@",
   "BFD_RELOC_RX_GPRELL",
   "BFD_RELOC_RX_SYM",
   "BFD_RELOC_RX_OP_SUBTRACT",
+  "BFD_RELOC_RX_OP_NEG",
   "BFD_RELOC_RX_ABS8",
   "BFD_RELOC_RX_ABS16",
   "BFD_RELOC_RX_ABS16_REV",
index 6d4eb85..30919f2 100644 (file)
@@ -4258,6 +4258,8 @@ ENUMX
 ENUMX
   BFD_RELOC_RX_OP_SUBTRACT
 ENUMX
+  BFD_RELOC_RX_OP_NEG
+ENUMX
   BFD_RELOC_RX_ABS8
 ENUMX
   BFD_RELOC_RX_ABS16
index 0097e8f..257c830 100644 (file)
@@ -1,3 +1,8 @@
+2011-01-05  DJ Delorie  <dj@redhat.com>
+
+       * config/tc-rx.c (tc_gen_reloc): Emit an RX_OP_NEG expression
+       instead of an RH_NEG32 one.
+
 2011-01-05  Jonathan Wakely  <jwakely.gcc@gmail.com>
 
        * doc/c-i386.texi: Clarify --n32.
index aa58286..d198050 100644 (file)
@@ -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;