From a6c1d73165725a728678b769a84d426945403d45 Mon Sep 17 00:00:00 2001 From: Fred Fish Date: Sat, 9 Nov 1991 21:48:15 +0000 Subject: [PATCH] Don't try to create a bfd section for the first ELF section header table entry, since it is just a placeholder with no name. --- bfd/ChangeLog | 5 +++++ bfd/elf.c | 7 ++++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/bfd/ChangeLog b/bfd/ChangeLog index cd188626175..dc04638d6fc 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,8 @@ +Sat Nov 9 13:45:01 1991 Fred Fish (fnf at cygnus.com) + + * elf.c (elf_object_p): Don't try to create a bfd section for + the first ELF section header. It is just a placeholder. + Sat Nov 9 03:04:26 1991 John Gilmore (gnu at cygnus.com) * coff-rs6000.c, config/mh-rs6000: Make it work on archive and diff --git a/bfd/elf.c b/bfd/elf.c index 427c2d183ba..bd62645c61e 100644 --- a/bfd/elf.c +++ b/bfd/elf.c @@ -412,9 +412,10 @@ wrong: } /* Once all of the section headers have been read and converted, we - can start processing them. */ + can start processing them. Note that the first section header is + a dummy placeholder entry, so we ignore it. */ - for (shindex = 0; shindex < i_ehdr.e_shnum; shindex++) + for (shindex = 1; shindex < i_ehdr.e_shnum; shindex++) { bfd_section_from_shdr (abfd, i_shdr + shindex, shstrtab); } @@ -701,7 +702,7 @@ DEFUN (elf_sizeof_headers, (abfd, reloc), #define elf_openr_next_archived_file bfd_generic_openr_next_archived_file #define elf_generic_stat_arch_elt bfd_generic_stat_arch_elt #define elf_write_armap (PROTO (boolean, (*), \ - (bfd *arch, unsigned int elength, struct orl *map, int orl_count, \ + (bfd *arch, unsigned int elength, struct orl *map, unsigned int orl_count, \ int stridx))) bfd_false /* Ordinary section reading and writing */ -- 2.30.2