This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[PATCH] Fix sparc .plt sh_entsize
- From: Jakub Jelinek <jakub at redhat dot com>
- To: binutils at sources dot redhat dot com
- Cc: davem at redhat dot com
- Date: Fri, 13 Oct 2006 23:11:28 +0200
- Subject: [PATCH] Fix sparc .plt sh_entsize
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
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