diff options
Diffstat (limited to 'bfd/elflink.c')
-rw-r--r-- | bfd/elflink.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/bfd/elflink.c b/bfd/elflink.c index 8aae980..81e667d 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 *) |