]> git.ipfire.org Git - thirdparty/elfutils.git/commitdiff
dwarflint: Fix bug introduced during last fix
authorPetr Machata <pmachata@redhat.com>
Wed, 8 Jul 2009 14:35:58 +0000 (16:35 +0200)
committerPetr Machata <pmachata@redhat.com>
Wed, 8 Jul 2009 14:35:58 +0000 (16:35 +0200)
* 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.

src/dwarflint.c

index 7dd08acd4b212a31433dd449854e59ad67ada902..3cab98d55e55e8b6245b1c4161a12d7d97ea51eb 100644 (file)
@@ -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;