* coff-rs6000.c (xcoff_howto_table): Revert some of last change to
authorAlan Modra <amodra@gmail.com>
Tue, 6 Aug 2002 03:18:25 +0000 (03:18 +0000)
committerAlan Modra <amodra@gmail.com>
Tue, 6 Aug 2002 03:18:25 +0000 (03:18 +0000)
mask entries.  Use complain_overflow_dont for R_REF.
(xcoff_reloc_type_ba): Revert last change.
(xcoff_reloc_type_br): Likewise.
(xcoff_reloc_type_crel): Likewise.
(xcoff_ppc_relocate_section): Likewise.
* coff64-rs6000.c (xcoff64_reloc_type_br): Likewise.
(xcoff64_ppc_relocate_section): Likewise.
(xcoff64_howto_table): Revert some of last change to mask entries.
Use complain_overflow_dont for R_REF.

bfd/ChangeLog
bfd/coff-rs6000.c
bfd/coff64-rs6000.c

index 5624683d7eeb6f3ad3b9da942824f9831e76d774..861df1d01f9bf367b9af62d4a4be8c33d8196f7f 100644 (file)
@@ -1,5 +1,16 @@
 2002-08-06  Alan Modra  <amodra@bigpond.net.au>
 
+       * coff-rs6000.c (xcoff_howto_table): Revert some of last change to
+       mask entries.  Use complain_overflow_dont for R_REF.
+       (xcoff_reloc_type_ba): Revert last change.
+       (xcoff_reloc_type_br): Likewise.
+       (xcoff_reloc_type_crel): Likewise.
+       (xcoff_ppc_relocate_section): Likewise.
+       * coff64-rs6000.c (xcoff64_reloc_type_br): Likewise.
+       (xcoff64_ppc_relocate_section): Likewise.
+       (xcoff64_howto_table): Revert some of last change to mask entries.
+       Use complain_overflow_dont for R_REF.
+
        * coff-rs6000.c (xcoff_howto_table): Fix src_mask entries.  Make all
        relocs with bitsize == 16 have size = 1.
        (xcoff_reloc_type_ba): Correct src_mask and dst_mask adjustment.
index 3e773239b150a97636e61d34f3d7a67dd81b29eb..b6851493efe56a590398485a6910e8dbc7fb2329 100644 (file)
@@ -588,7 +588,7 @@ reloc_howto_type xcoff_howto_table[] =
         0,                     /* special_function */
         "R_POS",               /* name */
         true,                  /* partial_inplace */
-        0,                     /* src_mask */
+        0xffffffff,            /* src_mask */
         0xffffffff,            /* dst_mask */
         false),                /* pcrel_offset */
 
@@ -603,7 +603,7 @@ reloc_howto_type xcoff_howto_table[] =
         0,                     /* special_function */
         "R_NEG",               /* name */
         true,                  /* partial_inplace */
-        0,                     /* src_mask */
+        0xffffffff,            /* src_mask */
         0xffffffff,            /* dst_mask */
         false),                /* pcrel_offset */
 
@@ -618,7 +618,7 @@ reloc_howto_type xcoff_howto_table[] =
         0,                     /* special_function */
         "R_REL",               /* name */
         true,                  /* partial_inplace */
-        0,                     /* src_mask */
+        0xffffffff,            /* src_mask */
         0xffffffff,            /* dst_mask */
         false),                /* pcrel_offset */
 
@@ -633,7 +633,7 @@ reloc_howto_type xcoff_howto_table[] =
         0,                     /* special_function */
         "R_TOC",               /* name */
         true,                  /* partial_inplace */
-        0,                     /* src_mask */
+        0xffff,                /* src_mask */
         0xffff,                /* dst_mask */
         false),                /* pcrel_offset */
 
@@ -648,7 +648,7 @@ reloc_howto_type xcoff_howto_table[] =
         0,                     /* special_function */
         "R_RTB",               /* name */
         true,                  /* partial_inplace */
