Make bfd_byte an int8_t, flagword a uint32_t
[binutils-gdb.git] / bfd / stabs.c
index da0c61d6c2a8bd863ce438cadcfad41a4486ddaf..1cce2ae4f3fc17cbd6abaf6ef3990a62b969f3f4 100644 (file)
@@ -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;