From 34ecae10a2ac8722c95ee8ae97f6110178177256 Mon Sep 17 00:00:00 2001 From: Petr Machata Date: Wed, 2 Dec 2009 19:28:45 +0100 Subject: [PATCH] dwarflint: Don't accept empty section as present --- src/dwarflint/sections.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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), -- 2.47.3