Fix a translation problem for the text generated by readelf at the start of a dump of a dynamic section.

PR 28072
binutils * readelf.c (process_dynamic_section): Use ngettext to help with translation of header text.
This commit is contained in:
Nick Clifton
2021-07-12 14:14:33 +01:00
parent c33be6de41
commit f253158faf

View File

@ -10942,30 +10942,21 @@ the .dynstr section doesn't match the DT_STRTAB and DT_STRSZ tags\n"));
}
if (do_dynamic && filedata->dynamic_addr)
{
if (filedata->dynamic_nent == 1)
{
if (filedata->is_separate)
printf (_("\nIn linked file '%s' the dynamic section at offset 0x%lx contains 1 entry:\n"),
filedata->file_name,
filedata->dynamic_addr);
else
printf (_("\nDynamic section at offset 0x%lx contains 1 entry:\n"),
filedata->dynamic_addr);
}
else
{
if (filedata->is_separate)
printf (_("\nIn linked file '%s' the dynamic section at offset 0x%lx contains %lu entries:\n"),
printf (ngettext ("\nIn linked file '%s' the dynamic section at offset 0x%lx contains %lu entry:\n",
"\nIn linked file '%s' the dynamic section at offset 0x%lx contains %lu entries:\n",
(unsigned long) filedata->dynamic_nent),
filedata->file_name,
filedata->dynamic_addr,
(unsigned long) filedata->dynamic_nent);
else
printf (_("\nDynamic section at offset 0x%lx contains %lu entries:\n"),
printf (ngettext ("\nDynamic section at offset 0x%lx contains %lu entry:\n",
"\nDynamic section at offset 0x%lx contains %lu entries:\n",
(unsigned long) filedata->dynamic_nent),
filedata->dynamic_addr,
(unsigned long) filedata->dynamic_nent);
}
}
if (do_dynamic)
printf (_(" Tag Type Name/Value\n"));
@ -17295,21 +17286,24 @@ display_csky_attribute (unsigned char * p,
break;
case Tag_CSKY_FPU_ROUNDING:
READ_ULEB (val, p, end);
if (val == 1) {
if (val == 1)
{
printf (" Tag_CSKY_FPU_ROUNDING:\t");
printf ("Needed\n");
}
break;
case Tag_CSKY_FPU_DENORMAL:
READ_ULEB (val, p, end);
if (val == 1) {
if (val == 1)
{
printf (" Tag_CSKY_FPU_DENORMAL:\t");
printf ("Needed\n");
}
break;
case Tag_CSKY_FPU_Exception:
READ_ULEB (val, p, end);
if (val == 1) {
if (val == 1)
{
printf (" Tag_CSKY_FPU_Exception:\t");
printf ("Needed\n");
}