(elf_fake_sections): Do not mark the section SHT_NOBITS if
authorAlan Modra <amodra@gmail.com>
Fri, 29 Sep 2000 07:01:18 +0000 (07:01 +0000)
committerAlan Modra <amodra@gmail.com>
Fri, 29 Sep 2000 07:01:18 +0000 (07:01 +0000)
is has the SEC_HAS_CONTENTS flag set.

bfd/ChangeLog
bfd/elf.c

index bc4f246c04d65e92217ecf73009c9fa6fb23df3e..1f81b532c2c6c41c4556a1759bd08ad657194f8b 100644 (file)
@@ -1,3 +1,8 @@
+2000-09-29  Momchil Velikov <velco@fadata.bg>
+
+       * elf.c (elf_fake_sections): Do not mark the section SHT_NOBITS if
+       is has the SEC_HAS_CONTENTS flag set.
+
 2000-09-28  Ã–rjan Friberg  <orjanf@axis.com>
            Hans-Peter Nilsson  <hp@axis.com>
 
index fea846dc66a67de1395568d77558644574311fd1..742376173c2235e1300b5c784ade1f930e12cabd 100644 (file)
--- a/bfd/elf.c
+++ b/bfd/elf.c
@@ -1787,16 +1787,10 @@ elf_fake_sections (abfd, asect, failedptrarg)
                    || this_hdr->sh_info == elf_tdata (abfd)->cverrefs);
     }
   else if ((asect->flags & SEC_ALLOC) != 0
-          && (asect->flags & SEC_LOAD) != 0)
-    this_hdr->sh_type = SHT_PROGBITS;
-  else if ((asect->flags & SEC_ALLOC) != 0
-          && ((asect->flags & SEC_LOAD) == 0))
+          && ((asect->flags & (SEC_LOAD | SEC_HAS_CONTENTS) == 0)))
     this_hdr->sh_type = SHT_NOBITS;
   else
-    {
-      /* Who knows?  */
-      this_hdr->sh_type = SHT_PROGBITS;
-    }
+    this_hdr->sh_type = SHT_PROGBITS;
 
   if ((asect->flags & SEC_ALLOC) != 0)
     this_hdr->sh_flags |= SHF_ALLOC;