aboutsummaryrefslogtreecommitdiff
path: root/bfd/elflink.h
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2001-08-31 16:16:14 +0000
committerNick Clifton <nickc@redhat.com>2001-08-31 16:16:14 +0000
commit374b596dd678cf40a7963c4b39439c529f76c9be (patch)
treeb75c949a0a40b5bf65efaf1ab53b4c8f5e5be7bc /bfd/elflink.h
parent3fc90ddbe34630c86939733570ed39b485ee5421 (diff)
downloadgdb-374b596dd678cf40a7963c4b39439c529f76c9be.zip
gdb-374b596dd678cf40a7963c4b39439c529f76c9be.tar.gz
gdb-374b596dd678cf40a7963c4b39439c529f76c9be.tar.bz2
Fix off-by-one error whilst sweeping vtable relocs
Diffstat (limited to 'bfd/elflink.h')
-rw-r--r--bfd/elflink.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/bfd/elflink.h b/bfd/elflink.h
index c2bcc45..0da2f0e 100644
--- a/bfd/elflink.h
+++ b/bfd/elflink.h
@@ -7101,10 +7101,12 @@ elf_gc_propagate_vtable_entries_used (h, okp)
int file_align = bed->s->file_align;
n = h->vtable_parent->vtable_entries_size / file_align;
- while (--n != 0)
+ while (n--)
{
- if (*pu) *cu = true;
- pu++, cu++;
+ if (*pu)
+ *cu = true;
+ pu++;
+ cu++;
}
}
}