-        0,                     /* src_mask */
+        0xffffffff,            /* src_mask */
         0xffffffff,            /* dst_mask */
         false),                /* pcrel_offset */
 
@@ -663,7 +663,7 @@ reloc_howto_type xcoff_howto_table[] =
         0,                     /* special_function */
         "R_GL",                /* name */
         true,                  /* partial_inplace */
-        0,                     /* src_mask */
+        0xffff,                /* src_mask */
         0xffff,                /* dst_mask */
         false),                /* pcrel_offset */
 
@@ -678,7 +678,7 @@ reloc_howto_type xcoff_howto_table[] =
         0,                     /* special_function */
         "R_TCL",               /* name */
         true,                  /* partial_inplace */
-        0,                     /* src_mask */
+        0xffff,                /* src_mask */
         0xffff,                /* dst_mask */
         false),                /* pcrel_offset */
 
@@ -695,7 +695,7 @@ reloc_howto_type xcoff_howto_table[] =
         0,                     /* special_function */
         "R_BA_26",             /* name */
         true,                  /* partial_inplace */
-        0xfc000003,            /* src_mask */
+        0x03fffffc,            /* src_mask */
         0x03fffffc,            /* dst_mask */
         false),                /* pcrel_offset */
 
@@ -712,7 +712,7 @@ reloc_howto_type xcoff_howto_table[] =
         0,                     /* special_function */
         "R_BR",                /* name */
         true,                  /* partial_inplace */
-        0xfc000003,            /* src_mask */
+        0x03fffffc,            /* src_mask */
         0x03fffffc,            /* dst_mask */
         false),                /* pcrel_offset */
 
@@ -729,7 +729,7 @@ reloc_howto_type xcoff_howto_table[] =
         0,                     /* special_function */
         "R_RL",                /* name */
         true,                  /* partial_inplace */
-        0,                     /* src_mask */
+        0xffff,                /* src_mask */
         0xffff,                /* dst_mask */
         false),                /* pcrel_offset */
 
@@ -744,7 +744,7 @@ reloc_howto_type xcoff_howto_table[] =
         0,                     /* special_function */
         "R_RLA",               /* name */
         true,                  /* partial_inplace */
-        0,                     /* src_mask */
+        0xffff,                /* src_mask */
         0xffff,                /* dst_mask */
         false),                /* pcrel_offset */
 
@@ -779,7 +779,7 @@ reloc_howto_type xcoff_howto_table[] =
         0,                     /* special_function */
         "R_TRL",               /* name */
         true,                  /* partial_inplace */
-        0,                     /* src_mask */
+        0xffff,                /* src_mask */
         0xffff,                /* dst_mask */
         false),                /* pcrel_offset */
 
@@ -794,7 +794,7 @@ reloc_howto_type xcoff_howto_table[] =
         0,                     /* special_function */
         "R_TRLA",              /* name */
         true,                  /* partial_inplace */
-        0,                     /* src_mask */
+        0xffff,                /* src_mask */
         0xffff,                /* dst_mask */
         false),                /* pcrel_offset */
 
@@ -809,7 +809,7 @@ reloc_howto_type xcoff_howto_table[] =
         0,                     /* special_function */
         "R_RRTBI",             /* name */
         true,                  /* partial_inplace */
-        0,                     /* src_mask */
+        0xffffffff,            /* src_mask */
         0xffffffff,            /* dst_mask */
         false),                /* pcrel_offset */
 
@@ -824,7 +824,7 @@ reloc_howto_type xcoff_howto_table[] =
         0,                     /* special_function */
         "R_RRTBA",             /* name */
         true,                  /* partial_inplace */
-        0,                     /* src_mask */
+        0xffffffff,            /* src_mask */
         0xffffffff,            /* dst_mask */
         false),                /* pcrel_offset */
 
@@ -839,7 +839,7 @@ reloc_howto_type xcoff_howto_table[] =
         0,                     /* special_function */
         "R_CAI",               /* name */
         true,                  /* partial_inplace */
