aboutsummaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
Diffstat (limited to 'bfd')
-rw-r--r--bfd/dwarf2.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/bfd/dwarf2.c b/bfd/dwarf2.c
index 6eb6e04..f689eeb 100644
--- a/bfd/dwarf2.c
+++ b/bfd/dwarf2.c
@@ -705,6 +705,14 @@ read_section (bfd *abfd,
return false;
}
+ if ((msec->flags & SEC_HAS_CONTENTS) == 0)
+ {
+ _bfd_error_handler (_("DWARF error: section %s has no contents"),
+ section_name);
+ bfd_set_error (bfd_error_no_contents);
+ return false;
+ }
+
if (_bfd_section_size_insane (abfd, msec))
{
/* PR 26946 */