This is the mail archive of the 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]

[PATCH] Fix sparc .plt sh_entsize


During the sparc{32,64} backend merge the
problem resurfaced, here is a fix that I've committed.
VxWorks IMHO should use 0 too, since there .plt section isn't a multiple
of plt_entry_size either (that is 32 bytes, while the header is either 12 or
20 bytes long).  Only non-VxWorks sparc64 can have non-zero .plt sh_entsize.

2006-10-13  Jakub Jelinek  <>

	* elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_sections): Set
	.plt sh_entsize to 0 if plt header size isn't multiple of
	plt entry size or for 32-bit which adds a nop insn at the
	end of the .plt section.

--- bfd/elfxx-sparc.c.jj	2006-10-03 15:07:31.000000000 +0200
+++ bfd/elfxx-sparc.c	2006-10-13 23:00:58.000000000 +0200
@@ -4066,7 +4066,8 @@ _bfd_sparc_elf_finish_dynamic_sections (
       elf_section_data (splt->output_section)->this_hdr.sh_entsize
-	= htab->plt_entry_size;
+	= (htab->is_vxworks || !ABI_64_P (output_bfd))
+	  ? 0 : htab->plt_entry_size;
   /* Set the first entry in the global offset table to the address of


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