-        0,                     /* src_mask */
+        0xffff,                /* src_mask */
         0xffff,                /* dst_mask */
         false),                /* pcrel_offset */
 
@@ -854,7 +854,7 @@ reloc_howto_type xcoff_howto_table[] =
         0,                     /* special_function */
         "R_CREL",              /* name */
         true,                  /* partial_inplace */
-        0,                     /* src_mask */
+        0xffff,                /* src_mask */
         0xffff,                /* dst_mask */
         false),                /* pcrel_offset */
 
@@ -869,7 +869,7 @@ reloc_howto_type xcoff_howto_table[] =
         0,                     /* special_function */
         "R_RBA",               /* name */
         true,                  /* partial_inplace */
-        0xfc000003,            /* src_mask */
+        0x03fffffc,            /* src_mask */
         0x03fffffc,            /* dst_mask */
         false),                /* pcrel_offset */
 
@@ -884,7 +884,7 @@ reloc_howto_type xcoff_howto_table[] =
         0,                     /* special_function */
         "R_RBAC",              /* name */
         true,                  /* partial_inplace */
-        0,                     /* src_mask */
+        0xffffffff,            /* src_mask */
         0xffffffff,            /* dst_mask */
         false),                /* pcrel_offset */
 
@@ -899,7 +899,7 @@ reloc_howto_type xcoff_howto_table[] =
         0,                     /* special_function */
         "R_RBR_26",            /* name */
         true,                  /* partial_inplace */
-        0xfc000003,            /* src_mask */
+        0x03fffffc,            /* src_mask */
         0x03fffffc,            /* dst_mask */
         false),                /* pcrel_offset */
 
@@ -914,7 +914,7 @@ reloc_howto_type xcoff_howto_table[] =
         0,                     /* special_function */
         "R_RBRC",              /* name */
         true,                  /* partial_inplace */
-        0,                     /* src_mask */
+        0xffff,                /* src_mask */
         0xffff,                /* dst_mask */
         false),                /* pcrel_offset */
 
@@ -929,7 +929,7 @@ reloc_howto_type xcoff_howto_table[] =
         0,                     /* special_function */
         "R_BA_16",             /* name */
         true,                  /* partial_inplace */
-        0x0003,                /* src_mask */
+        0xfffc,                /* src_mask */
         0xfffc,                /* dst_mask */
         false),                /* pcrel_offset */
 
@@ -944,7 +944,7 @@ reloc_howto_type xcoff_howto_table[] =
         0,                     /* special_function */
         "R_RBR_16",            /* name */
         true,                  /* partial_inplace */
-        0,                     /* src_mask */
+        0xffff,                /* src_mask */
         0xffff,                /* dst_mask */
         false),                /* pcrel_offset */
 
@@ -959,7 +959,7 @@ reloc_howto_type xcoff_howto_table[] =
         0,                     /* special_function */
         "R_RBA_16",            /* name */
         true,                  /* partial_inplace */
-        0,                     /* src_mask */
+        0xffff,                /* src_mask */
         0xffff,                /* dst_mask */
         false),                /* pcrel_offset */
 
