aboutsummaryrefslogtreecommitdiff
path: root/gas/config
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2017-11-06 19:44:02 +1030
committerAlan Modra <amodra@gmail.com>2017-11-07 17:00:37 +1030
commit992a06eea4acfb674659a0ce19b5fb9c985e9bc1 (patch)
tree2bba8aca0d9368b3c03be75b3d1345f491f85e72 /gas/config
parentf3ce9b3a00229e5c6087180a74bf533d0e5201f3 (diff)
downloadbinutils-992a06eea4acfb674659a0ce19b5fb9c985e9bc1.zip
binutils-992a06eea4acfb674659a0ce19b5fb9c985e9bc1.tar.gz
binutils-992a06eea4acfb674659a0ce19b5fb9c985e9bc1.tar.bz2
gas and ld pluralization fixes
gas/ * as.c (main): Properly pluralize messages. * frags.c (frag_grow): Likewise. * read.c (emit_expr_with_reloc, emit_expr_fix): Likewise. (parse_bitfield_cons): Likewise. * write.c (fixup_segment, compress_debug, write_contents): Likewise. (relax_segment): Likewise. * config/tc-arm.c (s_arm_elf_cons): Likewise. * config/tc-cr16.c (l_cons): Likewise. * config/tc-i370.c (i370_elf_cons): Likewise. * config/tc-m68k.c (m68k_elf_cons): Likewise. * config/tc-msp430.c (msp430_operands): Likewise. * config/tc-s390.c (s390_elf_cons, s390_literals): Likewise. * config/tc-mcore.c (md_apply_fix): Likewise. * config/tc-tic54x.c (md_assemble): Likewise. * config/tc-xtensa.c (xtensa_elf_cons): Likewise. (xg_expand_assembly_insn): Likewise. * config/xtensa-relax.c (build_transition): Likewise. ld/ * ldlang.c (lang_size_sections_1): Properly pluralize messages. (lang_check_section_addresses): Likewise.
Diffstat (limited to 'gas/config')
-rw-r--r--gas/config/tc-arm.c4
-rw-r--r--gas/config/tc-cr16.c7
-rw-r--r--gas/config/tc-i370.c4
-rw-r--r--gas/config/tc-m68k.c4
-rw-r--r--gas/config/tc-mcore.c5
-rw-r--r--gas/config/tc-msp430.c4
-rw-r--r--gas/config/tc-s390.c8
-rw-r--r--gas/config/tc-tic54x.c17
-rw-r--r--gas/config/tc-xtensa.c12
-rw-r--r--gas/config/xtensa-relax.c4
10 files changed, 52 insertions, 17 deletions
diff --git a/gas/config/tc-arm.c b/gas/config/tc-arm.c
index f52cf7f..86d6ea5 100644
--- a/gas/config/tc-arm.c
+++ b/gas/config/tc-arm.c
@@ -3552,7 +3552,9 @@ s_arm_elf_cons (int nbytes)
}
if (size > nbytes)
- as_bad (_("%s relocations do not fit in %d bytes"),
+ as_bad (ngettext ("%s relocations do not fit in %d byte",
+ "%s relocations do not fit in %d bytes",
+ nbytes),
howto->name, nbytes);
else
{
diff --git a/gas/config/tc-cr16.c b/gas/config/tc-cr16.c
index 4205a77..fce52c1 100644
--- a/gas/config/tc-cr16.c
+++ b/gas/config/tc-cr16.c
@@ -178,7 +178,12 @@ l_cons (int nbytes)
if ((width = exp.X_add_number) >
(unsigned int)(BITS_PER_CHAR * nbytes))
{
- as_warn (_("field width %lu too big to fit in %d bytes: truncated to %d bits"), width, nbytes, (BITS_PER_CHAR * nbytes));
+ as_warn (ngettext ("field width %lu too big to fit in %d"
+ " byte: truncated to %d bits",
+ "field width %lu too big to fit in %d"
+ " bytes: truncated to %d bits",
+ nbytes),
+ width, nbytes, (BITS_PER_CHAR * nbytes));
width = BITS_PER_CHAR * nbytes;
} /* Too big. */
diff --git a/gas/config/tc-i370.c b/gas/config/tc-i370.c
index 995aa4c..a6838b1 100644
--- a/gas/config/tc-i370.c
+++ b/gas/config/tc-i370.c
@@ -680,7 +680,9 @@ i370_elf_cons (int nbytes) /* 1=.byte, 2=.word, 4=.long. */
int size = bfd_get_reloc_size (reloc_howto);
if (size > nbytes)
- as_bad (_("%s relocations do not fit in %d bytes\n"),
+ as_bad (ngettext ("%s relocations do not fit in %u byte",
+ "%s relocations do not fit in %u bytes",
+ nbytes),
reloc_howto->name, nbytes);
else
{
diff --git a/gas/config/tc-m68k.c b/gas/config/tc-m68k.c
index 04e57f4..cba07e2 100644
--- a/gas/config/tc-m68k.c
+++ b/gas/config/tc-m68k.c
@@ -8068,7 +8068,9 @@ m68k_elf_cons (int nbytes /* 4=.long */)
if (size > nbytes)
{
- as_bad (_("%s relocations do not fit in %d bytes\n"),
+ as_bad (ngettext ("%s relocations do not fit in %u byte",
+ "%s relocations do not fit in %u bytes",
+ nbytes),
reloc_howto->name, nbytes);
}
else
diff --git a/gas/config/tc-mcore.c b/gas/config/tc-mcore.c
index 2ffb241..21fcc69 100644
--- a/gas/config/tc-mcore.c
+++ b/gas/config/tc-mcore.c
@@ -1947,7 +1947,10 @@ md_apply_fix (fixS * fixP,
case BFD_RELOC_MCORE_PCREL_IMM11BY2:
if ((val & 1) != 0)
as_bad_where (file, fixP->fx_line,
- _("odd distance branch (0x%lx bytes)"), (long) val);
+ ngettext ("odd distance branch (0x%lx byte)",
+ "odd distance branch (0x%lx bytes)",
+ (long) val),
+ (long) val);
val /= 2;
if (((val & ~0x3ff) != 0) && ((val | 0x3ff) != -1))
as_bad_where (file, fixP->fx_line,
diff --git a/gas/config/tc-msp430.c b/gas/config/tc-msp430.c
index 6f3acdf..a56e7f2 100644
--- a/gas/config/tc-msp430.c
+++ b/gas/config/tc-msp430.c
@@ -2601,7 +2601,9 @@ msp430_operands (struct msp430_opcode_s * opcode, char * line)
&& opcode->insn_opnumb
&& (!*line || *line == '\n'))
{
- as_bad (_("instruction %s requires %d operand(s)"),
+ as_bad (ngettext ("instruction %s requires %d operand",
+ "instruction %s requires %d operands",
+ opcode->insn_opnumb),
opcode->name, opcode->insn_opnumb);
return 0;
}
diff --git a/gas/config/tc-s390.c b/gas/config/tc-s390.c
index 84b2e27..48a2f9b 100644
--- a/gas/config/tc-s390.c
+++ b/gas/config/tc-s390.c
@@ -1206,7 +1206,9 @@ s390_elf_cons (int nbytes /* 1=.byte, 2=.word, 4=.long */)
{
size = bfd_get_reloc_size (reloc_howto);
if (size > nbytes)
- as_bad (_("%s relocations do not fit in %d bytes"),
+ as_bad (ngettext ("%s relocations do not fit in %d byte",
+ "%s relocations do not fit in %d bytes",
+ nbytes),
reloc_howto->name, nbytes);
where = frag_more (nbytes);
md_number_to_chars (where, 0, size);
@@ -1860,7 +1862,9 @@ s390_literals (int ignore ATTRIBUTE_UNUSED)
char *where;
if (size > lpe->nbytes)
- as_bad (_("%s relocations do not fit in %d bytes"),
+ as_bad (ngettext ("%s relocations do not fit in %d byte",
+ "%s relocations do not fit in %d bytes",
+ lpe->nbytes),
reloc_howto->name, lpe->nbytes);
where = frag_more (lpe->nbytes);
md_number_to_chars (where, 0, size);
diff --git a/gas/config/tc-tic54x.c b/gas/config/tc-tic54x.c
index f7dc0f5..ea6c57f 100644
--- a/gas/config/tc-tic54x.c
+++ b/gas/config/tc-tic54x.c
@@ -4843,8 +4843,11 @@ md_assemble (char *line)
{
if (words > delay_slots)
{
- as_bad (_("Instruction does not fit in available delay "
- "slots (%d-word insn, %d slots left)"),
+ as_bad (ngettext ("Instruction does not fit in available "
+ "delay slots (%d-word insn, %d slot left)",
+ "Instruction does not fit in available "
+ "delay slots (%d-word insn, %d slots left)",
+ delay_slots),
words, delay_slots);
delay_slots = 0;
return;
@@ -4915,9 +4918,13 @@ md_assemble (char *line)
{
if (words > delay_slots)
{
- as_warn (_("Instruction does not fit in available delay "
- "slots (%d-word insn, %d slots left). "
- "Resulting behavior is undefined."),
+ as_warn (ngettext ("Instruction does not fit in available "
+ "delay slots (%d-word insn, %d slot left). "
+ "Resulting behavior is undefined.",
+ "Instruction does not fit in available "
+ "delay slots (%d-word insn, %d slots left). "
+ "Resulting behavior is undefined.",
+ delay_slots),
words, delay_slots);
delay_slots = 0;
return;
diff --git a/gas/config/tc-xtensa.c b/gas/config/tc-xtensa.c
index 836b550..a73abd0 100644
--- a/gas/config/tc-xtensa.c
+++ b/gas/config/tc-xtensa.c
@@ -1660,7 +1660,9 @@ xtensa_elf_cons (int nbytes)
as_bad (_("opcode-specific %s relocation used outside "
"an instruction"), reloc_howto->name);
else if (nbytes != (int) bfd_get_reloc_size (reloc_howto))
- as_bad (_("%s relocations do not fit in %d bytes"),
+ as_bad (ngettext ("%s relocations do not fit in %d byte",
+ "%s relocations do not fit in %d bytes",
+ nbytes),
reloc_howto->name, nbytes);
else if (reloc == BFD_RELOC_XTENSA_TLS_FUNC
|| reloc == BFD_RELOC_XTENSA_TLS_ARG
@@ -4014,14 +4016,18 @@ xg_expand_assembly_insn (IStack *istack, TInsn *orig_insn)
orig_insn->opcode);
if (orig_insn->ntok < noperands)
{
- as_bad (_("found %d operands for '%s': Expected %d"),
+ as_bad (ngettext ("found %d operand for '%s': Expected %d",
+ "found %d operands for '%s': Expected %d",
+ orig_insn->ntok),
orig_insn->ntok,
xtensa_opcode_name (xtensa_default_isa, orig_insn->opcode),
noperands);
return TRUE;
}
if (orig_insn->ntok > noperands)
- as_warn (_("found too many (%d) operands for '%s': Expected %d"),
+ as_warn (ngettext ("found %d operand for '%s': Expected %d",
+ "found %d operands for '%s': Expected %d",
+ orig_insn->ntok),
orig_insn->ntok,
xtensa_opcode_name (xtensa_default_isa, orig_insn->opcode),
noperands);
diff --git a/gas/config/xtensa-relax.c b/gas/config/xtensa-relax.c
index 82f1d03..97939e1 100644
--- a/gas/config/xtensa-relax.c
+++ b/gas/config/xtensa-relax.c
@@ -1764,7 +1764,9 @@ build_transition (insn_pattern *initial_insn,
/* Check for the right number of ops. */
if (xtensa_opcode_num_operands (isa, bi->opcode)
!= (int) operand_count)
- as_fatal (_("opcode '%s': replacement does not have %d ops"),
+ as_fatal (ngettext ("opcode '%s': replacement does not have %d op",
+ "opcode '%s': replacement does not have %d ops",
+ xtensa_opcode_num_operands (isa, bi->opcode)),
opcode_name,
xtensa_opcode_num_operands (isa, bi->opcode));
}