From: Petr Machata Date: Thu, 5 Mar 2009 16:13:38 +0000 (+0100) Subject: dwarflint: fixes in reporting in check_line_structural X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ffdabef922d8cafe13689615240fd0fe27a3e0b5;p=thirdparty%2Felfutils.git dwarflint: fixes in reporting in check_line_structural --- diff --git a/src/dwarflint.c b/src/dwarflint.c index 6c910c51d..1a632f9cb 100644 --- a/src/dwarflint.c +++ b/src/dwarflint.c @@ -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; }