This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Powerpc VLE fix
- From: Alan Modra <amodra at gmail dot com>
- To: binutils at sourceware dot org
- Cc: James Lemke <jwlemke at codesourcery dot com>
- Date: Mon, 29 Oct 2012 20:20:36 +1030
- Subject: Powerpc VLE fix
These all had one too many bits in the field. Documentation really,
since these howtos aren't used except if linking to non-vle output,
eg. SREC, and that will fail anyway using bfd_elf_generic_reloc.
Incidentally, the function that applies these relocs in normal output,
ppc_elf_vle_split16, is a little deficient in that it assumes the
relocated field starts off at zero.
* elf32-ppc.c (ppc_elf_howto_raw): Correct dst_mask in
R_PPC_VLE_LO16A, R_PPC_VLE_HI16A, R_PPC_VLE_HA16A,
R_PPC_VLE_SDAREL_LO16A, R_PPC_VLE_SDAREL_HI16A,
R_PPC_VLE_SDAREL_HA16A reloc howtos.
Index: bfd/elf32-ppc.c
===================================================================
RCS file: /cvs/src/src/bfd/elf32-ppc.c,v
retrieving revision 1.321
diff -u -p -r1.321 elf32-ppc.c
--- bfd/elf32-ppc.c 26 Oct 2012 03:40:36 -0000 1.321
+++ bfd/elf32-ppc.c 29 Oct 2012 09:33:48 -0000
@@ -1451,14 +1451,14 @@ static reloc_howto_type ppc_elf_howto_ra
0, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
32, /* bitsize */
- FALSE, /* pc_relative */ /* FIXME: Does this apply to split relocs? */
+ FALSE, /* pc_relative */
0, /* bitpos */
complain_overflow_bitfield, /* complain_on_overflow */
bfd_elf_generic_reloc, /* special_function */
"R_PPC_VLE_LO16A", /* name */
FALSE, /* partial_inplace */
0, /* src_mask */
- 0x1f00fff, /* dst_mask */
+ 0x1f007ff, /* dst_mask */
FALSE), /* pcrel_offset */
/* The 16 LSBS in split16d format. */
@@ -1488,7 +1488,7 @@ static reloc_howto_type ppc_elf_howto_ra
"R_PPC_VLE_HI16A", /* name */
FALSE, /* partial_inplace */
0, /* src_mask */
- 0x1f00fff, /* dst_mask */
+ 0x1f007ff, /* dst_mask */
FALSE), /* pcrel_offset */
/* Bits 16-31 split16d format. */
@@ -1518,7 +1518,7 @@ static reloc_howto_type ppc_elf_howto_ra
"R_PPC_VLE_HA16A", /* name */
FALSE, /* partial_inplace */
0, /* src_mask */
- 0x1f00fff, /* dst_mask */
+ 0x1f007ff, /* dst_mask */
FALSE), /* pcrel_offset */
/* Bits 16-31 (High Adjusted) in split16d format. */
@@ -1578,7 +1578,7 @@ static reloc_howto_type ppc_elf_howto_ra
"R_PPC_VLE_SDAREL_LO16A", /* name */
FALSE, /* partial_inplace */
0, /* src_mask */
- 0x1f00fff, /* dst_mask */
+ 0x1f007ff, /* dst_mask */
FALSE), /* pcrel_offset */
/* The 16 LSBS relative to _SDA_BASE_ in split16d format. */
@@ -1609,7 +1609,7 @@ static reloc_howto_type ppc_elf_howto_ra
"R_PPC_VLE_SDAREL_HI16A", /* name */
FALSE, /* partial_inplace */
0, /* src_mask */
- 0x1f00fff, /* dst_mask */
+ 0x1f007ff, /* dst_mask */
FALSE), /* pcrel_offset */
/* Bits 16-31 relative to _SDA_BASE_ in split16d format. */
@@ -1639,7 +1639,7 @@ static reloc_howto_type ppc_elf_howto_ra
"R_PPC_VLE_SDAREL_HA16A", /* name */
FALSE, /* partial_inplace */
0, /* src_mask */
- 0x1f00fff, /* dst_mask */
+ 0x1f007ff, /* dst_mask */
FALSE), /* pcrel_offset */
/* Bits 16-31 (HA) relative to _SDA_BASE split16d format. */
--
Alan Modra
Australia Development Lab, IBM