]> git.ipfire.org Git - thirdparty/elfutils.git/commitdiff
Fix formatting of where formed as sec_rel of sec_locexpr
authorPetr Machata <pmachata@redhat.com>
Wed, 18 Feb 2009 15:36:39 +0000 (16:36 +0100)
committerPetr Machata <pmachata@redhat.com>
Wed, 18 Feb 2009 15:36:39 +0000 (16:36 +0100)
src/dwarflint.c

index 87100fce945887ef97b489ecbd8426b2cbc0ba2e..5019ae5f36ba2015f79af1553bc30b5d9f4a40cf 100644 (file)
@@ -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)