This is the mail archive of the binutils@sources.redhat.com 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] Clear .plt sh_entsize on sparc32


Hi!

For non-empty .plt section on sparc32 the size is N*12 + 4, so certainly
not a multiple of 12.  libelf is anal about section sizes being multiple
of sh_entsize, so it is better to clear it like I've done already on Alpha
more than a year ago.  Commited to trunk.

2004-02-19  Jakub Jelinek  <jakub@redhat.com>

	* elf32-sparc.c (elf32_sparc_finish_dynamic_sections): Clear
	.plt sh_entsize.

--- bfd/elf32-sparc.c.jj	2004-01-05 09:25:56.000000000 +0100
+++ bfd/elf32-sparc.c	2004-02-19 13:00:08.248609568 +0100
@@ -3283,8 +3283,7 @@ elf32_sparc_finish_dynamic_sections (out
 		      splt->contents + splt->_raw_size - 4);
 	}
 
-      elf_section_data (splt->output_section)->this_hdr.sh_entsize =
-	PLT_ENTRY_SIZE;
+      elf_section_data (splt->output_section)->this_hdr.sh_entsize = 0;
     }
 
   /* Set the first entry in the global offset table to the address of


	Jakub


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