From: Petr Machata Date: Wed, 2 Dec 2009 18:28:45 +0000 (+0100) Subject: dwarflint: Don't accept empty section as present X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=34ecae10a2ac8722c95ee8ae97f6110178177256;p=thirdparty%2Felfutils.git dwarflint: Don't accept empty section as present --- diff --git a/src/dwarflint/sections.cc b/src/dwarflint/sections.cc index 36f1ef668..3a3ba2528 100644 --- a/src/dwarflint/sections.cc +++ b/src/dwarflint/sections.cc @@ -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),