* elf.c (section_from_elf_index): Return bfd_abs_section, not 0,
authorBrendan Kehoe <brendan@cygnus>
Fri, 25 Sep 1992 22:05:15 +0000 (22:05 +0000)
committerBrendan Kehoe <brendan@cygnus>
Fri, 25 Sep 1992 22:05:15 +0000 (22:05 +0000)
since we should never have a NULL section.
(elf_slurp_symbol_table): If st_shndx doesn't match any of our
tests, set the section to bfd_abs_section.

bfd/ChangeLog
bfd/elf.c

index 8518e41a39cc8fe7c4bf2cd0457965a7299ea2dc..f344edbe015becb4ea189352c3bee7c2aaa7c87e 100644 (file)
@@ -1,3 +1,10 @@
+Fri Sep 25 15:03:22 1992  Brendan Kehoe  (brendan@rtl.cygnus.com)
+
+       * elf.c (section_from_elf_index): Return bfd_abs_section, not 0,
+       since we should never have a NULL section.
+       (elf_slurp_symbol_table): If st_shndx doesn't match any of our
+       tests, set the section to bfd_abs_section.
+
 Fri Sep 25 11:11:57 1992  Steve Chamberlain  (sac@thepub.cygnus.com)
 
        * coff-z8k.c: getting closer
index 2290f628562c540a560c942725e85cd72ddfde5c..75bbb5ba9937eac83740803c86b110e135ccbcd0 100644 (file)
--- a/bfd/elf.c
+++ b/bfd/elf.c
@@ -425,7 +425,6 @@ DEFUN(bfd_section_from_shdr, (abfd, shindex),
     return true;
 
   case SHT_PROGBITS:
-  case SHT_BEPROGBITS:
   case SHT_NOBITS:
     /* Bits that get saved. This one is real. */
     if (! hdr->rawdata ) 
@@ -1861,14 +1860,13 @@ DEFUN (section_from_elf_index, (abfd, index),
     {
       /* ELF sections that map to BFD sections */
     case SHT_PROGBITS:
-    case SHT_BEPROGBITS:
     case SHT_NOBITS:
       if (! hdr->rawdata)
        bfd_section_from_shdr (abfd, index);
       return (struct sec *)hdr->rawdata;
       break;
     default:
-      return 0;
+      return (struct sec *)&bfd_abs_section;
     }
 }
 
@@ -1889,7 +1887,6 @@ DEFUN (elf_section_from_bfd_section, (abfd, asect),
       {
        /* ELF sections that map to BFD sections */
       case SHT_PROGBITS:
-      case SHT_BEPROGBITS:
       case SHT_NOBITS:
        if (hdr->rawdata) 
          {
@@ -1993,6 +1990,8 @@ how Sun hacked stabs.   -- gnu@cygnus.com  */
        {
          sym -> section = &bfd_und_section;
        }
+      else
+       sym -> section = &bfd_abs_section;
       
       switch (ELF_ST_BIND (i_sym.st_info))
        {