unrecognized/unsupported reloc message
[deliverable/binutils-gdb.git] / bfd / elf32-i386.c
index 4988359b2a3928d5c1fd83422c800fa820ab48d9..32b84e6323c043448c8853f8236552f1ac11ef3d 100644 (file)
@@ -29,9 +29,6 @@
 
 #include "elf/i386.h"
 
-static bfd_boolean elf32_i386_copy_solaris_special_section_fields
-  (const bfd *, bfd *, const Elf_Internal_Shdr *, Elf_Internal_Shdr *);
-
 static reloc_howto_type elf_howto_table[]=
 {
   HOWTO(R_386_NONE, 0, 3, 0, FALSE, 0, complain_overflow_dont,
@@ -384,8 +381,8 @@ elf_i386_rtype_to_howto (bfd *abfd, unsigned r_type)
          >= R_386_vt - R_386_ext2))
     {
       /* xgettext:c-format */
-      _bfd_error_handler (_("%B: invalid relocation type %d"),
-                         abfd, (int) r_type);
+      _bfd_error_handler (_("%pB: unsupported relocation type %#x"),
+                         abfd, r_type);
       indx = R_386_NONE;
     }
   /* PR 17512: file: 0f67f69d.  */
@@ -1159,10 +1156,10 @@ elf_i386_tls_transition (struct bfd_link_info *info, bfd *abfd,
 
       _bfd_error_handler
        /* xgettext:c-format */
-       (_("%B: TLS transition from %s to %s against `%s' at %#Lx "
-          "in section `%A' failed"),
+       (_("%pB: TLS transition from %s to %s against `%s'"
+          " at %#" PRIx64 " in section `%pA' failed"),
         abfd, from->name, to->name, name,
-        rel->r_offset, sec);
+        (uint64_t) rel->r_offset, sec);
       bfd_set_error (bfd_error_bad_value);
       return FALSE;
     }
