aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2000-09-29 07:01:18 +0000
committerAlan Modra <amodra@gmail.com>2000-09-29 07:01:18 +0000
commit6c99a5c30b701c9eacaa5c33e60a4cc8e977746e (patch)
treeae32cd6b75a4a256ef33c7b712af5c5fd61848b2 /bfd/elf.c
parentbd0110a3cbbe0568c43f714b928e0601864ddc08 (diff)
downloadgdb-6c99a5c30b701c9eacaa5c33e60a4cc8e977746e.zip
gdb-6c99a5c30b701c9eacaa5c33e60a4cc8e977746e.tar.gz
gdb-6c99a5c30b701c9eacaa5c33e60a4cc8e977746e.tar.bz2
(elf_fake_sections): Do not mark the section SHT_NOBITS if
is has the SEC_HAS_CONTENTS flag set.
Diffstat (limited to 'bfd/elf.c')
-rw-r--r--bfd/elf.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/bfd/elf.c b/bfd/elf.c
index fea846d..7423761 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;