RISC-V: Fix ld-elf/pr22269* testcases.
[deliverable/binutils-gdb.git] / bfd / elfxx-mips.c
index 50d9c07431eb6a4a19c2df308b1b8d0cce72e0a4..e349e8aa7726fdb2b8ee966152171842b71d9de3 100644 (file)
@@ -1,5 +1,5 @@
 /* MIPS-specific support for ELF
-   Copyright (C) 1993-2017 Free Software Foundation, Inc.
+   Copyright (C) 1993-2018 Free Software Foundation, Inc.
 
    Most of the information added by Ian Lance Taylor, Cygnus Support,
    <ian@cygnus.com>.
@@ -881,7 +881,7 @@ static bfd *reldyn_sorting_bfd;
   _bfd_elf_add_dynamic_entry (info, tag, val)
 
 #define MIPS_ELF_RTYPE_TO_HOWTO(abfd, rtype, rela)                     \
-  (get_elf_backend_data (abfd)->elf_backend_mips_rtype_to_howto (rtype, rela))
+  (get_elf_backend_data (abfd)->elf_backend_mips_rtype_to_howto (abfd, rtype, rela))
 
 /* The name of the dynamic relocation section.  */
 #define MIPS_ELF_REL_DYN_NAME(INFO) \
@@ -2903,12 +2903,6 @@ mips_elf_output_extsym (struct mips_elf_link_hash_entry *h, void *data)
              h->esym.asym.value =
                mips_elf_hash_table (einfo->info)->procedure_count;
            }
-         else if (strcmp (name, "_gp_disp") == 0 && ! NEWABI_P (einfo->abfd))
-           {
-             h->esym.asym.sc = scAbs;
-             h->esym.asym.st = stLabel;
-             h->esym.asym.value = elf_gp (einfo->abfd);
-           }
          else
            h->esym.asym.sc = scUndefined;
        }
@@ -5478,12 +5472,18 @@ mips_elf_calculate_relocation (bfd *abfd, bfd *input_bfd,
        }
       else
        {
+         bfd_boolean reject_undefined
+           = (info->unresolved_syms_in_objects == RM_GENERATE_ERROR
+              || ELF_ST_VISIBILITY (h->root.other) != STV_DEFAULT);
+
          (*info->callbacks->undefined_symbol)
            (info, h->root.root.root.string, input_bfd,
-            input_section, relocation->r_offset,
-            (info->unresolved_syms_in_objects == RM_GENERATE_ERROR)
-            || ELF_ST_VISIBILITY (h->root.other));
-         return bfd_reloc_undefined;
+            input_section, relocation->r_offset, reject_undefined);
+
+         if (reject_undefined)
+           return bfd_reloc_undefined;
+
+         symbol = 0;
        }
 
       target_is_16_bit_code_p = ELF_ST_IS_MIPS16 (h->root.other);
