aboutsummaryrefslogtreecommitdiff
path: root/gas/read.c
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2021-07-07 10:25:41 +0100
committerNick Clifton <nickc@redhat.com>2021-07-07 10:25:41 +0100
commitffa5352c0c0f735541e69fe6d9a192d82e7d418c (patch)
treedf3fd83903f3eb8ae28975107352d5f657583729 /gas/read.c
parent1f00b55dba8ed2c6bec4d263b00d41b0e91edb35 (diff)
downloadgdb-ffa5352c0c0f735541e69fe6d9a192d82e7d418c.zip
gdb-ffa5352c0c0f735541e69fe6d9a192d82e7d418c.tar.gz
gdb-ffa5352c0c0f735541e69fe6d9a192d82e7d418c.tar.bz2
Fix problems translating messages when a percentage sign appears at the end of a string.
PR 28051 gas * config/tc-i386.c (offset_in_range): Reformat error messages in order to fix problems when translating. (md_assemble): Likewise. * messages.c (as_internal_value_out_of_range): Likewise. * read.c (emit_expr_with_reloc): Likewise. * testsuite/gas/all/overflow.l Change expected output format. * po/gas.pot: Regenerate. bfd * coff-rs6000.c (xcoff_reloc_type_tls): Reformat error messages in order to fix problems when translating. * cofflink.c (_bfd_coff_write_global_sym): Likewise. * elfnn-aarch64.c (_bfd_aarch64_erratum_843419_branch_to_stub): Likewise. * po/bfd.pot: Regenerate.
Diffstat (limited to 'gas/read.c')
-rw-r--r--gas/read.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/gas/read.c b/gas/read.c
index 935b1fa..ea9261e 100644
--- a/gas/read.c
+++ b/gas/read.c
@@ -4546,9 +4546,14 @@ emit_expr_with_reloc (expressionS *exp,
use = get & unmask;
if ((get & mask) != 0 && (-get & mask) != 0)
{
+ char get_buf[128];
+ char use_buf[128];
+
+ /* These buffers help to ease the translation of the warning message. */
+ sprintf_vma (get_buf, get);
+ sprintf_vma (use_buf, use);
/* Leading bits contain both 0s & 1s. */
- as_warn (_("value 0x%" BFD_VMA_FMT "x truncated to 0x%" BFD_VMA_FMT "x"),
- get, use);
+ as_warn (_("value 0x%s truncated to 0x%s"), get_buf, use_buf);
}
/* Put bytes in right order. */
md_number_to_chars (p, use, (int) nbytes);