summaryrefslogtreecommitdiff
path: root/bfd/coff64-rs6000.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@bigpond.net.au>2002-08-06 03:18:25 +0000
committerAlan Modra <amodra@bigpond.net.au>2002-08-06 03:18:25 +0000
commit1da3429fe14377d64d4c150dc1d4dd3d2bc46923 (patch)
tree2178aab651d93b285fa25ccd02d9bfffd58c3d7e /bfd/coff64-rs6000.c
parent9b0e0b746e32b19fd2880e3826a77bc183df6362 (diff)
downloadgdb-1da3429fe14377d64d4c150dc1d4dd3d2bc46923.tar.gz
* 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.
Diffstat (limited to 'bfd/coff64-rs6000.c')
-rw-r--r--bfd/coff64-rs6000.c59
1 files changed, 29 insertions, 30 deletions
diff --git a/bfd/coff64-rs6000.c b/bfd/coff64-rs6000.c
index 6badb4d28a7..439b31f4018 100644
--- a/bfd/coff64-rs6000.c
+++ b/bfd/coff64-rs6000.c
@@ -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 */