Browse Source

* elf.c (bfd_section_from_shdr): Kill bogus warning.

gdb-csl-arm-20051020-branch
Jakub Jelinek 21 years ago
parent
commit
aa2ca951cf
  1. 2
      bfd/ChangeLog
  2. 3
      bfd/elf.c

2
bfd/ChangeLog

@ -1,5 +1,7 @@
2005-06-17 Jakub Jelinek <jakub@redhat.com>
* 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.

3
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;

Loading…
Cancel
Save