aboutsummaryrefslogtreecommitdiff
path: root/bfd/stabs.c
diff options
context:
space:
mode:
Diffstat (limited to 'bfd/stabs.c')
-rw-r--r--bfd/stabs.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/bfd/stabs.c b/bfd/stabs.c
index da0c61d..1cce2ae 100644
--- a/bfd/stabs.c
+++ b/bfd/stabs.c
@@ -162,7 +162,9 @@ _bfd_link_section_stabs (bfd *abfd,
bfd_size_type *pstridx;
if (stabsec->size == 0
- || stabstrsec->size == 0)
+ || stabstrsec->size == 0
+ || (stabsec->flags & SEC_HAS_CONTENTS) == 0
+ || (stabstrsec->flags & SEC_HAS_CONTENTS) == 0)
/* This file does not contain stabs debugging information. */
return true;
@@ -520,7 +522,7 @@ _bfd_discard_section_stabs (bfd *abfd,
bfd_size_type *pstridx;
int deleting;
- if (stabsec->size == 0)
+ if (stabsec->size == 0 || (stabsec->flags & SEC_HAS_CONTENTS) == 0)
/* This file does not contain stabs debugging information. */
return false;