+static boolean
+elf64_generic_link_add_symbols (abfd, info)
+ bfd *abfd;
+ struct bfd_link_info *info;
+{
+ asection *o;
+
+ /* Check if there are any relocations. */
+ for (o = abfd->sections; o != NULL; o = o->next)
+ if ((o->flags & SEC_RELOC) != 0)
+ {
+ Elf_Internal_Ehdr *ehdrp;
+
+ ehdrp = elf_elfheader (abfd);
+ (*_bfd_error_handler) (_("%s: Relocations in generic ELF (EM: %d)"),
+ bfd_archive_filename (abfd),
+ ehdrp->e_machine);
+
+ bfd_set_error (bfd_error_wrong_format);
+ return false;
+ }
+
+ return bfd_elf64_bfd_link_add_symbols (abfd, info);
+}
+