[binutils-gdb/binutils-2_46-branch] Hard-coded plural in readelf.c

Alan Modra amodra@sourceware.org
Tue Jan 27 23:54:27 GMT 2026


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=921ff77c6dd23fa9f2b9769a1837e2f7c9c071c9

commit 921ff77c6dd23fa9f2b9769a1837e2f7c9c071c9
Author: Alan Modra <amodra@gmail.com>
Date:   Mon Jan 26 08:32:35 2026 +1030

    Hard-coded plural in readelf.c
    
            PR 33837
            * readelf.c (process_got_section_contents): Use ngettext.
    
    (cherry picked from commit 795593e667b00334e7b3fa8b11ea0e844e01b5af)

Diff:
---
 binutils/readelf.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/binutils/readelf.c b/binutils/readelf.c
index cca294c968c..f50d9281ea4 100644
--- a/binutils/readelf.c
+++ b/binutils/readelf.c
@@ -21589,12 +21589,12 @@ process_got_section_contents (Filedata * filedata)
 	  }
 
 	entries = section->sh_size / entsz;
-	if (entries == 1)
-	  printf (_("\nGlobal Offset Table '%s' contains 1 entry:\n"),
-		  name);
-	else
-	  printf (_("\nGlobal Offset Table '%s' contains %" PRIu64
-		    " entries:\n"), name, entries);
+	printf (ngettext ("\nGlobal Offset Table '%s' contains %" PRIu64
+			  " entry:\n",
+			  "\nGlobal Offset Table '%s' contains %" PRIu64
+			  " entries:\n",
+			  entries),
+		name, entries);
 
 	uint64_t g;


More information about the Binutils-cvs mailing list