Create new common/pathstuff.[ch]
[deliverable/binutils-gdb.git] / bfd / elf32-spu.c
index d2de2c2ce5fe17daeafffebb4cf02eb9c86ec316..c3bfbbdd031f00e0d75f15951560d0dbd4c30957 100644 (file)
@@ -1,6 +1,6 @@
 /* SPU specific support for 32-bit ELF
 
-   Copyright (C) 2006-2017 Free Software Foundation, Inc.
+   Copyright (C) 2006-2018 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
@@ -145,8 +145,8 @@ spu_elf_bfd_to_reloc_type (bfd_reloc_code_real_type code)
     }
 }
 
-static void
-spu_elf_info_to_howto (bfd *abfd ATTRIBUTE_UNUSED,
+static bfd_boolean
+spu_elf_info_to_howto (bfd *abfd,
                       arelent *cache_ptr,
                       Elf_Internal_Rela *dst)
 {
@@ -157,12 +157,13 @@ spu_elf_info_to_howto (bfd *abfd ATTRIBUTE_UNUSED,
   if (r_type >= R_SPU_max)
     {
       /* xgettext:c-format */
-      _bfd_error_handler (_("%B: unrecognised SPU reloc number: %d"),
+      _bfd_error_handler (_("%pB: unsupported relocation type %#x"),
                          abfd, r_type);
       bfd_set_error (bfd_error_bad_value);
-      r_type = R_SPU_NONE;
+      return FALSE;
     }
   cache_ptr->howto = &elf_howto_table[(int) r_type];
+  return TRUE;
 }
 
 static reloc_howto_type *
@@ -723,16 +724,16 @@ spu_elf_find_overlays (struct bfd_link_info *info)
 
              if ((s->vma - vma_start) & (htab->params->line_size - 1))
                {
-                 info->callbacks->einfo (_("%X%P: overlay section %A "
-                                           "does not start on a cache line.\n"),
+                 info->callbacks->einfo (_("%X%P: overlay section %pA "
+                                           "does not start on a cache line\n"),
                                          s);
                  bfd_set_error (bfd_error_bad_value);
                  return 0;
                }
              else if (s->size > htab->params->line_size)
                {
-                 info->callbacks->einfo (_("%X%P: overlay section %A "
-                                           "is larger than a cache line.\n"),
+                 info->callbacks->einfo (_("%X%P: overlay section %pA "
+                                           "is larger than a cache line\n"),
                                          s);
                  bfd_set_error (bfd_error_bad_value);
                  return 0;
@@ -751,8 +752,8 @@ spu_elf_find_overlays (struct bfd_link_info *info)
          s = alloc_sec[i];
          if (s->vma < ovl_end)
            {
-             info->callbacks->einfo (_("%X%P: overlay section %A "
-                                       "is not in cache area.\n"),
+             info->callbacks->einfo (_("%X%P: overlay section %pA "
+                                       "is not in cache area\n"),
                                      alloc_sec[i-1]);
              bfd_set_error (bfd_error_bad_value);
              return 0;
@@ -792,9 +793,9 @@ spu_elf_find_overlays (struct bfd_link_info *info)
                  if (s0->vma != s->vma)
                    {
                      /* xgettext:c-format */
-                     info->callbacks->einfo (_("%X%P: overlay sections %A "
-                                               "and %A do not start at the "
-                                               "same address.\n"),
+                     info->callbacks->einfo (_("%X%P: overlay sections %pA "
+                                               "and %pA do not start at the "
+                                               "same address\n"),
                                              s0, s);
                      bfd_set_error (bfd_error_bad_value);
                      return 0;
@@ -1018,7 +1019,7 @@ needs_ovl_stub (struct elf_link_hash_entry *h,
                }
              _bfd_error_handler
                /* xgettext:c-format */
-               (_("warning: call to non-function symbol %s defined in %B"),
+               (_("warning: call to non-function symbol %s defined in %pB"),
                 sym_name, sym_sec->owner);
 
            }
@@ -1368,7 +1369,7 @@ build_stub (struct bfd_link_info *info,
          if (stub_type != br000_ovl_stub
              && lrlive != stub_type - br000_ovl_stub)
            /* xgettext:c-format */
-           info->callbacks->einfo (_("%A:0x%v lrlive .brinfo (%u) differs "
+           info->callbacks->einfo (_("%pA:0x%v lrlive .brinfo (%u) differs "
                                      "from analysis (%u)\n"),
                                    isec, irela->r_offset, lrlive,
                                    stub_type - br000_ovl_stub);
@@ -1900,7 +1901,7 @@ define_ovtab_symbol (struct spu_link_hash_table *htab, const char *name)
   else if (h->root.u.def.section->owner != NULL)
     {
       /* xgettext:c-format */
-      _bfd_error_handler (_("%B is not allowed to define %s"),
+      _bfd_error_handler (_("%pB is not allowed to define %s"),
                          h->root.u.def.section->owner,
                          h->root.root.string);
       bfd_set_error (bfd_error_bad_value);
@@ -2611,7 +2612,7 @@ find_function (asection *sec, bfd_vma offset, struct bfd_link_info *info)
        return &sinfo->fun[mid];
     }
   /* xgettext:c-format */
-  info->callbacks->einfo (_("%A:0x%v not found in function table\n"),
+  info->callbacks->einfo (_("%pA:0x%v not found in function table\n"),
                          sec, offset);
   bfd_set_error (bfd_error_bad_value);
   return NULL;
@@ -2752,8 +2753,8 @@ mark_functions_via_relocs (asection *sec,
                  if (!warned)
                    info->callbacks->einfo
                      /* xgettext:c-format */
-                     (_("%B(%A+0x%v): call to non-code section"
-                        " %B(%A), analysis incomplete\n"),
+                     (_("%pB(%pA+0x%v): call to non-code section"
+                        " %pB(%pA), analysis incomplete\n"),
                       sec->owner, sec, irela->r_offset,
                       sym_sec->owner, sym_sec);
                  warned = TRUE;
@@ -3321,7 +3322,7 @@ remove_cycles (struct function_info *fun,
              const char *f2 = func_name (call->fun);
 
              /* xgettext:c-format */
-             info->callbacks->info (_("Stack analysis will ignore the call "
+             info->callbacks->info (_("stack analysis will ignore the call "
                                       "from %s to %s\n"),
                                     f1, f2);
            }
@@ -4541,7 +4542,7 @@ spu_elf_auto_overlay (struct bfd_link_info *info)
       if (i == base)
        {
          /* xgettext:c-format */
-         info->callbacks->einfo (_("%B:%A%s exceeds overlay size\n"),
+         info->callbacks->einfo (_("%pB:%pA%s exceeds overlay size\n"),
                                  ovly_sections[2 * i]->owner,
                                  ovly_sections[2 * i],
                                  ovly_sections[2 * i + 1] ? " + rodata" : "");
@@ -5040,10 +5041,11 @@ spu_elf_relocate_section (bfd *output_bfd,
        {
          _bfd_error_handler
            /* xgettext:c-format */
-           (_("%B(%s+%#Lx): unresolvable %s relocation against symbol `%s'"),
+           (_("%pB(%s+%#" PRIx64 "): "
+              "unresolvable %s relocation against symbol `%s'"),
             input_bfd,
             bfd_get_section_name (input_bfd, input_section),
-            rel->r_offset,
+            (uint64_t) rel->r_offset,
             howto->name,
             sym_name);
          ret = FALSE;
This page took 0.027432 seconds and 4 git commands to generate.