+
+/* Merge non visibility st_other attribute when the symbol comes from
+ a dynamic object. */
+static void
+sh64_elf_merge_symbol_attribute (struct elf_link_hash_entry *h,
+ const Elf_Internal_Sym *isym,
+ bfd_boolean definition,
+ bfd_boolean dynamic ATTRIBUTE_UNUSED)
+{
+ if ((isym->st_other & ~ELF_ST_VISIBILITY (-1)) != 0)
+ {
+ unsigned char other;
+
+ /* Take the balance of OTHER from the definition. */
+ other = (definition ? isym->st_other : h->other);
+ other &= ~ ELF_ST_VISIBILITY (-1);
+ h->other = other | ELF_ST_VISIBILITY (h->other);
+ }
+
+ return;
+}
+
+static const struct bfd_elf_special_section sh64_elf_special_sections[] =
+{
+ { STRING_COMMA_LEN (".cranges"), 0, SHT_PROGBITS, 0 },
+ { NULL, 0, 0, 0, 0 }
+};
+
+#undef TARGET_BIG_SYM
+#define TARGET_BIG_SYM sh64_elf32_vec
+#undef TARGET_BIG_NAME
+#define TARGET_BIG_NAME "elf32-sh64"
+#undef TARGET_LITTLE_SYM
+#define TARGET_LITTLE_SYM sh64_elf32_le_vec
+#undef TARGET_LITTLE_NAME
+#define TARGET_LITTLE_NAME "elf32-sh64l"
+
+#include "elf32-target.h"
+
+/* NetBSD support. */
+#undef TARGET_BIG_SYM
+#define TARGET_BIG_SYM sh64_elf32_nbsd_vec
+#undef TARGET_BIG_NAME
+#define TARGET_BIG_NAME "elf32-sh64-nbsd"
+#undef TARGET_LITTLE_SYM
+#define TARGET_LITTLE_SYM sh64_elf32_nbsd_le_vec
+#undef TARGET_LITTLE_NAME
+#define TARGET_LITTLE_NAME "elf32-sh64l-nbsd"
+#undef ELF_MAXPAGESIZE
+#define ELF_MAXPAGESIZE 0x10000
+#undef ELF_COMMONPAGESIZE
+#undef elf_symbol_leading_char
+#define elf_symbol_leading_char 0
+#undef elf32_bed
+#define elf32_bed elf32_sh64_nbsd_bed
+
+#include "elf32-target.h"
+
+/* Linux support. */
+#undef TARGET_BIG_SYM
+#define TARGET_BIG_SYM sh64_elf32_linux_be_vec
+#undef TARGET_BIG_NAME
+#define TARGET_BIG_NAME "elf32-sh64big-linux"
+#undef TARGET_LITTLE_SYM
+#define TARGET_LITTLE_SYM sh64_elf32_linux_vec
+#undef TARGET_LITTLE_NAME
+#define TARGET_LITTLE_NAME "elf32-sh64-linux"
+#undef elf32_bed
+#define elf32_bed elf32_sh64_lin_bed
+#undef ELF_COMMONPAGESIZE
+#define ELF_COMMONPAGESIZE 0x1000
+
+#include "elf32-target.h"
+