]> git.ipfire.org Git - thirdparty/elfutils.git/commitdiff
dwarflint: Don't accept empty section as present
authorPetr Machata <pmachata@redhat.com>
Wed, 2 Dec 2009 18:28:45 +0000 (19:28 +0100)
committerPetr Machata <pmachata@redhat.com>
Wed, 18 Aug 2010 12:55:17 +0000 (14:55 +0200)
src/dwarflint/sections.cc

index 36f1ef668cfd7c2d0f97cde1fb14c7fdfc7fc5c8..3a3ba252897e6e19dff8a16c3b35a1d511bce6de 100644 (file)
@@ -33,7 +33,6 @@
 #include "../libelf/gelf.h"
 
 #include "sections.hh"
-
 #include "messages.h"
 #include "pri.hh"
 #include "config.h"
@@ -442,11 +441,13 @@ namespace
     throw std::runtime_error (ss.str ());
   }
 }
+
 sec &
 section_base::get_sec_or_throw (section_id secid)
 {
   if (sec *s = sections->file.debugsec[secid])
-    return *s;
+    if (s->data != NULL)
+      return *s;
 
   if (!tolerate_nodebug)
     wr_message (WHERE (secid, NULL),