]> git.ipfire.org Git - thirdparty/elfutils.git/commitdiff
dwarflint: fixes in reporting in check_line_structural
authorPetr Machata <pmachata@redhat.com>
Thu, 5 Mar 2009 16:13:38 +0000 (17:13 +0100)
committerPetr Machata <pmachata@redhat.com>
Thu, 5 Mar 2009 16:13:38 +0000 (17:13 +0100)
src/dwarflint.c

index 6c910c51db6c95f46a13f3133aaafa7bdb9f8af7..1a632f9cb148126714e2e5e52485c82c58281753 100644 (file)
@@ -4769,7 +4769,7 @@ check_line_structural (struct section_data *data,
                                                  &where, skip_mismatched)))
                        relocate_one (&data->rel, rel, data->file->addr_64 ? 8 : 4,
                                      &addr, &where, sec_text, NULL);
-                     else
+                     else if (data->file->ehdr.e_type == ET_REL)
                        wr_message (mc_impact_2 | mc_line | mc_reloc, &where,
                                    PRI_LACK_RELOCATION, "DW_LNE_set_address");
                      break;
@@ -4878,8 +4878,14 @@ check_line_structural (struct section_data *data,
          for (unsigned i = 0; i < operands; ++i)
            {
              uint64_t operand;
-             if (!checked_read_uleb128 (&sub_ctx, &operand, &where,
-                                        "opcode operand"))
+             char buf[128];
+             if (opcode != 0)
+               sprintf (buf, "operand #%d of DW_LNS_%s",
+                        i, dwarf_locexpr_opcode_string (opcode));
+             else
+               sprintf (buf, "operand #%d of extended opcode %d",
+                        i, extended);
+             if (!checked_read_uleb128 (&sub_ctx, &operand, &where, buf))
                goto skip;
            }