From: Nick Clifton Date: Fri, 31 Aug 2001 16:16:14 +0000 (+0000) Subject: Fix off-by-one error whilst sweeping vtable relocs X-Git-Tag: cygnus_cvs_20020108_pre~1475 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=374b596dd678cf40a7963c4b39439c529f76c9be;p=thirdparty%2Fbinutils-gdb.git Fix off-by-one error whilst sweeping vtable relocs --- diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 1eba7a82f9d..4f3b21196a6 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,8 @@ +2001-08-31 Nick Clifton + + * elflink.h (elf_gc_propagate_vtable_entries_used): Fix off-by-one + error. + 2001-08-30 H.J. Lu * elf32-mips.c (mips_elf_calculate_relocation): Revert the last diff --git a/bfd/elflink.h b/bfd/elflink.h index c2bcc45c368..0da2f0e76ea 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++; } } }