-#ifdef INCLUDE_SHMEDIA
-
-/* The size in bytes of an entry in the procedure linkage table. */
-
-#define ELF_PLT_ENTRY_SIZE 64
-
-/* First entry in an absolute procedure linkage table look like this. */
-
-static const bfd_byte elf_sh_plt0_entry_be[ELF_PLT_ENTRY_SIZE] =
-{
- 0xcc, 0x00, 0x01, 0x10, /* movi .got.plt >> 16, r17 */
- 0xc8, 0x00, 0x01, 0x10, /* shori .got.plt & 65535, r17 */
- 0x89, 0x10, 0x09, 0x90, /* ld.l r17, 8, r25 */
- 0x6b, 0xf1, 0x66, 0x00, /* ptabs r25, tr0 */
- 0x89, 0x10, 0x05, 0x10, /* ld.l r17, 4, r17 */
- 0x44, 0x01, 0xff, 0xf0, /* blink tr0, r63 */
- 0x6f, 0xf0, 0xff, 0xf0, /* nop */
- 0x6f, 0xf0, 0xff, 0xf0, /* nop */
- 0x6f, 0xf0, 0xff, 0xf0, /* nop */
- 0x6f, 0xf0, 0xff, 0xf0, /* nop */
- 0x6f, 0xf0, 0xff, 0xf0, /* nop */
- 0x6f, 0xf0, 0xff, 0xf0, /* nop */
- 0x6f, 0xf0, 0xff, 0xf0, /* nop */
- 0x6f, 0xf0, 0xff, 0xf0, /* nop */
- 0x6f, 0xf0, 0xff, 0xf0, /* nop */
- 0x6f, 0xf0, 0xff, 0xf0, /* nop */
-};
-
-static const bfd_byte elf_sh_plt0_entry_le[ELF_PLT_ENTRY_SIZE] =
-{
- 0x10, 0x01, 0x00, 0xcc, /* movi .got.plt >> 16, r17 */
- 0x10, 0x01, 0x00, 0xc8, /* shori .got.plt & 65535, r17 */
- 0x90, 0x09, 0x10, 0x89, /* ld.l r17, 8, r25 */
- 0x00, 0x66, 0xf1, 0x6b, /* ptabs r25, tr0 */
- 0x10, 0x05, 0x10, 0x89, /* ld.l r17, 4, r17 */
- 0xf0, 0xff, 0x01, 0x44, /* blink tr0, r63 */
- 0xf0, 0xff, 0xf0, 0x6f, /* nop */
- 0xf0, 0xff, 0xf0, 0x6f, /* nop */
- 0xf0, 0xff, 0xf0, 0x6f, /* nop */
- 0xf0, 0xff, 0xf0, 0x6f, /* nop */
- 0xf0, 0xff, 0xf0, 0x6f, /* nop */
- 0xf0, 0xff, 0xf0, 0x6f, /* nop */
- 0xf0, 0xff, 0xf0, 0x6f, /* nop */
- 0xf0, 0xff, 0xf0, 0x6f, /* nop */
- 0xf0, 0xff, 0xf0, 0x6f, /* nop */
- 0xf0, 0xff, 0xf0, 0x6f, /* nop */
-};
-
-/* Sebsequent entries in an absolute procedure linkage table look like
- this. */
-
-static const bfd_byte elf_sh_plt_entry_be[ELF_PLT_ENTRY_SIZE] =
-{
- 0xcc, 0x00, 0x01, 0x90, /* movi nameN-in-GOT >> 16, r25 */
- 0xc8, 0x00, 0x01, 0x90, /* shori nameN-in-GOT & 65535, r25 */
- 0x89, 0x90, 0x01, 0x90, /* ld.l r25, 0, r25 */
- 0x6b, 0xf1, 0x66, 0x00, /* ptabs r25, tr0 */
- 0x44, 0x01, 0xff, 0xf0, /* blink tr0, r63 */
- 0x6f, 0xf0, 0xff, 0xf0, /* nop */
- 0x6f, 0xf0, 0xff, 0xf0, /* nop */
- 0x6f, 0xf0, 0xff, 0xf0, /* nop */
- 0xcc, 0x00, 0x01, 0x90, /* movi .PLT0 >> 16, r25 */
- 0xc8, 0x00, 0x01, 0x90, /* shori .PLT0 & 65535, r25 */
- 0x6b, 0xf1, 0x66, 0x00, /* ptabs r25, tr0 */
- 0xcc, 0x00, 0x01, 0x50, /* movi reloc-offset >> 16, r21 */
- 0xc8, 0x00, 0x01, 0x50, /* shori reloc-offset & 65535, r21 */
- 0x44, 0x01, 0xff, 0xf0, /* blink tr0, r63 */
- 0x6f, 0xf0, 0xff, 0xf0, /* nop */
- 0x6f, 0xf0, 0xff, 0xf0, /* nop */
-};
-
-static const bfd_byte elf_sh_plt_entry_le[ELF_PLT_ENTRY_SIZE] =
-{
- 0x90, 0x01, 0x00, 0xcc, /* movi nameN-in-GOT >> 16, r25 */
- 0x90, 0x01, 0x00, 0xc8, /* shori nameN-in-GOT & 65535, r25 */
- 0x90, 0x01, 0x90, 0x89, /* ld.l r25, 0, r25 */
- 0x00, 0x66, 0xf1, 0x6b, /* ptabs r25, tr0 */
- 0xf0, 0xff, 0x01, 0x44, /* blink tr0, r63 */
- 0xf0, 0xff, 0xf0, 0x6f, /* nop */
- 0xf0, 0xff, 0xf0, 0x6f, /* nop */
- 0xf0, 0xff, 0xf0, 0x6f, /* nop */
- 0x90, 0x01, 0x00, 0xcc, /* movi .PLT0 >> 16, r25 */
- 0x90, 0x01, 0x00, 0xc8, /* shori .PLT0 & 65535, r25 */
- 0x00, 0x66, 0xf1, 0x6b, /* ptabs r25, tr0 */
- 0x50, 0x01, 0x00, 0xcc, /* movi reloc-offset >> 16, r21 */
- 0x50, 0x01, 0x00, 0xc8, /* shori reloc-offset & 65535, r21 */
- 0xf0, 0xff, 0x01, 0x44, /* blink tr0, r63 */
- 0xf0, 0xff, 0xf0, 0x6f, /* nop */
- 0xf0, 0xff, 0xf0, 0x6f, /* nop */
-};
-
-/* Entries in a PIC procedure linkage table look like this. */
-
-static const bfd_byte elf_sh_pic_plt_entry_be[ELF_PLT_ENTRY_SIZE] =
-{
- 0xcc, 0x00, 0x01, 0x90, /* movi nameN@GOT >> 16, r25 */
- 0xc8, 0x00, 0x01, 0x90, /* shori nameN@GOT & 65535, r25 */
- 0x40, 0xc2, 0x65, 0x90, /* ldx.l r12, r25, r25 */
- 0x6b, 0xf1, 0x66, 0x00, /* ptabs r25, tr0 */
- 0x44, 0x01, 0xff, 0xf0, /* blink tr0, r63 */
- 0x6f, 0xf0, 0xff, 0xf0, /* nop */
- 0x6f, 0xf0, 0xff, 0xf0, /* nop */
- 0x6f, 0xf0, 0xff, 0xf0, /* nop */
- 0xce, 0x00, 0x01, 0x10, /* movi -GOT_BIAS, r17 */
- 0x00, 0xc8, 0x45, 0x10, /* add.l r12, r17, r17 */
- 0x89, 0x10, 0x09, 0x90, /* ld.l r17, 8, r25 */
- 0x6b, 0xf1, 0x66, 0x00, /* ptabs r25, tr0 */
- 0x89, 0x10, 0x05, 0x10, /* ld.l r17, 4, r17 */
- 0xcc, 0x00, 0x01, 0x50, /* movi reloc-offset >> 16, r21 */
- 0xc8, 0x00, 0x01, 0x50, /* shori reloc-offset & 65535, r21 */
- 0x44, 0x01, 0xff, 0xf0, /* blink tr0, r63 */
-};
-
-static const bfd_byte elf_sh_pic_plt_entry_le[ELF_PLT_ENTRY_SIZE] =
-{
- 0x90, 0x01, 0x00, 0xcc, /* movi nameN@GOT >> 16, r25 */
- 0x90, 0x01, 0x00, 0xc8, /* shori nameN@GOT & 65535, r25 */
- 0x90, 0x65, 0xc2, 0x40, /* ldx.l r12, r25, r25 */
- 0x00, 0x66, 0xf1, 0x6b, /* ptabs r25, tr0 */
- 0xf0, 0xff, 0x01, 0x44, /* blink tr0, r63 */
- 0xf0, 0xff, 0xf0, 0x6f, /* nop */
- 0xf0, 0xff, 0xf0, 0x6f, /* nop */
- 0xf0, 0xff, 0xf0, 0x6f, /* nop */
- 0x10, 0x01, 0x00, 0xce, /* movi -GOT_BIAS, r17 */
- 0x10, 0x45, 0xc8, 0x00, /* add.l r12, r17, r17 */
- 0x90, 0x09, 0x10, 0x89, /* ld.l r17, 8, r25 */
- 0x00, 0x66, 0xf1, 0x6b, /* ptabs r25, tr0 */
- 0x10, 0x05, 0x10, 0x89, /* ld.l r17, 4, r17 */
- 0x50, 0x01, 0x00, 0xcc, /* movi reloc-offset >> 16, r21 */
- 0x50, 0x01, 0x00, 0xc8, /* shori reloc-offset & 65535, r21 */
- 0xf0, 0xff, 0x01, 0x44, /* blink tr0, r63 */
-};
-
-static const struct elf_sh_plt_info elf_sh_plts[2][2] = {
- {
- {
- /* Big-endian non-PIC. */
- elf_sh_plt0_entry_be,
- ELF_PLT_ENTRY_SIZE,
- { 0, MINUS_ONE, MINUS_ONE },
- elf_sh_plt_entry_be,
- ELF_PLT_ENTRY_SIZE,
- { 0, 32, 48, FALSE },
- 33, /* includes ISA encoding */
- NULL
- },
- {
- /* Little-endian non-PIC. */
- elf_sh_plt0_entry_le,
- ELF_PLT_ENTRY_SIZE,
- { 0, MINUS_ONE, MINUS_ONE },
- elf_sh_plt_entry_le,
- ELF_PLT_ENTRY_SIZE,
- { 0, 32, 48, FALSE },
- 33, /* includes ISA encoding */
- NULL
- },
- },
- {
- {
- /* Big-endian PIC. */
- elf_sh_plt0_entry_be,
- ELF_PLT_ENTRY_SIZE,
- { MINUS_ONE, MINUS_ONE, MINUS_ONE },
- elf_sh_pic_plt_entry_be,
- ELF_PLT_ENTRY_SIZE,
- { 0, MINUS_ONE, 52, FALSE },
- 33, /* includes ISA encoding */
- NULL
- },
- {
- /* Little-endian PIC. */
- elf_sh_plt0_entry_le,
- ELF_PLT_ENTRY_SIZE,
- { MINUS_ONE, MINUS_ONE, MINUS_ONE },
- elf_sh_pic_plt_entry_le,
- ELF_PLT_ENTRY_SIZE,
- { 0, MINUS_ONE, 52, FALSE },
- 33, /* includes ISA encoding */
- NULL
- },
- }
-};
-
-/* Return offset of the linker in PLT0 entry. */
-#define elf_sh_plt0_gotplt_offset(info) 0
-
-/* Install a 32-bit PLT field starting at ADDR, which occurs in OUTPUT_BFD.
- VALUE is the field's value and CODE_P is true if VALUE refers to code,
- not data.
-
- On SH64, each 32-bit field is loaded by a movi/shori pair. */
-
-inline static void
-install_plt_field (bfd *output_bfd, bfd_boolean code_p,
- unsigned long value, bfd_byte *addr)
-{
- value |= code_p;
- bfd_put_32 (output_bfd,
- bfd_get_32 (output_bfd, addr)
- | ((value >> 6) & 0x3fffc00),
- addr);
- bfd_put_32 (output_bfd,
- bfd_get_32 (output_bfd, addr + 4)
- | ((value << 10) & 0x3fffc00),
- addr + 4);
-}
-
-/* Return the type of PLT associated with ABFD. PIC_P is true if
- the object is position-independent. */
-
-static const struct elf_sh_plt_info *
-get_plt_info (bfd *abfd ATTRIBUTE_UNUSED, bfd_boolean pic_p)
-{
- return &elf_sh_plts[pic_p][!bfd_big_endian (abfd)];
-}
-#else