Automatic date update in version.in
[external/binutils.git] / bfd / elf64-alpha.c
index db4001c..4908601 100644 (file)
@@ -1,5 +1,5 @@
 /* Alpha specific support for 64-bit ELF
-   Copyright (C) 1996-2018 Free Software Foundation, Inc.
+   Copyright (C) 1996-2019 Free Software Foundation, Inc.
    Contributed by Richard Henderson <rth@tamu.edu>.
 
    This file is part of BFD, the Binary File Descriptor library.
@@ -1100,8 +1100,8 @@ elf64_alpha_bfd_reloc_name_lookup (bfd *abfd ATTRIBUTE_UNUSED,
 
 /* Given an Alpha ELF reloc type, fill in an arelent structure.  */
 
-static void
-elf64_alpha_info_to_howto (bfd *abfd ATTRIBUTE_UNUSED, arelent *cache_ptr,
+static bfd_boolean
+elf64_alpha_info_to_howto (bfd *abfd, arelent *cache_ptr,
                           Elf_Internal_Rela *dst)
 {
   unsigned r_type = ELF64_R_TYPE(dst->r_info);
@@ -1109,12 +1109,13 @@ elf64_alpha_info_to_howto (bfd *abfd ATTRIBUTE_UNUSED, arelent *cache_ptr,
   if (r_type >= R_ALPHA_max)
     {
       /* xgettext:c-format */
-      _bfd_error_handler (_("%B: unrecognised Alpha reloc number: %d"),
+      _bfd_error_handler (_("%pB: unsupported relocation type %#x"),
                          abfd, r_type);
       bfd_set_error (bfd_error_bad_value);
-      r_type = R_ALPHA_NONE;
+      return FALSE;
     }
   cache_ptr->howto = &elf64_alpha_howto_table[r_type];
+  return TRUE;
 }
 
 /* These two relocations create a two-word entry in the got.  */
@@ -1466,7 +1467,7 @@ elf64_alpha_find_nearest_line (bfd *abfd, asymbol **symbols,
   if (_bfd_dwarf2_find_nearest_line (abfd, symbols, NULL, section, offset,
                                     filename_ptr, functionname_ptr,
                                     line_ptr, discriminator_ptr,
-                                    dwarf_debug_sections, 0,
+                                    dwarf_debug_sections,
                                     &elf_tdata (abfd)->dwarf2_find_line_info))
     return TRUE;
 
@@ -2459,7 +2460,7 @@ elf64_alpha_size_got_sections (struct bfd_link_info *info,
              /* Yikes! A single object file has too many entries.  */
              _bfd_error_handler
                /* xgettext:c-format */
-               (_("%B: .got subsegment exceeds 64K (size %d)"),
+               (_("%pB: .got subsegment exceeds 64K (size %d)"),
                 i, alpha_elf_tdata (this_got)->total_got_size);
              return FALSE;
            }
@@ -3014,8 +3015,9 @@ elf64_alpha_relax_got_load (struct alpha_relax_info *info, bfd_vma symval,
       reloc_howto_type *howto = elf64_alpha_howto_table + r_type;
       _bfd_error_handler
        /* xgettext:c-format */
-       (_("%B: %A+%#Lx: warning: %s relocation against unexpected insn"),
-        info->abfd, info->sec, irel->r_offset, howto->name);
+       (_("%pB: %pA+%#" PRIx64 ": warning: "
+          "%s relocation against unexpected insn"),
+        info->abfd, info->sec, (uint64_t) irel->r_offset, howto->name);
       return TRUE;
     }
 
@@ -3209,8 +3211,9 @@ elf64_alpha_relax_with_lituse (struct alpha_relax_info *info,
     {
       _bfd_error_handler
        /* xgettext:c-format */
-       (_("%B: %A+%#Lx: warning: LITERAL relocation against unexpected insn"),
-        abfd, info->sec, irel->r_offset);
+       (_("%pB: %pA+%#" PRIx64 ": warning: "
+          "%s relocation against unexpected insn"),
+        abfd, info->sec, (uint64_t) irel->r_offset, "LITERAL");
       return TRUE;
     }
 
@@ -4095,7 +4098,7 @@ elf64_alpha_relocate_section_r (bfd *output_bfd ATTRIBUTE_UNUSED,
        {
          _bfd_error_handler
            /* xgettext:c-format */
-           (_("%B: unknown relocation type %d"),
+           (_("%pB: unsupported relocation type %#x"),
             input_bfd, (int) r_type);
          bfd_set_error (bfd_error_bad_value);
          ret_val = FALSE;
@@ -4243,7 +4246,7 @@ elf64_alpha_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
        {
          _bfd_error_handler
            /* xgettext:c-format */
-           (_("%B: unknown relocation type %d"),
+           (_("%pB: unsupported relocation type %#x"),
             input_bfd, (int) r_type);
          bfd_set_error (bfd_error_bad_value);
          ret_val = FALSE;
@@ -4409,7 +4412,7 @@ elf64_alpha_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
            {
              _bfd_error_handler
                /* xgettext:c-format */
-               (_("%B: gp-relative relocation against dynamic symbol %s"),
+               (_("%pB: gp-relative relocation against dynamic symbol %s"),
                 input_bfd, h->root.root.root.string);
              ret_val = FALSE;
            }
@@ -4422,7 +4425,7 @@ elf64_alpha_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
            {
              _bfd_error_handler
                /* xgettext:c-format */
-               (_("%B: gp-relative relocation against dynamic symbol %s"),
+               (_("%pB: gp-relative relocation against dynamic symbol %s"),
                 input_bfd, h->root.root.root.string);
              ret_val = FALSE;
            }
@@ -4449,7 +4452,7 @@ elf64_alpha_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
            {
              _bfd_error_handler
                /* xgettext:c-format */
-               (_("%B: pc-relative relocation against dynamic symbol %s"),
+               (_("%pB: pc-relative relocation against dynamic symbol %s"),
                 input_bfd, h->root.root.root.string);
              ret_val = FALSE;
            }
@@ -4478,7 +4481,7 @@ elf64_alpha_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
              {
                _bfd_error_handler
                  /* xgettext:c-format */
-                 (_("%B: change in gp: BRSGP %s"),
+                 (_("%pB: change in gp: BRSGP %s"),
                   input_bfd, h->root.root.root.string);
                ret_val = FALSE;
              }
@@ -4509,7 +4512,7 @@ elf64_alpha_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
                  }
                _bfd_error_handler
                  /* xgettext:c-format */
-                 (_("%B: !samegp reloc against symbol without .prologue: %s"),
+                 (_("%pB: !samegp reloc against symbol without .prologue: %s"),
                   input_bfd, name);
                ret_val = FALSE;
                break;
@@ -4567,7 +4570,7 @@ elf64_alpha_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
                  {
                    _bfd_error_handler
                      /* xgettext:c-format */
-                     (_("%B: unhandled dynamic relocation against %s"),
+                     (_("%pB: unhandled dynamic relocation against %s"),
                       input_bfd,
                       h->root.root.root.string);
                    ret_val = FALSE;
@@ -4593,7 +4596,7 @@ elf64_alpha_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
            {
              _bfd_error_handler
                /* xgettext:c-format */
-               (_("%B: pc-relative relocation against dynamic symbol %s"),
+               (_("%pB: pc-relative relocation against dynamic symbol %s"),
                 input_bfd, h->root.root.root.string);
              ret_val = FALSE;
            }
@@ -4602,7 +4605,7 @@ elf64_alpha_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
            {
              _bfd_error_handler
                /* xgettext:c-format */
-               (_("%B: pc-relative relocation against undefined weak symbol %s"),
+               (_("%pB: pc-relative relocation against undefined weak symbol %s"),
                 input_bfd, h->root.root.root.string);
              ret_val = FALSE;
            }
@@ -4668,7 +4671,7 @@ elf64_alpha_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
            {
              _bfd_error_handler
                /* xgettext:c-format */
-               (_("%B: dtp-relative relocation against dynamic symbol %s"),
+               (_("%pB: dtp-relative relocation against dynamic symbol %s"),
                 input_bfd, h->root.root.root.string);
              ret_val = FALSE;
            }
@@ -4685,7 +4688,7 @@ elf64_alpha_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
            {
              _bfd_error_handler
                /* xgettext:c-format */
-               (_("%B: TLS local exec code cannot be linked into shared objects"),
+               (_("%pB: TLS local exec code cannot be linked into shared objects"),
                input_bfd);
              ret_val = FALSE;
            }
@@ -4693,7 +4696,7 @@ elf64_alpha_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
            {
              _bfd_error_handler
                /* xgettext:c-format */
-               (_("%B: tp-relative relocation against dynamic symbol %s"),
+               (_("%pB: tp-relative relocation against dynamic symbol %s"),
                 input_bfd, h->root.root.root.string);
              ret_val = FALSE;
            }
@@ -4721,7 +4724,7 @@ elf64_alpha_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
                  BFD_ASSERT (elf_hash_table (info)->tls_sec != NULL);
                  if (r_type == R_ALPHA_GOTDTPREL)
                    value -= dtp_base;
-                 else if (!bfd_link_pic (info))
+                 else if (bfd_link_executable (info))
                    value -= tp_base;
                  else
                    {
@@ -5495,7 +5498,7 @@ static const struct elf_size_info alpha_elf_size_info =
 #define elf_backend_size_dynamic_sections \
   elf64_alpha_size_dynamic_sections
 #define elf_backend_omit_section_dynsym \
-  ((bfd_boolean (*) (bfd *, struct bfd_link_info *, asection *)) bfd_true)
+  _bfd_elf_omit_section_dynsym_all
 #define elf_backend_relocate_section \
   elf64_alpha_relocate_section
 #define elf_backend_finish_dynamic_symbol \