[PATCH] Clear .plt sh_entsize on sparc32
Jakub Jelinek
jakub@redhat.com
Thu Feb 19 11:05:00 GMT 2004
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
More information about the Binutils
mailing list