From: Petr Machata Date: Fri, 20 Mar 2009 16:23:29 +0000 (+0100) Subject: dwarflint: Fix reporting of .debug_abbrev unnecessary padding offsets X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=71eeb3135a4f0d9f16013c030a4ba9f232bd7bd3;p=thirdparty%2Felfutils.git dwarflint: Fix reporting of .debug_abbrev unnecessary padding offsets * ... so that it matches with values that eu-readelf reports for associated dummy empty section * Also undo previous commit where I mis-fixed offset reporting --- diff --git a/src/dwarflint.c b/src/dwarflint.c index e168f0846..2fdf3339e 100644 --- a/src/dwarflint.c +++ b/src/dwarflint.c @@ -1664,7 +1664,7 @@ abbrev_table_load (struct read_ctx *ctx) if (abbr_code == 0 && prev_abbr_code == 0 && zero_seq_off == (uint64_t)-1) - zero_seq_off = prev_abbr_off; + zero_seq_off = abbr_off; if (abbr_code != 0) break; @@ -1681,7 +1681,7 @@ abbrev_table_load (struct read_ctx *ctx) padding. */ struct where wh = WHERE (where.section, NULL); wr_message_padding_0 (mc_abbrevs | mc_header, &wh, - zero_seq_off, prev_abbr_off - 1); + zero_seq_off, abbr_off - 1); } } @@ -5145,8 +5145,8 @@ check_line_structural (struct section_data *data, && !check_zero_padding (&sub_ctx, mc_line, &WHERE (sec_line, NULL))) wr_message_padding_n0 (mc_line, &WHERE (sec_line, NULL), - read_ctx_get_offset (&sub_ctx), - sub_ctx.end - sub_ctx.ptr - 1); + /*begin*/read_ctx_get_offset (&sub_ctx), + /*end*/sub_ctx.end - sub_ctx.begin - 1); } /* XXX overlaps in defined addresses are probably OK, one