@@ -1250,7 +1247,7 @@ elf_i386_convert_load_reloc (bfd *abfd, Elf_Internal_Shdr *symtab_hdr,
 
       _bfd_error_handler
        /* xgettext:c-format */
-       (_("%B: direct GOT relocation R_386_GOT32X against `%s' without base"
+       (_("%pB: direct GOT relocation R_386_GOT32X against `%s' without base"
           " register can not be used when making a shared object"),
         abfd, name);
       return FALSE;
@@ -1510,7 +1507,7 @@ elf_i386_check_relocs (bfd *abfd,
       if (r_symndx >= NUM_SHDR_ENTRIES (symtab_hdr))
        {
          /* xgettext:c-format */
-         _bfd_error_handler (_("%B: bad symbol index: %d"),
+         _bfd_error_handler (_("%pB: bad symbol index: %d"),
                              abfd, r_symndx);
          goto error_return;
        }
@@ -1707,7 +1704,7 @@ elf_i386_check_relocs (bfd *abfd,
                                             NULL);
                    _bfd_error_handler
                      /* xgettext:c-format */
-                     (_("%B: `%s' accessed both as normal and "
+                     (_("%pB: `%s' accessed both as normal and "
                         "thread local symbol"),
                       abfd, name);
                    bfd_set_error (bfd_error_bad_value);
@@ -1779,7 +1776,7 @@ do_relocation:
                    {
                      _bfd_error_handler
                        /* xgettext:c-format */
-                       (_("%B: unsupported non-PIC call to IFUNC `%s'"),
+                       (_("%pB: unsupported non-PIC call to IFUNC `%s'"),
                         abfd, h->root.root.string);
                      bfd_set_error (bfd_error_bad_value);
                      goto error_return;
@@ -1815,7 +1812,7 @@ do_relocation:
 
          size_reloc = FALSE;
 do_size:
-         if (NEED_DYNAMIC_RELOCATION_P (info, h, sec, r_type,
+         if (NEED_DYNAMIC_RELOCATION_P (info, FALSE, h, sec, r_type,
                                         R_386_32))
            {
              struct elf_dyn_relocs *p;
@@ -2357,7 +2354,7 @@ bad_ifunc_reloc:
                                         NULL);
              _bfd_error_handler
                /* xgettext:c-format */
-               (_("%B: relocation %s against STT_GNU_IFUNC "
+               (_("%pB: relocation %s against STT_GNU_IFUNC "
                   "symbol `%s' isn't supported"), input_bfd,
                 howto->name, name);
              bfd_set_error (bfd_error_bad_value);
@@ -2390,7 +2387,7 @@ do_ifunc_pointer:
 
                  if (POINTER_LOCAL_IFUNC_P (info, h))
                    {
-                     info->callbacks->minfo (_("Local IFUNC function `%s' in %B\n"),
+                     info->callbacks->minfo (_("Local IFUNC function `%s' in %pB\n"),
                                              h->root.root.string,
                                              h->root.u.def.section->owner);
 
@@ -2605,7 +2602,7 @@ disallow_got32:
 
                  _bfd_error_handler
                    /* xgettext:c-format */
-                   (_("%B: direct GOT relocation %s against `%s'"
+                   (_("%pB: direct GOT relocation %s against `%s'"
                       " without base register can not be used"
                       " when making a shared object"),
                     input_bfd, howto->name, name);
@@ -2655,7 +2652,7 @@ disallow_got32:
 
                  _bfd_error_handler
                    /* xgettext:c-format */
-                   (_("%B: relocation R_386_GOTOFF against undefined %s"
+                   (_("%pB: relocation R_386_GOTOFF against undefined %s"
                       " `%s' can not be used when making a shared object"),
                     input_bfd, v, h->root.root.string);
                  bfd_set_error (bfd_error_bad_value);
@@ -2668,7 +2665,7 @@ disallow_got32:
                {
                  _bfd_error_handler
                    /* xgettext:c-format */
-                   (_("%B: relocation R_386_GOTOFF against protected %s"
+                   (_("%pB: relocation R_386_GOTOFF against protected %s"
                       " `%s' can not be used when making a shared object"),
                     input_bfd,
                     h->type == STT_FUNC ? "function" : "data",
@@ -3445,10 +3442,10 @@ disallow_got32:
        {
          _bfd_error_handler
            /* xgettext:c-format */
-           (_("%B(%A+%#Lx): unresolvable %s relocation against symbol `%s'"),
+           (_("%pB(%pA+%#" PRIx64 "): unresolvable %s relocation against symbol `%s'"),
             input_bfd,
             input_section,
-            rel->r_offset,
+            (uint64_t) rel->r_offset,
             howto->name,
             h->root.root.string);
          return FALSE;
@@ -3485,9 +3482,9 @@ check_relocation_error:
            {
              _bfd_error_handler
                /* xgettext:c-format */
-               (_("%B(%A+%#Lx): reloc against `%s': error %d"),
+               (_("%pB(%pA+%#" PRIx64 "): reloc against `%s': error %d"),
                 input_bfd, input_section,
-                rel->r_offset, name, (int) r);
+                (uint64_t) rel->r_offset, name, (int) r);
              return FALSE;
            }
        }
@@ -3696,7 +3693,7 @@ elf_i386_finish_dynamic_symbol (bfd *output_bfd,
                          + got_offset);
          if (PLT_LOCAL_IFUNC_P (info, h))
            {
-             info->callbacks->minfo (_("Local IFUNC function `%s' in %B\n"),
+             info->callbacks->minfo (_("Local IFUNC function `%s' in %pB\n"),
                                      h->root.root.string,
                                      h->root.u.def.section->owner);
 
@@ -3835,7 +3832,7 @@ elf_i386_finish_dynamic_symbol (bfd *output_bfd,
                }
              if (SYMBOL_REFERENCES_LOCAL_P (info, h))
                {
-                 info->callbacks->minfo (_("Local IFUNC function `%s' in %B\n"),
+                 info->callbacks->minfo (_("Local IFUNC function `%s' in %pB\n"),
                                          h->root.root.string,
                                          h->root.u.def.section->owner);
 
@@ -4193,6 +4190,7 @@ elf_i386_get_synthetic_symtab (bfd *abfd,
   switch (get_elf_x86_backend_data (abfd)->target_os)
     {
     case is_normal:
+    case is_solaris:
       non_lazy_plt = &elf_i386_non_lazy_plt;
       lazy_ibt_plt = &elf_i386_lazy_ibt_plt;
       non_lazy_ibt_plt = &elf_i386_non_lazy_ibt_plt;
@@ -4348,11 +4346,11 @@ static bfd *
 elf_i386_link_setup_gnu_properties (struct bfd_link_info *info)
 {
   struct elf_x86_init_table init_table;
-  const struct elf_backend_data *bed;
 
   switch (get_elf_x86_backend_data (info->output_bfd)->target_os)
     {
     case is_normal:
+    case is_solaris:
       init_table.plt0_pad_byte = 0x0;
       init_table.lazy_plt = &elf_i386_lazy_plt;
       init_table.non_lazy_plt = &elf_i386_non_lazy_plt;
@@ -4378,11 +4376,6 @@ elf_i386_link_setup_gnu_properties (struct bfd_link_info *info)
   init_table.r_info = elf32_r_info;
   init_table.r_sym = elf32_r_sym;
 
-  bed = get_elf_backend_data (info->output_bfd);
-  init_table.need_global_offset_table
-    = (bed->elf_backend_copy_special_section_fields
-       == elf32_i386_copy_solaris_special_section_fields);
-
   return _bfd_x86_elf_link_setup_gnu_properties (info, &init_table);
 }
 
@@ -4475,6 +4468,14 @@ elf_i386_fbsd_post_process_headers (bfd *abfd, struct bfd_link_info *info)
 #undef TARGET_LITTLE_NAME
 #define        TARGET_LITTLE_NAME              "elf32-i386-sol2"
 
+static const struct elf_x86_backend_data elf_i386_solaris_arch_bed =
+  {
+    is_solaris                         /* os */
+  };
+
+#undef elf_backend_arch_data
+#define        elf_backend_arch_data           &elf_i386_solaris_arch_bed
+
 #undef elf_backend_post_process_headers
 
 /* Restore default: we cannot use ELFOSABI_SOLARIS, otherwise ELFOSABI_NONE
@@ -4601,6 +4602,9 @@ elf32_iamcu_elf_object_p (bfd *abfd)
 #undef ELF_MACHINE_CODE
 #define        ELF_MACHINE_CODE                EM_IAMCU
 
+#undef elf_backend_arch_data
+#define        elf_backend_arch_data           &elf_i386_arch_bed
+
 #undef ELF_OSABI
 
 #undef  elf32_bed
This page took 0.027394 seconds and 4 git commands to generate.