aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2002-02-14 04:12:24 +0000
committerAlan Modra <amodra@gmail.com>2002-02-14 04:12:24 +0000
commitedd29cf912e93aa5cdea52c4c5e3a6e0da5b664c (patch)
treed74d34a734f00152bd12cd6ff9616ae51703a75a /bfd/elf.c
parent6dbdc4a3629d75a46908c071d8caba9e66da03ab (diff)
downloadgdb-edd29cf912e93aa5cdea52c4c5e3a6e0da5b664c.zip
gdb-edd29cf912e93aa5cdea52c4c5e3a6e0da5b664c.tar.gz
gdb-edd29cf912e93aa5cdea52c4c5e3a6e0da5b664c.tar.bz2
* elf.c (elf_fake_sections): Use SHT_NOBITS when SEC_NEVER_LOAD.
Diffstat (limited to 'bfd/elf.c')
-rw-r--r--bfd/elf.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/bfd/elf.c b/bfd/elf.c
index f75eb85..7f63b34 100644
--- a/bfd/elf.c
+++ b/bfd/elf.c
@@ -2219,7 +2219,8 @@ elf_fake_sections (abfd, asect, failedptrarg)
this_hdr->sh_entsize = 4;
}
else if ((asect->flags & SEC_ALLOC) != 0
- && ((asect->flags & (SEC_LOAD | SEC_HAS_CONTENTS)) == 0))
+ && (((asect->flags & (SEC_LOAD | SEC_HAS_CONTENTS)) == 0)
+ || (asect->flags & SEC_NEVER_LOAD) != 0))
this_hdr->sh_type = SHT_NOBITS;
else
this_hdr->sh_type = SHT_PROGBITS;