aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf64-s390.c
diff options
context:
space:
mode:
Diffstat (limited to 'bfd/elf64-s390.c')
-rw-r--r--bfd/elf64-s390.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/bfd/elf64-s390.c b/bfd/elf64-s390.c
index 0df3c28..d5ce602 100644
--- a/bfd/elf64-s390.c
+++ b/bfd/elf64-s390.c
@@ -2076,7 +2076,8 @@ elf_s390_size_dynamic_sections (output_bfd, info)
if (s == htab->splt
|| s == htab->sgot
- || s == htab->sgotplt)
+ || s == htab->sgotplt
+ || s == htab->sdynbss)
{
/* Strip this section if we don't need it; see the
comment below. */
@@ -2112,6 +2113,9 @@ elf_s390_size_dynamic_sections (output_bfd, info)
continue;
}
+ if ((s->flags & SEC_HAS_CONTENTS) == 0)
+ continue;
+
/* Allocate memory for the section contents. We use bfd_zalloc
here in case unused entries are not reclaimed before the
section's contents are written out. This should not happen,