@@ -2885,8 +2885,8 @@ xcoff_reloc_type_ba (input_bfd, input_section, output_bfd, rel, sym, howto,
      bfd_vma *relocation;
      bfd_byte *contents ATTRIBUTE_UNUSED;
 {
-  howto->src_mask |= 3;
-  howto->dst_mask &= ~3;
+  howto->src_mask &= ~3;
+  howto->dst_mask = howto->src_mask;
 
   *relocation = val + addend;
 
@@ -2960,8 +2960,8 @@ xcoff_reloc_type_br (input_bfd, input_section, output_bfd, rel, sym, howto,
     }
   
   howto->pc_relative = true;
-  howto->src_mask |= 3;
-  howto->dst_mask &= ~3;
+  howto->src_mask &= ~3;
+  howto->dst_mask = howto->src_mask;
 
   /* A PC relative reloc includes the section address.  */
   addend += input_section->vma;
@@ -2987,8 +2987,8 @@ xcoff_reloc_type_crel (input_bfd, input_section, output_bfd, rel, sym, howto,
      bfd_byte *contents ATTRIBUTE_UNUSED;
 {
   howto->pc_relative = true;
-  howto->src_mask |= 3;
-  howto->dst_mask &= ~3;
+  howto->src_mask &= ~3;
+  howto->dst_mask = howto->src_mask;
 
   /* A PC relative reloc includes the section address.  */
   addend += input_section->vma;
@@ -3348,8 +3348,7 @@ xcoff_ppc_relocate_section (output_bfd, info, input_bfd,
       howto.special_function = NULL;
       howto.name = "internal";
       howto.partial_inplace = true;
-      howto.dst_mask = N_ONES (howto.bitsize);
-      howto.src_mask = ~howto.dst_mask & N_ONES (8 << howto.size);
+      howto.src_mask = howto.dst_mask = N_ONES(howto.bitsize);
       howto.pcrel_offset = false;
 
       /* symbol */
index 6badb4d28a707f60e9add7dd7ce5330c88cf6516..439b31f4018dc60b6afa9599bce033d8d778e14c 100644 (file)
@@ -1132,8 +1132,8 @@ xcoff64_reloc_type_br (input_bfd, input_section, output_bfd, rel, sym, howto,
     }
   
   howto->pc_relative = true;
-  howto->src_mask |= 3;
-  howto->dst_mask &= ~3;
+  howto->src_mask &= ~3;
+  howto->dst_mask = howto->src_mask;
   
   /* A PC relative reloc includes the section address.  */
   addend += input_section->vma;
@@ -1196,8 +1196,7 @@ xcoff64_ppc_relocate_section (output_bfd, info, input_bfd,
       howto.special_function = NULL;
       howto.name = "internal";
       howto.partial_inplace = true;
-      howto.dst_mask = N_ONES (howto.bitsize);
-      howto.src_mask = ~howto.dst_mask & N_ONES (8 << howto.size);
+      howto.src_mask = howto.dst_mask = N_ONES(howto.bitsize);
       howto.pcrel_offset = false;
 
       /* symbol */
@@ -1358,7 +1357,7 @@ reloc_howto_type xcoff64_howto_table[] =
         0,                     /* special_function */
         "R_POS_64",            /* name */
         true,                  /* partial_inplace */
-        0,                     /* src_mask */
+        MINUS_ONE,             /* src_mask */
         MINUS_ONE,             /* dst_mask */
         false),                /* pcrel_offset */
 
@@ -1373,7 +1372,7 @@ reloc_howto_type xcoff64_howto_table[] =
         0,                     /* special_function */
         "R_NEG",               /* name */
         true,                  /* partial_inplace */
-        0,                     /* src_mask */
+        MINUS_ONE,             /* src_mask */
         MINUS_ONE,             /* dst_mask */
         false),                /* pcrel_offset */
 
@@ -1388,7 +1387,7 @@ reloc_howto_type xcoff64_howto_table[] =
         0,                     /* special_function */
         "R_REL",               /* name */
         true,                  /* partial_inplace */
-        0,                     /* src_mask */
+        0xffffffff,            /* src_mask */
         0xffffffff,            /* dst_mask */
         false),                /* pcrel_offset */
 
@@ -1403,7 +1402,7 @@ reloc_howto_type xcoff64_howto_table[] =
         0,                     /* special_function */
         "R_TOC",               /* name */
         true,                  /* partial_inplace */
-        0,                     /* src_mask */
+        0xffff,                /* src_mask */
         0xffff,                /* dst_mask */
         false),                /* pcrel_offset */
 
@@ -1418,7 +1417,7 @@ reloc_howto_type xcoff64_howto_table[] =
         0,                     /* special_function */
         "R_RTB",               /* name */
         true,                  /* partial_inplace */
-        0,                     /* src_mask */
+        0xffffffff,            /* src_mask */
         0xffffffff,            /* dst_mask */
         false),                /* pcrel_offset */
 
@@ -1433,7 +1432,7 @@ reloc_howto_type xcoff64_howto_table[] =
         0,                     /* special_function */
         "R_GL",                /* name */
         true,                  /* partial_inplace */
-        0,                     /* src_mask */
+        0xffff,                /* src_mask */
         0xffff,                /* dst_mask */
         false),                /* pcrel_offset */
 
