x86: Treat relocation against IFUNC symbol as FUNC
[deliverable/binutils-gdb.git] / bfd / elf32-sh64.c
index 04c443e5b1936130f04d9b3362f192077064c42b..b63584195ff720b39a5231ed291af184233be52a 100644 (file)
@@ -1,5 +1,5 @@
 /* SuperH SH64-specific support for 32-bit ELF
-   Copyright (C) 2000-2016 Free Software Foundation, Inc.
+   Copyright (C) 2000-2018 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
@@ -87,7 +87,7 @@ static void sh64_find_section_for_address
 #define elf_backend_link_output_symbol_hook \
        sh64_elf_link_output_symbol_hook
 #define elf_backend_merge_symbol_attribute     sh64_elf_merge_symbol_attribute
-#define elf_backend_final_write_processing     sh64_elf_final_write_processing
+#define elf_backend_final_write_processing     sh64_elf_final_write_processing
 #define elf_backend_section_from_shdr          sh64_backend_section_from_shdr
 #define elf_backend_special_sections           sh64_elf_special_sections
 #define elf_backend_section_flags              sh64_elf_section_flags
@@ -222,17 +222,16 @@ sh64_elf_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 = _("%pB: compiled as 32-bit object and %pB 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 = _("%pB: compiled as 64-bit object and %pB is 32-bit");
       else
        /* xgettext:c-format */
-       msg = _("%s: object size does not match that of target %s");
+       msg = _("%pB: object size does not match that of target %pB");
 
-      _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;
     }
@@ -249,8 +248,9 @@ sh64_elf_merge_private_data (bfd *ibfd, struct bfd_link_info *info)
   else if ((new_flags & EF_SH_MACH_MASK) != EF_SH5)
     {
       _bfd_error_handler
-       ("%s: uses non-SH64 instructions while previous modules use SH64 instructions",
-        bfd_get_filename (ibfd));
+       ("%pB: uses non-SH64 instructions while previous modules"
+        " use SH64 instructions",
+        ibfd);
       bfd_set_error (bfd_error_bad_value);
       return FALSE;
     }
@@ -452,8 +452,7 @@ sh64_elf_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));
+           (_("%pB: encountered datalabel symbol in input"), abfd);
          bfd_set_error (bfd_error_bad_value);
          return FALSE;
        }
@@ -548,8 +547,8 @@ shmedia_prepare_reloc (struct bfd_link_info *info, bfd *abfd,
            if ((insn & SHMEDIA_PTB_BIT) != 0)
              {
                _bfd_error_handler
-                 (_("%s: GAS error: unexpected PTB insn with R_SH_PT_16"),
-                  bfd_get_filename (input_section->owner));
+                 (_("%pB: GAS error: unexpected PTB insn with R_SH_PT_16"),
+                  input_section->owner);
                return FALSE;
              }
 
@@ -598,9 +597,10 @@ shmedia_prepare_reloc (struct bfd_link_info *info, bfd *abfd,
     {
       _bfd_error_handler
        /* xgettext:c-format */
-       (_("%B: error: unaligned relocation type %d at %08x reloc %p\n"),
-        input_section->owner, ELF32_R_TYPE (rel->r_info),
-        (unsigned) rel->r_offset, relocation);
+       (_("%pB: error: unaligned relocation type %d "
+          "at %#" PRIx64 " reloc %#" PRIx64),
+        input_section->owner, (int) ELF32_R_TYPE (rel->r_info),
+        (uint64_t) rel->r_offset, (uint64_t) *relocation);
       return FALSE;
     }
 
@@ -674,8 +674,7 @@ sh64_elf_final_write_processing (bfd *abfd,
        {
          bfd_set_error (bfd_error_file_truncated);
          _bfd_error_handler
-           (_("%s: could not write out added .cranges entries"),
-            bfd_get_filename (abfd));
+           (_("%pB: could not write out added .cranges entries"), abfd);
        }
     }
 
@@ -734,8 +733,7 @@ sh64_elf_final_write_processing (bfd *abfd,
            {
              bfd_set_error (bfd_error_file_truncated);
              _bfd_error_handler
-               (_("%s: could not write out sorted .cranges entries"),
-                bfd_get_filename (abfd));
+               (_("%pB: could not write out sorted .cranges entries"), abfd);
            }
        }
     }
@@ -765,7 +763,7 @@ sh64_elf_merge_symbol_attribute (struct elf_link_hash_entry *h,
 static const struct bfd_elf_special_section sh64_elf_special_sections[] =
 {
   { STRING_COMMA_LEN (".cranges"), 0, SHT_PROGBITS, 0 },
-  { NULL,                       0, 0, 0,            0 }
+  { NULL,                      0, 0, 0,            0 }
 };
 
 #undef TARGET_BIG_SYM
This page took 0.026636 seconds and 4 git commands to generate.