relocs with bitsize == 16 have size = 1.
(xcoff_reloc_type_ba): Correct src_mask and dst_mask adjustment.
(xcoff_reloc_type_br): Likewise.
(xcoff_reloc_type_crel): Likewise.
(xcoff_ppc_relocate_section): Set up src_mask and dst_mask correctly.
* coff64-rs6000.c (xcoff64_reloc_type_br): Correct src_mask and
dst_mask adjustment.
(xcoff64_ppc_relocate_section): Set up src_mask and dst_mask correctly.
(xcoff64_howto_table): Fix src_mask entries. Make all relocs with
bitsize == 16 have size = 1.
+2002-08-06 Alan Modra <amodra@bigpond.net.au>
+
+ * 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.
+ (xcoff_reloc_type_br): Likewise.
+ (xcoff_reloc_type_crel): Likewise.
+ (xcoff_ppc_relocate_section): Set up src_mask and dst_mask correctly.
+ * coff64-rs6000.c (xcoff64_reloc_type_br): Correct src_mask and
+ dst_mask adjustment.
+ (xcoff64_ppc_relocate_section): Set up src_mask and dst_mask correctly.
+ (xcoff64_howto_table): Fix src_mask entries. Make all relocs with
+ bitsize == 16 have size = 1.
+
2002-08-01 Denis Chertykov <denisc@overta.ru>
* elf32-ip2k.c: Processor manufacturer changed to Ubicom.
0, /* special_function */
"R_POS", /* name */
true, /* partial_inplace */
- 0xffffffff, /* src_mask */
+ 0, /* src_mask */
0xffffffff, /* dst_mask */
false), /* pcrel_offset */
0, /* special_function */
"R_NEG", /* name */
true, /* partial_inplace */
- 0xffffffff, /* src_mask */
+ 0, /* src_mask */
0xffffffff, /* dst_mask */
false), /* pcrel_offset */
0, /* special_function */
"R_REL", /* name */
true, /* partial_inplace */
- 0xffffffff, /* src_mask */
+ 0, /* src_mask */
0xffffffff, /* dst_mask */
false), /* pcrel_offset */
0, /* special_function */
"R_TOC", /* name */
true, /* partial_inplace */
- 0xffff, /* src_mask */
+ 0, /* src_mask */
0xffff, /* dst_mask */
false), /* pcrel_offset */
0, /* special_function */
"R_RTB", /* name */
true, /* partial_inplace */
- 0xffffffff, /* src_mask */
+ 0, /* src_mask */
0xffffffff, /* dst_mask */
false), /* pcrel_offset */
/* External TOC relative symbol. */
HOWTO (R_GL, /* type */
0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
16, /* bitsize */
false, /* pc_relative */
0, /* bitpos */
0, /* special_function */
"R_GL", /* name */
true, /* partial_inplace */
- 0xffff, /* src_mask */
+ 0, /* src_mask */
0xffff, /* dst_mask */
false), /* pcrel_offset */
/* Local TOC relative symbol. */
HOWTO (R_TCL, /* type */
0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
16, /* bitsize */
false, /* pc_relative */
0, /* bitpos */
0, /* special_function */
"R_TCL", /* name */
true, /* partial_inplace */
- 0xffff, /* src_mask */
+ 0, /* src_mask */
0xffff, /* dst_mask */
false), /* pcrel_offset */
0, /* special_function */
"R_BA_26", /* name */
true, /* partial_inplace */
- 0x3fffffc, /* src_mask */
- 0x3fffffc, /* dst_mask */
+ 0xfc000003, /* src_mask */
+ 0x03fffffc, /* dst_mask */
false), /* pcrel_offset */
EMPTY_HOWTO (9),
0, /* special_function */
"R_BR", /* name */
true, /* partial_inplace */
- 0x3fffffc, /* src_mask */
- 0x3fffffc, /* dst_mask */
+ 0xfc000003, /* src_mask */
+ 0x03fffffc, /* dst_mask */
false), /* pcrel_offset */
EMPTY_HOWTO (0xb),
/* Indirect load. */
HOWTO (R_RL, /* type */
0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
16, /* bitsize */
false, /* pc_relative */
0, /* bitpos */
0, /* special_function */
"R_RL", /* name */
true, /* partial_inplace */
- 0xffff, /* src_mask */
+ 0, /* src_mask */
0xffff, /* dst_mask */
false), /* pcrel_offset */
/* Load address. */
HOWTO (R_RLA, /* type */
0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
16, /* bitsize */
false, /* pc_relative */
0, /* bitpos */
0, /* special_function */
"R_RLA", /* name */
true, /* partial_inplace */
- 0xffff, /* src_mask */
+ 0, /* src_mask */
0xffff, /* dst_mask */
false), /* pcrel_offset */
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 */
/* TOC relative indirect load. */
HOWTO (R_TRL, /* type */
0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
16, /* bitsize */
false, /* pc_relative */
0, /* bitpos */
0, /* special_function */
"R_TRL", /* name */
true, /* partial_inplace */
- 0xffff, /* src_mask */
+ 0, /* src_mask */
0xffff, /* dst_mask */
false), /* pcrel_offset */
/* TOC relative load address. */
HOWTO (R_TRLA, /* type */
0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
16, /* bitsize */
false, /* pc_relative */
0, /* bitpos */
0, /* special_function */
"R_TRLA", /* name */
true, /* partial_inplace */
- 0xffff, /* src_mask */
+ 0, /* src_mask */
0xffff, /* dst_mask */
false), /* pcrel_offset */
0, /* special_function */
"R_RRTBI", /* name */
true, /* partial_inplace */
- 0xffffffff, /* src_mask */
+ 0, /* src_mask */
0xffffffff, /* dst_mask */
false), /* pcrel_offset */
0, /* special_function */
"R_RRTBA", /* name */
true, /* partial_inplace */
- 0xffffffff, /* src_mask */
+ 0, /* src_mask */
0xffffffff, /* dst_mask */
false), /* pcrel_offset */
/* Modifiable call absolute indirect. */
HOWTO (R_CAI, /* type */
0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
16, /* bitsize */
false, /* pc_relative */
0, /* bitpos */
0, /* special_function */
"R_CAI", /* name */
true, /* partial_inplace */
- 0xffff, /* src_mask */
+ 0, /* src_mask */
0xffff, /* dst_mask */
false), /* pcrel_offset */
/* Modifiable call relative. */
HOWTO (R_CREL, /* type */
0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
16, /* bitsize */
false, /* pc_relative */
0, /* bitpos */
0, /* special_function */
"R_CREL", /* name */
true, /* partial_inplace */
- 0xffff, /* src_mask */
+ 0, /* src_mask */
0xffff, /* dst_mask */
false), /* pcrel_offset */
0, /* special_function */
"R_RBA", /* name */
true, /* partial_inplace */
- 0xffff, /* src_mask */
- 0xffff, /* dst_mask */
+ 0xfc000003, /* src_mask */
+ 0x03fffffc, /* dst_mask */
false), /* pcrel_offset */
/* Modifiable branch absolute. */
0, /* special_function */
"R_RBAC", /* name */
true, /* partial_inplace */
- 0xffff, /* src_mask */
- 0xffff, /* dst_mask */
+ 0, /* src_mask */
+ 0xffffffff, /* dst_mask */
false), /* pcrel_offset */
/* Modifiable branch relative. */
0, /* special_function */
"R_RBR_26", /* name */
true, /* partial_inplace */
- 0xffff, /* src_mask */
- 0xffff, /* dst_mask */
+ 0xfc000003, /* src_mask */
+ 0x03fffffc, /* dst_mask */
false), /* pcrel_offset */
/* Modifiable branch absolute. */
HOWTO (R_RBRC, /* type */
0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
16, /* bitsize */
false, /* pc_relative */
0, /* bitpos */
0, /* special_function */
"R_RBRC", /* name */
true, /* partial_inplace */
- 0xffff, /* src_mask */
+ 0, /* src_mask */
0xffff, /* dst_mask */
false), /* pcrel_offset */
0, /* special_function */
"R_BA_16", /* name */
true, /* partial_inplace */
- 0xfffc, /* src_mask */
+ 0x0003, /* src_mask */
0xfffc, /* dst_mask */
false), /* pcrel_offset */
0, /* special_function */
"R_RBR_16", /* name */
true, /* partial_inplace */
- 0xffff, /* src_mask */
+ 0, /* src_mask */
0xffff, /* dst_mask */
false), /* pcrel_offset */
0, /* special_function */
"R_RBA_16", /* name */
true, /* partial_inplace */
- 0xffff, /* src_mask */
+ 0, /* src_mask */
0xffff, /* dst_mask */
false), /* pcrel_offset */
bfd_vma *relocation;
bfd_byte *contents ATTRIBUTE_UNUSED;
{
- howto->src_mask &= ~3;
- howto->dst_mask = howto->src_mask;
+ howto->src_mask |= 3;
+ howto->dst_mask &= ~3;
*relocation = val + addend;
}
howto->pc_relative = true;
- howto->src_mask &= ~3;
- howto->dst_mask = howto->src_mask;
+ howto->src_mask |= 3;
+ howto->dst_mask &= ~3;
/* A PC relative reloc includes the section address. */
addend += input_section->vma;
bfd_byte *contents ATTRIBUTE_UNUSED;
{
howto->pc_relative = true;
- howto->src_mask &= ~3;
- howto->dst_mask = howto->src_mask;
+ howto->src_mask |= 3;
+ howto->dst_mask &= ~3;
/* A PC relative reloc includes the section address. */
addend += input_section->vma;
howto.special_function = NULL;
howto.name = "internal";
howto.partial_inplace = true;
- howto.src_mask = howto.dst_mask = N_ONES(howto.bitsize);
+ howto.dst_mask = N_ONES (howto.bitsize);
+ howto.src_mask = ~howto.dst_mask & N_ONES (8 << howto.size);
howto.pcrel_offset = false;
/* symbol */
}
howto->pc_relative = true;
- howto->src_mask &= ~3;
- howto->dst_mask = howto->src_mask;
+ howto->src_mask |= 3;
+ howto->dst_mask &= ~3;
/* A PC relative reloc includes the section address. */
addend += input_section->vma;
howto.special_function = NULL;
howto.name = "internal";
howto.partial_inplace = true;
- howto.src_mask = howto.dst_mask = N_ONES(howto.bitsize);
+ howto.dst_mask = N_ONES (howto.bitsize);
+ howto.src_mask = ~howto.dst_mask & N_ONES (8 << howto.size);
howto.pcrel_offset = false;
/* symbol */
0, /* special_function */
"R_POS_64", /* name */
true, /* partial_inplace */
- MINUS_ONE, /* src_mask */
+ 0, /* src_mask */
MINUS_ONE, /* dst_mask */
false), /* pcrel_offset */
0, /* special_function */
"R_NEG", /* name */
true, /* partial_inplace */
- MINUS_ONE, /* src_mask */
+ 0, /* src_mask */
MINUS_ONE, /* dst_mask */
false), /* pcrel_offset */
0, /* special_function */
"R_REL", /* name */
true, /* partial_inplace */
- 0xffffffff, /* src_mask */
+ 0, /* src_mask */
0xffffffff, /* dst_mask */
false), /* pcrel_offset */
0, /* special_function */
"R_TOC", /* name */
true, /* partial_inplace */
- 0xffff, /* src_mask */
+ 0, /* src_mask */
0xffff, /* dst_mask */
false), /* pcrel_offset */
0, /* special_function */
"R_RTB", /* name */
true, /* partial_inplace */
- 0xffffffff, /* src_mask */
+ 0, /* src_mask */
0xffffffff, /* dst_mask */
false), /* pcrel_offset */
/* External TOC relative symbol. */
HOWTO (R_GL, /* type */
0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
16, /* bitsize */
false, /* pc_relative */
0, /* bitpos */
0, /* special_function */
"R_GL", /* name */
true, /* partial_inplace */
- 0xffff, /* src_mask */
+ 0, /* src_mask */
0xffff, /* dst_mask */
false), /* pcrel_offset */
/* Local TOC relative symbol. */
HOWTO (R_TCL, /* type */
0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
16, /* bitsize */
false, /* pc_relative */
0, /* bitpos */
0, /* special_function */
"R_TCL", /* name */
true, /* partial_inplace */
- 0xffff, /* src_mask */
+ 0, /* src_mask */
0xffff, /* dst_mask */
false), /* pcrel_offset */
0, /* special_function */
"R_BA_26", /* name */
true, /* partial_inplace */
- 0x3fffffc, /* src_mask */
- 0x3fffffc, /* dst_mask */
+ 0xfc000003, /* src_mask */
+ 0x03fffffc, /* dst_mask */
false), /* pcrel_offset */
EMPTY_HOWTO (9),
0, /* special_function */
"R_BR", /* name */
true, /* partial_inplace */
- 0x3fffffc, /* src_mask */
- 0x3fffffc, /* dst_mask */
+ 0xfc000003, /* src_mask */
+ 0x03fffffc, /* dst_mask */
false), /* pcrel_offset */
EMPTY_HOWTO (0xb),
/* Indirect load. */
HOWTO (R_RL, /* type */
0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
16, /* bitsize */
false, /* pc_relative */
0, /* bitpos */
0, /* special_function */
"R_RL", /* name */
true, /* partial_inplace */
- 0xffff, /* src_mask */
+ 0, /* src_mask */
0xffff, /* dst_mask */
false), /* pcrel_offset */
/* Load address. */
HOWTO (R_RLA, /* type */
0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
16, /* bitsize */
false, /* pc_relative */
0, /* bitpos */
0, /* special_function */
"R_RLA", /* name */
true, /* partial_inplace */
- 0xffff, /* src_mask */
+ 0, /* src_mask */
0xffff, /* dst_mask */
false), /* pcrel_offset */
/* TOC relative indirect load. */
HOWTO (R_TRL, /* type */
0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
16, /* bitsize */
false, /* pc_relative */
0, /* bitpos */
0, /* special_function */
"R_TRL", /* name */
true, /* partial_inplace */
- 0xffff, /* src_mask */
+ 0, /* src_mask */
0xffff, /* dst_mask */
false), /* pcrel_offset */
/* TOC relative load address. */
HOWTO (R_TRLA, /* type */
0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
16, /* bitsize */
false, /* pc_relative */
0, /* bitpos */
0, /* special_function */
"R_TRLA", /* name */
true, /* partial_inplace */
- 0xffff, /* src_mask */
+ 0, /* src_mask */
0xffff, /* dst_mask */
false), /* pcrel_offset */
0, /* special_function */
"R_RRTBI", /* name */
true, /* partial_inplace */
- 0xffffffff, /* src_mask */
+ 0, /* src_mask */
0xffffffff, /* dst_mask */
false), /* pcrel_offset */
0, /* special_function */
"R_RRTBA", /* name */
true, /* partial_inplace */
- 0xffffffff, /* src_mask */
+ 0, /* src_mask */
0xffffffff, /* dst_mask */
false), /* pcrel_offset */
/* Modifiable call absolute indirect. */
HOWTO (R_CAI, /* type */
0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
16, /* bitsize */
false, /* pc_relative */
0, /* bitpos */
0, /* special_function */
"R_CAI", /* name */
true, /* partial_inplace */
- 0xffff, /* src_mask */
+ 0, /* src_mask */
0xffff, /* dst_mask */
false), /* pcrel_offset */
/* Modifiable call relative. */
HOWTO (R_CREL, /* type */
0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
16, /* bitsize */
false, /* pc_relative */
0, /* bitpos */
0, /* special_function */
"R_CREL", /* name */
true, /* partial_inplace */
- 0xffff, /* src_mask */
+ 0, /* src_mask */
0xffff, /* dst_mask */
false), /* pcrel_offset */
0, /* special_function */
"R_RBA", /* name */
true, /* partial_inplace */
- 0xffff, /* src_mask */
- 0xffff, /* dst_mask */
+ 0xfc000003, /* src_mask */
+ 0x03fffffc, /* dst_mask */
false), /* pcrel_offset */
/* Modifiable branch absolute. */
0, /* special_function */
"R_RBAC", /* name */
true, /* partial_inplace */
- 0xffff, /* src_mask */
- 0xffff, /* dst_mask */
+ 0, /* src_mask */
+ 0xffffffff, /* dst_mask */
false), /* pcrel_offset */
/* Modifiable branch relative. */
0, /* special_function */
"R_RBR_26", /* name */
true, /* partial_inplace */
- 0xffff, /* src_mask */
- 0xffff, /* dst_mask */
+ 0xfc000003, /* src_mask */
+ 0x03fffffc, /* dst_mask */
false), /* pcrel_offset */
/* Modifiable branch absolute. */
HOWTO (R_RBRC, /* type */
0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
16, /* bitsize */
false, /* pc_relative */
0, /* bitpos */
0, /* special_function */
"R_RBRC", /* name */
true, /* partial_inplace */
- 0xffff, /* src_mask */
+ 0, /* src_mask */
0xffff, /* dst_mask */
false), /* pcrel_offset */
0, /* special_function */
"R_POS_32", /* name */
true, /* partial_inplace */
- 0xffffffff, /* src_mask */
+ 0, /* src_mask */
0xffffffff, /* dst_mask */
false), /* pcrel_offset */
0, /* special_function */
"R_BA_16", /* name */
true, /* partial_inplace */
- 0xfffc, /* src_mask */
+ 0x0003, /* src_mask */
0xfffc, /* dst_mask */
false), /* pcrel_offset */
0, /* special_function */
"R_RBR_16", /* name */
true, /* partial_inplace */
- 0xffff, /* src_mask */
+ 0, /* src_mask */
0xffff, /* dst_mask */
false), /* pcrel_offset */
0, /* special_function */
"R_RBA_16", /* name */
true, /* partial_inplace */
- 0xffff, /* src_mask */
+ 0, /* src_mask */
0xffff, /* dst_mask */
false), /* pcrel_offset */