Handle EITR records in VMS Alpha binaries with overlarge command length parameters.
[deliverable/binutils-gdb.git] / bfd / elf64-sh64.c
index 352fd2973dc8d89cbb0098ed2dab1cd0edae562e..bc8e9e1af99f971c94741cecf2a20a55146deaba 100644 (file)
@@ -1,5 +1,5 @@
 /* SuperH SH64-specific support for 64-bit ELF
-   Copyright (C) 2000-2016 Free Software Foundation, Inc.
+   Copyright (C) 2000-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
@@ -1677,8 +1677,9 @@ sh_elf64_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED,
        {
          _bfd_error_handler
            /* xgettext:c-format */
-           (_("%s: error: unaligned relocation type %d at %08x reloc %08x\n"),
-            bfd_get_filename (input_bfd), (int)r_type, (unsigned)rel->r_offset, (unsigned)relocation);
+           (_("%B: error: unaligned relocation type %d at %08x reloc %08x\n"),
+            input_bfd, (int) r_type, (unsigned) rel->r_offset,
+            (unsigned) relocation);
          bfd_set_error (bfd_error_bad_value);
          return FALSE;
        }
@@ -2273,17 +2274,16 @@ sh_elf64_merge_private_data (bfd *ibfd, struct bfd_link_info *info)
       if (bfd_get_arch_size (ibfd) == 32
          && bfd_get_arch_size (obfd) == 64)
        /* xgettext:c-format */
-       msg = _("%s: compiled as 32-bit object and %s is 64-bit");
+       msg = _("%B: compiled as 32-bit object and %B is 64-bit");
       else if (bfd_get_arch_size (ibfd) == 64
               && bfd_get_arch_size (obfd) == 32)
        /* xgettext:c-format */
-       msg = _("%s: compiled as 64-bit object and %s is 32-bit");
+       msg = _("%B: compiled as 64-bit object and %B is 32-bit");
       else
        /* xgettext:c-format */
-       msg = _("%s: object size does not match that of target %s");
+       msg = _("%B: object size does not match that of target %B");
 
-      _bfd_error_handler (msg, bfd_get_filename (ibfd),
-                         bfd_get_filename (obfd));
+      _bfd_error_handler (msg, ibfd, obfd);
       bfd_set_error (bfd_error_wrong_format);
       return FALSE;
     }
@@ -2302,8 +2302,7 @@ sh_elf64_merge_private_data (bfd *ibfd, struct bfd_link_info *info)
   else if ((new_flags & EF_SH_MACH_MASK) != EF_SH5)
     {
       _bfd_error_handler
-       ("%s: does not use the SH64 64-bit ABI as previous modules do",
-        bfd_get_filename (ibfd));
+       ("%B: does not use the SH64 64-bit ABI as previous modules do", ibfd);
       bfd_set_error (bfd_error_bad_value);
       return FALSE;
     }
@@ -2385,7 +2384,7 @@ sh_elf64_check_relocs (bfd *abfd, struct bfd_link_info *info,
 
          /* PR15323, ref flags aren't set for references in the same
             object.  */
-         h->root.non_ir_ref = 1;
+         h->root.non_ir_ref_regular = 1;
        }
 
       /* Some relocs require a global offset table.  */
@@ -2774,8 +2773,7 @@ sh64_elf64_add_symbol_hook (bfd *abfd, struct bfd_link_info *info,
        {
          /* Make sure we don't get confused on invalid input.  */
          _bfd_error_handler
-           (_("%s: encountered datalabel symbol in input"),
-            bfd_get_filename (abfd));
+           (_("%B: encountered datalabel symbol in input"), abfd);
          bfd_set_error (bfd_error_bad_value);
          return FALSE;
        }
@@ -3792,22 +3790,6 @@ sh64_elf64_finish_dynamic_sections (bfd *output_bfd,
              dyn.d_un.d_val = s->size;
              bfd_elf64_swap_dyn_out (output_bfd, &dyn, dyncon);
              break;
-
-           case DT_RELASZ:
-             /* My reading of the SVR4 ABI indicates that the
-                procedure linkage table relocs (DT_JMPREL) should be
-                included in the overall relocs (DT_RELA).  This is
-                what Solaris does.  However, UnixWare can not handle
-                that case.  Therefore, we override the DT_RELASZ entry
-                here to make it not include the JMPREL relocs.  Since
-                the linker script arranges for .rela.plt to follow all
-                other relocation sections, we don't have to worry
-                about changing the DT_RELA entry.  */
-             s = elf_hash_table (info)->srelplt;
-             if (s != NULL)
-               dyn.d_un.d_val -= s->size;
-             bfd_elf64_swap_dyn_out (output_bfd, &dyn, dyncon);
-             break;
            }
        }
 
@@ -3960,6 +3942,7 @@ static const struct bfd_elf_special_section sh64_elf64_special_sections[]=
 #define elf_backend_plt_readonly       1
 #define elf_backend_want_plt_sym       0
 #define elf_backend_got_header_size    24
+#define elf_backend_dtrel_excludes_plt 1
 
 #include "elf64-target.h"
 
This page took 0.024929 seconds and 4 git commands to generate.