From: Alan Modra Date: Fri, 29 Sep 2000 07:01:18 +0000 (+0000) Subject: (elf_fake_sections): Do not mark the section SHT_NOBITS if X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=6c99a5c30b701c9eacaa5c33e60a4cc8e977746e;p=binutils-gdb.git (elf_fake_sections): Do not mark the section SHT_NOBITS if is has the SEC_HAS_CONTENTS flag set. --- diff --git a/bfd/ChangeLog b/bfd/ChangeLog index bc4f246c04d..1f81b532c2c 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,8 @@ +2000-09-29 Momchil Velikov + + * 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 Hans-Peter Nilsson diff --git a/bfd/elf.c b/bfd/elf.c index fea846dc66a..742376173c2 100644 --- 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;