[PATCH] Fix sparc .plt sh_entsize
Jakub Jelinek
jakub@redhat.com
Mon Oct 16 07:01:00 GMT 2006
Hi!
During the sparc{32,64} backend merge the
http://sources.redhat.com/ml/binutils/2004-02/msg00231.html
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 <jakub@redhat.com>
* 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
Jakub
More information about the Binutils
mailing list