diff options
author | Nick Clifton <nickc@redhat.com> | 2021-07-12 14:14:33 +0100 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2021-07-12 14:14:33 +0100 |
commit | f253158fafd213c209a5b2a56e22b53760a7132d (patch) | |
tree | 01b82729f213e63fa3d402edd931c88bd7c3f8f1 | |
parent | c33be6de41550bf38ab08cd73936c4ea164bc736 (diff) | |
download | fsf-binutils-gdb-f253158fafd213c209a5b2a56e22b53760a7132d.zip fsf-binutils-gdb-f253158fafd213c209a5b2a56e22b53760a7132d.tar.gz fsf-binutils-gdb-f253158fafd213c209a5b2a56e22b53760a7132d.tar.bz2 |
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.
-rw-r--r-- | binutils/readelf.c | 56 |
1 files changed, 25 insertions, 31 deletions
diff --git a/binutils/readelf.c b/binutils/readelf.c index 24ff069..5682837 100644 --- a/binutils/readelf.c +++ b/binutils/readelf.c @@ -10943,28 +10943,19 @@ 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"), - filedata->file_name, - filedata->dynamic_addr, - (unsigned long) filedata->dynamic_nent); + if (filedata->is_separate) + 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,24 +17286,27 @@ display_csky_attribute (unsigned char * p, break; case Tag_CSKY_FPU_ROUNDING: READ_ULEB (val, p, end); - if (val == 1) { - printf (" Tag_CSKY_FPU_ROUNDING:\t"); - printf ("Needed\n"); - } + 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) { - printf (" Tag_CSKY_FPU_DENORMAL:\t"); - printf ("Needed\n"); - } + 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) { - printf (" Tag_CSKY_FPU_Exception:\t"); - printf ("Needed\n"); - } + if (val == 1) + { + printf (" Tag_CSKY_FPU_Exception:\t"); + printf ("Needed\n"); + } break; case Tag_CSKY_FPU_NUMBER_MODULE: printf (" Tag_CSKY_FPU_NUMBER_MODULE:\t"); |