From: Jakub Jelinek Date: Fri, 17 Jun 2005 15:48:25 +0000 (+0000) Subject: * elf.c (bfd_section_from_shdr): Kill bogus warning. X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=ce26ac6589fc077102966591b6deb3f789cc24d4;p=pf3gnuchains%2Fpf3gnuchains3x.git * elf.c (bfd_section_from_shdr): Kill bogus warning. --- diff --git a/bfd/ChangeLog b/bfd/ChangeLog index f47dac29b0..3d87dd1897 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,5 +1,7 @@ 2005-06-17 Jakub Jelinek + * elf.c (bfd_section_from_shdr): Kill bogus warning. + * elf.c (bfd_section_from_shdr): Fail if sh_entsize is bogus for symbol, relocation, group or versym sections. diff --git a/bfd/elf.c b/bfd/elf.c index d301a9e14f..590ce35328 100644 --- a/bfd/elf.c +++ b/bfd/elf.c @@ -1948,7 +1948,8 @@ bfd_section_from_shdr (bfd *abfd, unsigned int shindex) Elf_Internal_Shdr *hdr2; unsigned int num_sec = elf_numsections (abfd); - if (hdr->sh_entsize != (hdr->sh_type == SHT_REL + if (hdr->sh_entsize + != (bfd_size_type) (hdr->sh_type == SHT_REL ? bed->s->sizeof_rel : bed->s->sizeof_rela)) return FALSE;