From: Petr Machata Date: Wed, 8 Jul 2009 14:35:58 +0000 (+0200) Subject: dwarflint: Fix bug introduced during last fix X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=266d1de379f2b1285dd8b32ff1bf55d56ae5d91a;p=thirdparty%2Felfutils.git dwarflint: Fix bug introduced during last fix * sec_invalid marks up any section that's non-debug. We do want to do coverage analysis on these. Skipping dummy section #0 is the right solution. --- diff --git a/src/dwarflint.c b/src/dwarflint.c index 7dd08acd4..3cab98d55 100644 --- a/src/dwarflint.c +++ b/src/dwarflint.c @@ -2229,11 +2229,9 @@ coverage_map_init (struct coverage_map *coverage_map, coverage_map->elf = elf; coverage_map->allow_overlap = allow_overlap; - for (size_t i = 0; i < elf->size; ++i) + for (size_t i = 1; i < elf->size; ++i) { struct sec *sec = elf->sec + i; - if (elf->sec[i].id == sec_invalid) - continue; bool normal = (sec->shdr.sh_flags & mask) == mask; bool warn = (sec->shdr.sh_flags & warn_mask) == warn_mask;