* elf-m10300.c (_bfd_mn10300_elf_adjust_dynamic_symbol): Warn on
[external/binutils.git] / bfd / elf32-sh.c
index b62881c..364ef23 100644 (file)
@@ -3915,6 +3915,13 @@ sh_elf_adjust_dynamic_symbol (struct bfd_link_info *info,
       return TRUE;
     }
 
+  if (h->size == 0)
+    {
+      (*_bfd_error_handler) (_("dynamic variable `%s' is zero size"),
+                            h->root.root.string);
+      return TRUE;
+    }
+
   /* We must allocate the symbol in our .dynbss section, which will
      become part of the .bss section of the executable.  There will be
      an entry for this symbol in the .dynsym section.  The dynamic