Re: [Bug ld/1775] New: Invalid code in PLT section

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Re: [Bug ld/1775] New: Invalid code in PLT section

Alan Modra
On Tue, Nov 01, 2005 at 02:14:45PM -0000, wouter at grep dot be wrote:
> As discussed in Debian bug#327780 (http://bugs.debian.org/327780), binutils are
> currently broken on m68k. The culprit seems to be revision 1.74 of
> src/elf32-m68k.c, which adds ColdFire V4E PLT support but somehow breaks
> "regular" m68k PLT support in doing so.

A quick glance over the rev 1.74 patch shows up the following lack of
parentheses.

        * elf32-m68k.c (elf_m68k_finish_dynamic_symbol): Add required
        parentheses.

Index: bfd/elf32-m68k.c
===================================================================
RCS file: /cvs/src/src/bfd/elf32-m68k.c,v
retrieving revision 1.83
diff -u -p -r1.83 elf32-m68k.c
--- bfd/elf32-m68k.c 6 Oct 2005 19:21:14 -0000 1.83
+++ bfd/elf32-m68k.c 1 Nov 2005 22:52:20 -0000
@@ -1871,7 +1871,7 @@ elf_m68k_finish_dynamic_symbol (output_b
   + got_offset
   - (splt->output_section->vma
      + h->plt.offset
-     + CFV4E_FLAG (output_bfd) ? 8 : 2),
+     + (CFV4E_FLAG (output_bfd) ? 8 : 2)),
   splt->contents + h->plt.offset + plt_off1);
 
       bfd_put_32 (output_bfd, plt_index * sizeof (Elf32_External_Rela),
@@ -1884,7 +1884,7 @@ elf_m68k_finish_dynamic_symbol (output_b
   (splt->output_section->vma
    + splt->output_offset
    + h->plt.offset
-   + CFV4E_FLAG (output_bfd) ? 12 : 8),
+   + (CFV4E_FLAG (output_bfd) ? 12 : 8)),
   sgot->contents + got_offset);
 
       /* Fill in the entry in the .rela.plt section.  */

--
Alan Modra
IBM OzLabs - Linux Technology Centre