aboutsummaryrefslogtreecommitdiff
path: root/gas/write.c
diff options
context:
space:
mode:
Diffstat (limited to 'gas/write.c')
-rw-r--r--gas/write.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/gas/write.c b/gas/write.c
index 018800e..aabb96d 100644
--- a/gas/write.c
+++ b/gas/write.c
@@ -1359,6 +1359,7 @@ compress_debug (bfd *abfd, asection *sec, void *xxx ATTRIBUTE_UNUSED)
flagword flags = bfd_get_section_flags (abfd, sec);
if (seginfo == NULL
+ || sec->size == 0
|| (flags & (SEC_ALLOC | SEC_HAS_CONTENTS)) == SEC_ALLOC)
return;