This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]