From 7911df2ade8bc311ea99b7e9d170f72af4dd0933 Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Thu, 14 Feb 2002 04:12:45 +0000 Subject: [PATCH] * elf.c (elf_fake_sections): Use SHT_NOBITS when SEC_NEVER_LOAD. --- bfd/ChangeLog | 4 ++++ bfd/elf.c | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 63184757026..01727d85279 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,7 @@ +2002-02-14 Alan Modra + + * elf.c (elf_fake_sections): Use SHT_NOBITS when SEC_NEVER_LOAD. + 2002-02-13 Hans-Peter Nilsson * config.bfd (sh-*-linux*, sh-*-elf* | sh-*-rtemself*): Add sh64 diff --git a/bfd/elf.c b/bfd/elf.c index da4625842db..8c6da10f1bd 100644 --- a/bfd/elf.c +++ b/bfd/elf.c @@ -2214,7 +2214,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; -- 2.47.2