diff options
author | rea <rea@FreeBSD.org> | 2013-10-29 04:25:49 +0000 |
---|---|---|
committer | rea <rea@FreeBSD.org> | 2013-10-29 04:25:49 +0000 |
commit | a17f5000ca5235d24f8c7a6ae4e8566b8c0d7148 (patch) | |
tree | 6a456053fa27c0e764a9f86908f04579520858f7 /contrib/binutils | |
parent | 4ed6282bfdf4f34d7d02e56e7bb2c73739a739de (diff) | |
download | FreeBSD-src-a17f5000ca5235d24f8c7a6ae4e8566b8c0d7148.zip FreeBSD-src-a17f5000ca5235d24f8c7a6ae4e8566b8c0d7148.tar.gz |
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
Diffstat (limited to 'contrib/binutils')
-rw-r--r-- | contrib/binutils/bfd/elf32-score.c | 2 | ||||
-rw-r--r-- | contrib/binutils/bfd/elflink.c | 4 | ||||
-rw-r--r-- | contrib/binutils/bfd/po/bfd.pot | 4 |
3 files changed, 5 insertions, 5 deletions
diff --git a/contrib/binutils/bfd/elf32-score.c b/contrib/binutils/bfd/elf32-score.c index 070177b..2c8a633 100644 --- a/contrib/binutils/bfd/elf32-score.c +++ b/contrib/binutils/bfd/elf32-score.c @@ -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; } diff --git a/contrib/binutils/bfd/elflink.c b/contrib/binutils/bfd/elflink.c index f5c989d..e80f8ee 100644 --- a/contrib/binutils/bfd/elflink.c +++ b/contrib/binutils/bfd/elflink.c @@ -4357,8 +4357,8 @@ elf_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info) 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; } diff --git a/contrib/binutils/bfd/po/bfd.pot b/contrib/binutils/bfd/po/bfd.pot index a01ee37..e528238 100644 --- a/contrib/binutils/bfd/po/bfd.pot +++ b/contrib/binutils/bfd/po/bfd.pot @@ -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 |