Author: rea (ports committer)
Date: Tue Oct 29 04:25:49 2013
New Revision: 257302
URL: http://svnweb.freebsd.org/changeset/base/257302

Log:
  binutils/bfd: fix printf-like format strings for "bfd *" arguments
  
  There is a special format argument '%B' that directly handles values
  of type 'bfd *', they must be used instead of '%s'.  Manifestations
  of this bug can be seen in ld(1) error messages, for example,
    http://lists.freebsd.org/pipermail/freebsd-current/2013-August/043580.html
    http://lists.freebsd.org/pipermail/freebsd-current/2013-October/045404.html
  
  Approved by:  dim
  MFC after:    2 weeks

Modified:
  head/contrib/binutils/bfd/elf32-score.c
  head/contrib/binutils/bfd/elflink.c
  head/contrib/binutils/bfd/po/bfd.pot

Modified: head/contrib/binutils/bfd/elf32-score.c
==============================================================================
--- head/contrib/binutils/bfd/elf32-score.c     Tue Oct 29 04:03:00 2013        
(r257301)
+++ head/contrib/binutils/bfd/elf32-score.c     Tue Oct 29 04:25:49 2013        
(r257302)
@@ -2546,7 +2546,7 @@ _bfd_score_elf_check_relocs (bfd *abfd,
        }
       else if (r_symndx >= extsymoff + NUM_SHDR_ENTRIES (symtab_hdr))
         {
-          (*_bfd_error_handler) (_("%s: Malformed reloc detected for section 
%s"), abfd, name);
+          (*_bfd_error_handler) (_("%B: Malformed reloc detected for section 
%s"), abfd, name);
           bfd_set_error (bfd_error_bad_value);
           return FALSE;
         }

Modified: head/contrib/binutils/bfd/elflink.c
==============================================================================
--- head/contrib/binutils/bfd/elflink.c Tue Oct 29 04:03:00 2013        
(r257301)
+++ head/contrib/binutils/bfd/elflink.c Tue Oct 29 04:25:49 2013        
(r257302)
@@ -4357,8 +4357,8 @@ elf_link_add_object_symbols (bfd *abfd, 
              if ((elf_dyn_lib_class (abfd) & DYN_NO_NEEDED) != 0)
                {
                  (*_bfd_error_handler)
-                   (_("%s: invalid DSO for symbol `%s' definition"),
-                    abfd, name);
+                   (_("%B: invalid DSO for symbol `%s' definition"),
+                   abfd, name);
                  bfd_set_error (bfd_error_bad_value);
                  goto error_free_vers;
                }

Modified: head/contrib/binutils/bfd/po/bfd.pot
==============================================================================
--- head/contrib/binutils/bfd/po/bfd.pot        Tue Oct 29 04:03:00 2013        
(r257301)
+++ head/contrib/binutils/bfd/po/bfd.pot        Tue Oct 29 04:25:49 2013        
(r257302)
@@ -1572,7 +1572,7 @@ msgstr ""
 
 #: elf32-score.c:2549
 #, c-format
-msgid "%s: Malformed reloc detected for section %s"
+msgid "%B: Malformed reloc detected for section %s"
 msgstr ""
 
 #: elf32-score.c:2600
@@ -2440,7 +2440,7 @@ msgstr ""
 
 #: elflink.c:4309
 #, c-format
-msgid "%s: invalid DSO for symbol `%s' definition"
+msgid "%B: invalid DSO for symbol `%s' definition"
 msgstr ""
 
 #: elflink.c:5535
_______________________________________________
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to