@@ -6373,7 +6373,7 @@ mips_elf_perform_relocation (struct bfd_link_info *info,
          : opcode == 0x1d)
        {
          info->callbacks->einfo
-           (_("%X%H: Unsupported JALX to the same ISA mode\n"),
+           (_("%X%H: unsupported JALX to the same ISA mode\n"),
             input_bfd, input_section, relocation->r_offset);
          return TRUE;
        }
@@ -6406,7 +6406,7 @@ mips_elf_perform_relocation (struct bfd_link_info *info,
       if (!ok)
        {
          info->callbacks->einfo
-           (_("%X%H: Unsupported jump between ISA modes; "
+           (_("%X%H: unsupported jump between ISA modes; "
               "consider recompiling with interlinking enabled\n"),
             input_bfd, input_section, relocation->r_offset);
          return TRUE;
@@ -6451,7 +6451,7 @@ mips_elf_perform_relocation (struct bfd_link_info *info,
          if ((addr >> 28) << 28 != (dest >> 28) << 28)
            {
              info->callbacks->einfo
-               (_("%X%H: Cannot convert branch between ISA modes "
+               (_("%X%H: cannot convert branch between ISA modes "
                   "to JALX: relocation out of range\n"),
                 input_bfd, input_section, relocation->r_offset);
              return TRUE;
@@ -6463,7 +6463,7 @@ mips_elf_perform_relocation (struct bfd_link_info *info,
       else if (!mips_elf_hash_table (info)->ignore_branch_isa)
        {
          info->callbacks->einfo
-           (_("%X%H: Unsupported branch between ISA modes\n"),
+           (_("%X%H: unsupported branch between ISA modes\n"),
             input_bfd, input_section, relocation->r_offset);
          return TRUE;
        }
@@ -7102,9 +7102,19 @@ _bfd_mips_elf_section_processing (bfd *abfd, Elf_Internal_Shdr *hdr)
     {
       bfd_byte buf[4];
 
-      BFD_ASSERT (hdr->sh_size == sizeof (Elf32_External_RegInfo));
       BFD_ASSERT (hdr->contents == NULL);
 
+      if (hdr->sh_size != sizeof (Elf32_External_RegInfo))
+       {
+         _bfd_error_handler
+           (_("%pB: incorrect `.reginfo' section size; "
+              "expected %" PRIu64 ", got %" PRIu64),
+            abfd, (uint64_t) sizeof (Elf32_External_RegInfo),
+            (uint64_t) hdr->sh_size);
+         bfd_set_error (bfd_error_bad_value);
+         return FALSE;
+       }
+
       if (bfd_seek (abfd,
                    hdr->sh_offset + sizeof (Elf32_External_RegInfo) - 4,
                    SEEK_SET) != 0)
@@ -7141,7 +7151,7 @@ _bfd_mips_elf_section_processing (bfd *abfd, Elf_Internal_Shdr *hdr)
            {
              _bfd_error_handler
                /* xgettext:c-format */
-               (_("%B: Warning: bad `%s' option size %u smaller than"
+               (_("%pB: warning: bad `%s' option size %u smaller than"
                   " its header"),
                abfd, MIPS_ELF_OPTIONS_SECTION_NAME (abfd), intopt.size);
              break;
@@ -7376,7 +7386,7 @@ _bfd_mips_elf_section_from_shdr (bfd *abfd,
            {
              _bfd_error_handler
                /* xgettext:c-format */
-               (_("%B: Warning: bad `%s' option size %u smaller than"
+               (_("%pB: warning: bad `%s' option size %u smaller than"
                   " its header"),
                abfd, MIPS_ELF_OPTIONS_SECTION_NAME (abfd), intopt.size);
              break;
@@ -8132,7 +8142,7 @@ _bfd_mips_elf_check_relocs (bfd *abfd, struct bfd_link_info *info,
        {
          _bfd_error_handler
            /* xgettext:c-format */
-           (_("%B: Warning: cannot determine the target function for"
+           (_("%pB: warning: cannot determine the target function for"
               " stub section `%s'"),
             abfd, name);
          bfd_set_error (bfd_error_bad_value);
@@ -8258,7 +8268,7 @@ _bfd_mips_elf_check_relocs (bfd *abfd, struct bfd_link_info *info,
        {
          _bfd_error_handler
            /* xgettext:c-format */
-           (_("%B: Warning: cannot determine the target function for"
+           (_("%pB: warning: cannot determine the target function for"
               " stub section `%s'"),
             abfd, name);
          bfd_set_error (bfd_error_bad_value);
@@ -8390,7 +8400,7 @@ _bfd_mips_elf_check_relocs (bfd *abfd, struct bfd_link_info *info,
        {
          _bfd_error_handler
            /* xgettext:c-format */
-           (_("%B: Malformed reloc detected for section %s"),
+           (_("%pB: malformed reloc detected for section %s"),
             abfd, name);
          bfd_set_error (bfd_error_bad_value);
          return FALSE;
@@ -8462,8 +8472,8 @@ _bfd_mips_elf_check_relocs (bfd *abfd, struct bfd_link_info *info,
            {
              _bfd_error_handler
                /* xgettext:c-format */
-               (_("%B: GOT reloc at %#Lx not expected in executables"),
-                abfd, rel->r_offset);
+               (_("%pB: GOT reloc at %#" PRIx64 " not expected in executables"),
+                abfd, (uint64_t) rel->r_offset);
              bfd_set_error (bfd_error_bad_value);
              return FALSE;
            }
@@ -8600,8 +8610,8 @@ _bfd_mips_elf_check_relocs (bfd *abfd, struct bfd_link_info *info,
            {
              _bfd_error_handler
                /* xgettext:c-format */
-               (_("%B: CALL16 reloc at %#Lx not against global symbol"),
-                abfd, rel->r_offset);
+               (_("%pB: CALL16 reloc at %#" PRIx64 " not against global symbol"),
+                abfd, (uint64_t) rel->r_offset);
              bfd_set_error (bfd_error_bad_value);
              return FALSE;
            }
@@ -8886,7 +8896,7 @@ _bfd_mips_elf_check_relocs (bfd *abfd, struct bfd_link_info *info,
              howto = MIPS_ELF_RTYPE_TO_HOWTO (abfd, r_type, FALSE);
              _bfd_error_handler
                /* xgettext:c-format */
-               (_("%B: relocation %s against `%s' can not be used"
+               (_("%pB: relocation %s against `%s' can not be used"
                   " when making a shared object; recompile with -fPIC"),
                 abfd, howto->name,
                 (h) ? h->root.root.string : "a local symbol");
@@ -9284,12 +9294,19 @@ _bfd_mips_elf_always_size_sections (bfd *output_bfd,
   /* The .reginfo section has a fixed size.  */
   sect = bfd_get_section_by_name (output_bfd, ".reginfo");
   if (sect != NULL)
-    bfd_set_section_size (output_bfd, sect, sizeof (Elf32_External_RegInfo));
+    {
+      bfd_set_section_size (output_bfd, sect, sizeof (Elf32_External_RegInfo));
+      sect->flags |= SEC_FIXED_SIZE | SEC_HAS_CONTENTS;
+    }
 
   /* The .MIPS.abiflags section has a fixed size.  */
   sect = bfd_get_section_by_name (output_bfd, ".MIPS.abiflags");
   if (sect != NULL)
-    bfd_set_section_size (output_bfd, sect, sizeof (Elf_External_ABIFlags_v0));
+    {
+      bfd_set_section_size (output_bfd, sect,
+                           sizeof (Elf_External_ABIFlags_v0));
+      sect->flags |= SEC_FIXED_SIZE | SEC_HAS_CONTENTS;
+    }
 
   hti.info = info;
   hti.output_bfd = output_bfd;
@@ -10143,10 +10160,10 @@ _bfd_mips_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
                                                 sec);
                      _bfd_error_handler
                        /* xgettext:c-format */
-                       (_("%B: Can't find matching LO16 reloc against `%s'"
-                          " for %s at %#Lx in section `%A'"),
+                       (_("%pB: can't find matching LO16 reloc against `%s'"
+                          " for %s at %#" PRIx64 " in section `%pA'"),
                         input_bfd, name,
-                        howto->name, rel->r_offset, input_section);
+                        howto->name, (uint64_t) rel->r_offset, input_section);
                    }
                }
              else
@@ -10302,16 +10319,16 @@ _bfd_mips_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
          msg = NULL;
          if (jal_reloc_p (howto->type))
            msg = (cross_mode_jump_p
-                  ? _("Cannot convert a jump to JALX "
+                  ? _("cannot convert a jump to JALX "
                       "for a non-word-aligned address")
                   : (howto->type == R_MIPS16_26
-                     ? _("Jump to a non-word-aligned address")
-                     : _("Jump to a non-instruction-aligned address")));
+                     ? _("jump to a non-word-aligned address")
+                     : _("jump to a non-instruction-aligned address")));
          else if (b_reloc_p (howto->type))
            msg = (cross_mode_jump_p
-                  ? _("Cannot convert a branch to JALX "
+                  ? _("cannot convert a branch to JALX "
                       "for a non-word-aligned address")
-                  : _("Branch to a non-instruction-aligned address"));
+                  : _("branch to a non-instruction-aligned address"));
          else if (aligned_pcrel_reloc_p (howto->type))
            msg = _("PC-relative load from unaligned address");
          if (msg)
@@ -10687,11 +10704,11 @@ _bfd_mips_elf_finish_dynamic_symbol (bfd *output_bfd,
                {
                  _bfd_error_handler
                    /* xgettext:c-format */
-                   (_("%B: `%A' offset of %Ld from `%A' "
+                   (_("%pB: `%pA' offset of %" PRId64 " from `%pA' "
                       "beyond the range of ADDIUPC"),
                     output_bfd,
                     htab->root.sgotplt->output_section,
-                    gotpc_offset,
+                    (int64_t) gotpc_offset,
                     htab->root.splt->output_section);
                  bfd_set_error (bfd_error_no_error);
                  return FALSE;
@@ -10953,12 +10970,6 @@ _bfd_mips_elf_finish_dynamic_symbol (bfd *output_bfd,
       sym->st_info = ELF_ST_INFO (STB_GLOBAL, STT_SECTION);
       sym->st_value = 1;
     }
-  else if (strcmp (name, "_gp_disp") == 0 && ! NEWABI_P (output_bfd))
-    {
-      sym->st_shndx = SHN_ABS;
-      sym->st_info = ELF_ST_INFO (STB_GLOBAL, STT_SECTION);
-      sym->st_value = elf_gp (output_bfd);
-    }
   else if (SGI_COMPAT (output_bfd))
     {
       if (strcmp (name, mips_elf_dynsym_rtproc_names[0]) == 0
@@ -11255,10 +11266,11 @@ mips_finish_exec_plt (bfd *output_bfd, struct bfd_link_info *info)
        {
          _bfd_error_handler
            /* xgettext:c-format */
-           (_("%B: `%A' offset of %Ld from `%A' beyond the range of ADDIUPC"),
+           (_("%pB: `%pA' offset of %" PRId64 " from `%pA' "
+              "beyond the range of ADDIUPC"),
             output_bfd,
             htab->root.sgotplt->output_section,
-            gotpc_offset,
+            (int64_t) gotpc_offset,
             htab->root.splt->output_section);
          bfd_set_error (bfd_error_no_error);
          return FALSE;
@@ -12657,13 +12669,29 @@ _bfd_mips_elf_find_nearest_line (bfd *abfd, asymbol **symbols,
                                     line_ptr, discriminator_ptr,
                                     dwarf_debug_sections,
                                     ABI_64_P (abfd) ? 8 : 0,
-                                    &elf_tdata (abfd)->dwarf2_find_line_info))
-    return TRUE;
+                                    &elf_tdata (abfd)->dwarf2_find_line_info)
+      || _bfd_dwarf1_find_nearest_line (abfd, symbols, section, offset,
+                                       filename_ptr, functionname_ptr,
+                                       line_ptr))
+    {
+      /* PR 22789: If the function name or filename was not found through
+        the debug information, then try an ordinary lookup instead.  */
+      if ((functionname_ptr != NULL && *functionname_ptr == NULL)
+         || (filename_ptr != NULL && *filename_ptr == NULL))
+       {
+         /* Do not override already discovered names.  */
+         if (functionname_ptr != NULL && *functionname_ptr != NULL)
+           functionname_ptr = NULL;
 
-  if (_bfd_dwarf1_find_nearest_line (abfd, symbols, section, offset,
-                                    filename_ptr, functionname_ptr,
-                                    line_ptr))
-    return TRUE;
+         if (filename_ptr != NULL && *filename_ptr != NULL)
+           filename_ptr = NULL;
+
+         _bfd_elf_find_function (abfd, symbols, section, offset,
+                                 filename_ptr, functionname_ptr);
+       }
+
+      return TRUE;
+    }
 
   msec = bfd_get_section_by_name (abfd, ".mdebug");
   if (msec != NULL)
@@ -14118,7 +14146,7 @@ update_mips_abiflags_isa (bfd *abfd, Elf_Internal_ABIFlags_v0 *abiflags)
     default:
       _bfd_error_handler
        /* xgettext:c-format */
-       (_("%B: Unknown architecture %s"),
+       (_("%pB: unknown architecture %s"),
         abfd, bfd_printable_name (abfd));
     }
 
@@ -14341,6 +14369,7 @@ _bfd_mips_elf_final_link (bfd *abfd, struct bfd_link_info *info)
              bfd *input_bfd;
              Elf32_External_RegInfo ext;
              Elf32_RegInfo sub;
+             bfd_size_type sz;
 
              if (p->type != bfd_indirect_link_order)
                {
@@ -14352,8 +14381,11 @@ _bfd_mips_elf_final_link (bfd *abfd, struct bfd_link_info *info)
              input_section = p->u.indirect.section;
              input_bfd = input_section->owner;
 
+             sz = (input_section->size < sizeof (ext)
+                   ? input_section->size : sizeof (ext));
+             memset (&ext, 0, sizeof (ext));
              if (! bfd_get_section_contents (input_bfd, input_section,
-                                             &ext, 0, sizeof ext))
+                                             &ext, 0, sz))
                return FALSE;
 
              bfd_mips_elf32_swap_reginfo_in (input_bfd, &ext, &sub);
@@ -14365,7 +14397,7 @@ _bfd_mips_elf_final_link (bfd *abfd, struct bfd_link_info *info)
              reginfo.ri_cprmask[3] |= sub.ri_cprmask[3];
 
              /* ri_gp_value is set by the function
-                mips_elf32_section_processing when the section is
+                `_bfd_mips_elf_section_processing' when the section is
                 finally written out.  */
 
              /* Hack: reset the SEC_HAS_CONTENTS flag so that
@@ -14648,7 +14680,7 @@ _bfd_mips_elf_final_link (bfd *abfd, struct bfd_link_info *info)
            {
              _bfd_error_handler
                /* xgettext:c-format */
-               (_("%B: illegal section name `%A'"), abfd, o);
+               (_("%pB: illegal section name `%pA'"), abfd, o);
              bfd_set_error (bfd_error_nonrepresentable_section);
              return FALSE;
            }
@@ -14925,7 +14957,7 @@ mips_elf_merge_obj_e_flags (bfd *ibfd, struct bfd_link_info *info)
       != ((old_flags & (EF_MIPS_PIC | EF_MIPS_CPIC)) != 0))
     {
       _bfd_error_handler
-       (_("%B: warning: linking abicalls files with non-abicalls files"),
+       (_("%pB: warning: linking abicalls files with non-abicalls files"),
         ibfd);
       ok = TRUE;
     }
@@ -14942,7 +14974,7 @@ mips_elf_merge_obj_e_flags (bfd *ibfd, struct bfd_link_info *info)
   if (mips_32bit_flags_p (old_flags) != mips_32bit_flags_p (new_flags))
     {
       _bfd_error_handler
-       (_("%B: linking 32-bit code with 64-bit code"),
+       (_("%pB: linking 32-bit code with 64-bit code"),
         ibfd);
       ok = FALSE;
     }
@@ -14974,7 +15006,7 @@ mips_elf_merge_obj_e_flags (bfd *ibfd, struct bfd_link_info *info)
          /* The ISAs aren't compatible.  */
          _bfd_error_handler
            /* xgettext:c-format */
-           (_("%B: linking %s module with previous %s modules"),
+           (_("%pB: linking %s module with previous %s modules"),
             ibfd,
             bfd_printable_name (ibfd),
             bfd_printable_name (obfd));
@@ -14998,7 +15030,7 @@ mips_elf_merge_obj_e_flags (bfd *ibfd, struct bfd_link_info *info)
        {
          _bfd_error_handler
            /* xgettext:c-format */
-           (_("%B: ABI mismatch: linking %s module with previous %s modules"),
+           (_("%pB: ABI mismatch: linking %s module with previous %s modules"),
             ibfd,
             elf_mips_abi_name (ibfd),
             elf_mips_abi_name (obfd));
@@ -15023,7 +15055,7 @@ mips_elf_merge_obj_e_flags (bfd *ibfd, struct bfd_link_info *info)
        {
          _bfd_error_handler
            /* xgettext:c-format */
-           (_("%B: ASE mismatch: linking %s module with previous %s modules"),
+           (_("%pB: ASE mismatch: linking %s module with previous %s modules"),
             ibfd,
             m16_mis ? "MIPS16" : "microMIPS",
             m16_mis ? "microMIPS" : "MIPS16");
@@ -15040,7 +15072,7 @@ mips_elf_merge_obj_e_flags (bfd *ibfd, struct bfd_link_info *info)
   if ((new_flags & EF_MIPS_NAN2008) != (old_flags & EF_MIPS_NAN2008))
     {
       /* xgettext:c-format */
-      _bfd_error_handler (_("%B: linking %s module with previous %s modules"),
+      _bfd_error_handler (_("%pB: linking %s module with previous %s modules"),
                          ibfd,
                          (new_flags & EF_MIPS_NAN2008
                           ? "-mnan=2008" : "-mnan=legacy"),
@@ -15055,7 +15087,7 @@ mips_elf_merge_obj_e_flags (bfd *ibfd, struct bfd_link_info *info)
   if ((new_flags & EF_MIPS_FP64) != (old_flags & EF_MIPS_FP64))
     {
       /* xgettext:c-format */
-      _bfd_error_handler (_("%B: linking %s module with previous %s modules"),
+      _bfd_error_handler (_("%pB: linking %s module with previous %s modules"),
                          ibfd,
                          (new_flags & EF_MIPS_FP64
                           ? "-mfp64" : "-mfp32"),
@@ -15071,7 +15103,7 @@ mips_elf_merge_obj_e_flags (bfd *ibfd, struct bfd_link_info *info)
     {
       /* xgettext:c-format */
       _bfd_error_handler
-       (_("%B: uses different e_flags (%#x) fields than previous modules "
+       (_("%pB: uses different e_flags (%#x) fields than previous modules "
           "(%#x)"),
         ibfd, new_flags, old_flags);
       ok = FALSE;
@@ -15157,20 +15189,20 @@ mips_elf_merge_obj_attributes (bfd *ibfd, struct bfd_link_info *info)
          if (!out_string && !in_string)
            /* xgettext:c-format */
            _bfd_error_handler
-             (_("Warning: %B uses unknown floating point ABI %d "
-                "(set by %B), %B uses unknown floating point ABI %d"),
+             (_("warning: %pB uses unknown floating point ABI %d "
+                "(set by %pB), %pB uses unknown floating point ABI %d"),
               obfd, out_fp, abi_fp_bfd, ibfd, in_fp);
          else if (!out_string)
            _bfd_error_handler
              /* xgettext:c-format */
-             (_("Warning: %B uses unknown floating point ABI %d "
-                "(set by %B), %B uses %s"),
+             (_("warning: %pB uses unknown floating point ABI %d "
+                "(set by %pB), %pB uses %s"),
               obfd, out_fp, abi_fp_bfd, ibfd, in_string);
          else if (!in_string)
            _bfd_error_handler
              /* xgettext:c-format */
-             (_("Warning: %B uses %s (set by %B), "
-                "%B uses unknown floating point ABI %d"),
+             (_("warning: %pB uses %s (set by %pB), "
+                "%pB uses unknown floating point ABI %d"),
               obfd, out_string, abi_fp_bfd, ibfd, in_fp);
          else
            {
@@ -15183,7 +15215,7 @@ mips_elf_merge_obj_attributes (bfd *ibfd, struct bfd_link_info *info)
                in_string = "-mhard-float";
              _bfd_error_handler
                /* xgettext:c-format */
-               (_("Warning: %B uses %s (set by %B), %B uses %s"),
+               (_("warning: %pB uses %s (set by %pB), %pB uses %s"),
                 obfd, out_string, abi_fp_bfd, ibfd, in_string);
            }
        }
@@ -15202,8 +15234,8 @@ mips_elf_merge_obj_attributes (bfd *ibfd, struct bfd_link_info *info)
          case Val_GNU_MIPS_ABI_MSA_128:
            _bfd_error_handler
              /* xgettext:c-format */
-             (_("Warning: %B uses %s (set by %B), "
-                "%B uses unknown MSA ABI %d"),
+             (_("warning: %pB uses %s (set by %pB), "
+                "%pB uses unknown MSA ABI %d"),
               obfd, "-mmsa", abi_msa_bfd,
               ibfd, in_attr[Tag_GNU_MIPS_ABI_MSA].i);
            break;
@@ -15214,8 +15246,8 @@ mips_elf_merge_obj_attributes (bfd *ibfd, struct bfd_link_info *info)
              case Val_GNU_MIPS_ABI_MSA_128:
                _bfd_error_handler
                  /* xgettext:c-format */
-                 (_("Warning: %B uses unknown MSA ABI %d "
-                    "(set by %B), %B uses %s"),
+                 (_("warning: %pB uses unknown MSA ABI %d "
+                    "(set by %pB), %pB uses %s"),
                     obfd, out_attr[Tag_GNU_MIPS_ABI_MSA].i,
                   abi_msa_bfd, ibfd, "-mmsa");
                  break;
@@ -15223,8 +15255,8 @@ mips_elf_merge_obj_attributes (bfd *ibfd, struct bfd_link_info *info)
              default:
                _bfd_error_handler
                  /* xgettext:c-format */
-                 (_("Warning: %B uses unknown MSA ABI %d "
-                    "(set by %B), %B uses unknown MSA ABI %d"),
+                 (_("warning: %pB uses unknown MSA ABI %d "
+                    "(set by %pB), %pB uses unknown MSA ABI %d"),
                   obfd, out_attr[Tag_GNU_MIPS_ABI_MSA].i,
                   abi_msa_bfd, ibfd, in_attr[Tag_GNU_MIPS_ABI_MSA].i);
                break;
@@ -15285,7 +15317,7 @@ _bfd_mips_elf_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info)
   if (! _bfd_generic_verify_endian_match (ibfd, info))
     {
       _bfd_error_handler
-       (_("%B: endianness incompatible with that of the selected emulation"),
+       (_("%pB: endianness incompatible with that of the selected emulation"),
         ibfd);
       return FALSE;
     }
@@ -15299,7 +15331,7 @@ _bfd_mips_elf_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info)
   if (strcmp (bfd_get_target (ibfd), bfd_get_target (obfd)) != 0)
     {
       _bfd_error_handler
-       (_("%B: ABI is incompatible with that of the selected emulation"),
+       (_("%pB: ABI is incompatible with that of the selected emulation"),
         ibfd);
       return FALSE;
     }
@@ -15351,27 +15383,27 @@ _bfd_mips_elf_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info)
       if (LEVEL_REV (in_abiflags.isa_level, in_abiflags.isa_rev)
          < LEVEL_REV (abiflags.isa_level, abiflags.isa_rev))
        _bfd_error_handler
-         (_("%B: warning: Inconsistent ISA between e_flags and "
+         (_("%pB: warning: inconsistent ISA between e_flags and "
             ".MIPS.abiflags"), ibfd);
       if (abiflags.fp_abi != Val_GNU_MIPS_ABI_FP_ANY
          && in_abiflags.fp_abi != abiflags.fp_abi)
        _bfd_error_handler
-         (_("%B: warning: Inconsistent FP ABI between .gnu.attributes and "
+         (_("%pB: warning: inconsistent FP ABI between .gnu.attributes and "
             ".MIPS.abiflags"), ibfd);
       if ((in_abiflags.ases & abiflags.ases) != abiflags.ases)
        _bfd_error_handler
-         (_("%B: warning: Inconsistent ASEs between e_flags and "
+         (_("%pB: warning: inconsistent ASEs between e_flags and "
             ".MIPS.abiflags"), ibfd);
       /* The isa_ext is allowed to be an extension of what can be inferred
         from e_flags.  */
       if (!mips_mach_extends_p (bfd_mips_isa_ext_mach (abiflags.isa_ext),
                                bfd_mips_isa_ext_mach (in_abiflags.isa_ext)))
        _bfd_error_handler
-         (_("%B: warning: Inconsistent ISA extensions between e_flags and "
+         (_("%pB: warning: inconsistent ISA extensions between e_flags and "
             ".MIPS.abiflags"), ibfd);
       if (in_abiflags.flags2 != 0)
        _bfd_error_handler
-         (_("%B: warning: Unexpected flag in the flags2 field of "
+         (_("%pB: warning: unexpected flag in the flags2 field of "
             ".MIPS.abiflags (0x%lx)"), ibfd,
           in_abiflags.flags2);
     }
This page took 0.036144 seconds and 4 git commands to generate.