aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2006-05-11 12:34:46 +0000
committerAlan Modra <amodra@gmail.com>2006-05-11 12:34:46 +0000
commit8b95791f5b3923a4100c60011753355597bd4507 (patch)
tree8a2008dd0da80c19434c12e60ad0f135056d504e /bfd/elf.c
parent576c2025449a61882b04df14736f00017ed72730 (diff)
downloadgdb-8b95791f5b3923a4100c60011753355597bd4507.zip
gdb-8b95791f5b3923a4100c60011753355597bd4507.tar.gz
gdb-8b95791f5b3923a4100c60011753355597bd4507.tar.bz2
* elf.c (_bfd_elf_init_private_section_data): Don't change
section type if already set.
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 120c4b0..fbd8432 100644
--- a/bfd/elf.c
+++ b/bfd/elf.c
@@ -5911,7 +5911,8 @@ _bfd_elf_init_private_section_data (bfd *ibfd,
output BFD section flags has been set to something different.
elf_fake_sections will set ELF section type based on BFD
section flags. */
- if (osec->flags == isec->flags || !osec->flags)
+ if (osec->flags == isec->flags
+ || (osec->flags == 0 && elf_section_type (osec) == SHT_NULL))
elf_section_type (osec) = elf_section_type (isec);
/* Set things up for objcopy and relocatable link. The output