X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=bfd%2Felflink.c;h=81e667dab0cd7c223cb55c30a0f90900a8b604ca;hb=a0ea3a14dc6a6062c0c1f2bfbb7ad0373ec20843;hp=8aae9808a1d2889ac9e7921252dbe525bc5eb9a3;hpb=9bff840e8cc560f5096a43609ed3e0d980733fd9;p=deliverable%2Fbinutils-gdb.git diff --git a/bfd/elflink.c b/bfd/elflink.c index 8aae9808a1..81e667dab0 100644 --- a/bfd/elflink.c +++ b/bfd/elflink.c @@ -13727,14 +13727,22 @@ bfd_elf_gc_record_vtinherit (bfd *abfd, /* Called from check_relocs to record the existence of a VTENTRY reloc. */ bfd_boolean -bfd_elf_gc_record_vtentry (bfd *abfd ATTRIBUTE_UNUSED, - asection *sec ATTRIBUTE_UNUSED, +bfd_elf_gc_record_vtentry (bfd *abfd, asection *sec, struct elf_link_hash_entry *h, bfd_vma addend) { const struct elf_backend_data *bed = get_elf_backend_data (abfd); unsigned int log_file_align = bed->s->log_file_align; + if (!h) + { + /* xgettext:c-format */ + _bfd_error_handler (_("%pB: section '%pA': corrupt VTENTRY entry"), + abfd, sec); + bfd_set_error (bfd_error_bad_value); + return FALSE; + } + if (!h->u2.vtable) { h->u2.vtable = ((struct elf_link_virtual_table_entry *)