@@ -1448,7 +1447,7 @@ reloc_howto_type xcoff64_howto_table[] =
         0,                     /* special_function */
         "R_TCL",               /* name */
         true,                  /* partial_inplace */
-        0,                     /* src_mask */
+        0xffff,                /* src_mask */
         0xffff,                /* dst_mask */
         false),                /* pcrel_offset */
 
@@ -1465,7 +1464,7 @@ reloc_howto_type xcoff64_howto_table[] =
         0,                     /* special_function */
         "R_BA_26",             /* name */
         true,                  /* partial_inplace */
-        0xfc000003,            /* src_mask */
+        0x03fffffc,            /* src_mask */
         0x03fffffc,            /* dst_mask */
         false),                /* pcrel_offset */
 
@@ -1482,7 +1481,7 @@ reloc_howto_type xcoff64_howto_table[] =
         0,                     /* special_function */
         "R_BR",                /* name */
         true,                  /* partial_inplace */
-        0xfc000003,            /* src_mask */
+        0x03fffffc,            /* src_mask */
         0x03fffffc,            /* dst_mask */
         false),                /* pcrel_offset */
 
@@ -1499,7 +1498,7 @@ reloc_howto_type xcoff64_howto_table[] =
         0,                     /* special_function */
         "R_RL",                /* name */
         true,                  /* partial_inplace */
-        0,                     /* src_mask */
+        0xffff,                /* src_mask */
         0xffff,                /* dst_mask */
         false),                /* pcrel_offset */
 
@@ -1514,7 +1513,7 @@ reloc_howto_type xcoff64_howto_table[] =
         0,                     /* special_function */
         "R_RLA",               /* name */
         true,                  /* partial_inplace */
-        0,                     /* src_mask */
+        0xffff,                /* src_mask */
         0xffff,                /* dst_mask */
         false),                /* pcrel_offset */
 
@@ -1527,7 +1526,7 @@ reloc_howto_type xcoff64_howto_table[] =
         32,                    /* bitsize */
         false,                 /* pc_relative */
         0,                     /* bitpos */
-        complain_overflow_bitfield, /* complain_on_overflow */
+        complain_overflow_dont, /* complain_on_overflow */
         0,                     /* special_function */
         "R_REF",               /* name */
         false,                 /* partial_inplace */
@@ -1549,7 +1548,7 @@ reloc_howto_type xcoff64_howto_table[] =
         0,                     /* special_function */
         "R_TRL",               /* name */
         true,                  /* partial_inplace */
-        0,                     /* src_mask */
+        0xffff,                /* src_mask */
         0xffff,                /* dst_mask */
         false),                /* pcrel_offset */
 
@@ -1564,7 +1563,7 @@ reloc_howto_type xcoff64_howto_table[] =
         0,                     /* special_function */
         "R_TRLA",              /* name */
         true,                  /* partial_inplace */
-        0,                     /* src_mask */
+        0xffff,                /* src_mask */
         0xffff,                /* dst_mask */
         false),                /* pcrel_offset */
 
@@ -1579,7 +1578,7 @@ reloc_howto_type xcoff64_howto_table[] =
         0,                     /* special_function */
         "R_RRTBI",             /* name */
         true,                  /* partial_inplace */
-        0,                     /* src_mask */
+        0xffffffff,            /* src_mask */
         0xffffffff,            /* dst_mask */
         false),                /* pcrel_offset */
 
@@ -1594,7 +1593,7 @@ reloc_howto_type xcoff64_howto_table[] =
         0,                     /* special_function */
         "R_RRTBA",             /* name */
         true,                  /* partial_inplace */
