From: Petr Machata Date: Wed, 18 Feb 2009 15:36:39 +0000 (+0100) Subject: Fix formatting of where formed as sec_rel of sec_locexpr X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=932371716d5026dc6e54bddbe4934ce780350a6d;p=thirdparty%2Felfutils.git Fix formatting of where formed as sec_rel of sec_locexpr --- diff --git a/src/dwarflint.c b/src/dwarflint.c index 87100fce9..5019ae5f3 100644 --- a/src/dwarflint.c +++ b/src/dwarflint.c @@ -702,8 +702,15 @@ where_fmt (const struct where *wh, char *ptr) ptr = stpcpy (buf, inf->name); if (is_reloc) { - assert (wh->ref != NULL); - ptr = stpcpy (ptr, section_names[wh->ref->section].name); + struct where *ref = wh->ref; + assert (ref != NULL); + if (ref->section == sec_locexpr) + { + ref = ref->next; + assert (ref != NULL); + assert (ref->section != sec_locexpr); + } + ptr = stpcpy (ptr, section_names[ref->section].name); } if (addr1s != NULL)