array to allow for the accessing the largest element.
+2003-06-17 Nick Clifton <nickc@redhat.com>
+
+ * elflink.h (elf_gc_record_vtentry): Allocate an extra element
+ in the vtable_entries_used array to allow for the accessing
+ the largest element.
+
2003-06-17 Alan Modra <amodra@bigpond.net.au>
* elf64-ppc.c (struct ppc_link_hash_table): Remove top_index. Modify
struct elf_backend_data *bed = get_elf_backend_data (abfd);
unsigned int log_file_align = bed->s->log_file_align;
- if (addend >= h->vtable_entries_size)
+ if (addend > h->vtable_entries_size)
{
size_t size, bytes;
bfd_boolean *ptr = h->vtable_entries_used;
}
/* Allocate one extra entry for use as a "done" flag for the
- consolidation pass. */
- bytes = ((size >> log_file_align) + 1) * sizeof (bfd_boolean);
+ consolidation pass and another extra entry because we are
+ going to write up to and including 'size' entries. */
+ bytes = ((size >> log_file_align) + 2) * sizeof (bfd_boolean);
if (ptr)
{