Fix Opcode generation of ld a,(bc) and ld a,(de) on target z80
[binutils-gdb.git] / bfd / elf32-v850.c
index a5bdc0c873406b42cc4efd20e382115b1fb8e5ac..422e34ba3ce08206112b596abb4209080ea12e32 100644 (file)
@@ -116,7 +116,9 @@ v850_elf_check_relocs (bfd *abfd,
         /* This relocation describes which C++ vtable entries
           are actually used.  Record for later use during GC.  */
         case R_V850_GNU_VTENTRY:
-          if (!bfd_elf_gc_record_vtentry (abfd, sec, h, rel->r_addend))
+          BFD_ASSERT (h != NULL);
+          if (h != NULL
+              && !bfd_elf_gc_record_vtentry (abfd, sec, h, rel->r_addend))
             return FALSE;
           break;