-        0,                     /* src_mask */
+        0xffffffff,            /* src_mask */
         0xffffffff,            /* dst_mask */
         false),                /* pcrel_offset */
 
@@ -1609,7 +1608,7 @@ reloc_howto_type xcoff64_howto_table[] =
         0,                     /* special_function */
         "R_CAI",               /* name */
         true,                  /* partial_inplace */
-        0,                     /* src_mask */
+        0xffff,                /* src_mask */
         0xffff,                /* dst_mask */
         false),                /* pcrel_offset */
 
@@ -1624,7 +1623,7 @@ reloc_howto_type xcoff64_howto_table[] =
         0,                     /* special_function */
         "R_CREL",              /* name */
         true,                  /* partial_inplace */
-        0,                     /* src_mask */
+        0xffff,                /* src_mask */
         0xffff,                /* dst_mask */
         false),                /* pcrel_offset */
 
@@ -1639,7 +1638,7 @@ reloc_howto_type xcoff64_howto_table[] =
         0,                     /* special_function */
         "R_RBA",               /* name */
         true,                  /* partial_inplace */
-        0xfc000003,            /* src_mask */
+        0x03fffffc,            /* src_mask */
         0x03fffffc,            /* dst_mask */
         false),                /* pcrel_offset */
 
@@ -1654,7 +1653,7 @@ reloc_howto_type xcoff64_howto_table[] =
         0,                     /* special_function */
         "R_RBAC",              /* name */
         true,                  /* partial_inplace */
-        0,                     /* src_mask */
+        0xffffffff,            /* src_mask */
         0xffffffff,            /* dst_mask */
         false),                /* pcrel_offset */
 
@@ -1669,7 +1668,7 @@ reloc_howto_type xcoff64_howto_table[] =
         0,                     /* special_function */
         "R_RBR_26",            /* name */
         true,                  /* partial_inplace */
-        0xfc000003,            /* src_mask */
+        0x03fffffc,            /* src_mask */
         0x03fffffc,            /* dst_mask */
         false),                /* pcrel_offset */
 
@@ -1684,7 +1683,7 @@ reloc_howto_type xcoff64_howto_table[] =
         0,                     /* special_function */
         "R_RBRC",              /* name */
         true,                  /* partial_inplace */
-        0,                     /* src_mask */
+        0xffff,                /* src_mask */
         0xffff,                /* dst_mask */
         false),                /* pcrel_offset */
 
@@ -1698,7 +1697,7 @@ reloc_howto_type xcoff64_howto_table[] =
         0,                     /* special_function */
         "R_POS_32",            /* name */
         true,                  /* partial_inplace */
-        0,                     /* src_mask */
+        0xffffffff,            /* src_mask */
         0xffffffff,            /* dst_mask */
         false),                /* pcrel_offset */
 
@@ -1713,7 +1712,7 @@ reloc_howto_type xcoff64_howto_table[] =
         0,                     /* special_function */
         "R_BA_16",             /* name */
         true,                  /* partial_inplace */
-        0x0003,                /* src_mask */
+        0xfffc,                /* src_mask */
         0xfffc,                /* dst_mask */
         false),                /* pcrel_offset */
 
@@ -1728,7 +1727,7 @@ reloc_howto_type xcoff64_howto_table[] =
         0,                     /* special_function */
         "R_RBR_16",            /* name */
         true,                  /* partial_inplace */
-        0,                     /* src_mask */
+        0xffff,                /* src_mask */
         0xffff,                /* dst_mask */
         false),                /* pcrel_offset */
 
@@ -1743,7 +1742,7 @@ reloc_howto_type xcoff64_howto_table[] =
         0,                     /* special_function */
         "R_RBA_16",            /* name */
         true,                  /* partial_inplace */
-        0,                     /* src_mask */
+        0xffff,                /* src_mask */
         0xffff,                /* dst_mask */
         false),                /* pcrel_offset */
 
This page took 0.056123 seconds and 4 git commands to generate.