[PATCH 4/4] src: consistently use _(Str) instead of gettext(Str)

Dmitry V. Levin ldv@altlinux.org
Wed Dec 16 09:54:33 GMT 2020


Make use of the _(Str) macro provided by <config.h>.

The change was made automatically using the following command:
$ git grep -l '\<gettext *(' src |xargs sed -i 's/\<gettext *(/_(/g'

Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
---
 src/ChangeLog     |   2 +
 src/addr2line.c   |   8 +-
 src/ar.c          |  84 ++---
 src/arlib-argp.c  |   2 +-
 src/arlib.c       |   4 +-
 src/elfcmp.c      |  94 ++---
 src/elflint.c     | 728 +++++++++++++++++++-------------------
 src/findtextrel.c |  42 +--
 src/nm.c          |  40 +--
 src/objdump.c     |  30 +-
 src/ranlib.c      |  14 +-
 src/readelf.c     | 876 +++++++++++++++++++++++-----------------------
 src/size.c        |  28 +-
 src/strings.c     |  18 +-
 src/strip.c       | 108 +++---
 15 files changed, 1040 insertions(+), 1038 deletions(-)

diff --git a/src/ChangeLog b/src/ChangeLog
index 27e64384..a7b227db 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,5 +1,7 @@
 2020-12-16  Dmitry V. Levin  <ldv@altlinux.org>
 
+	* *.c: Replace gettext(...) with _(...).
+
 	* unstrip.c (_): Remove.
 
 2020-12-15  Mark Wielaard  <mark@klomp.org>
diff --git a/src/addr2line.c b/src/addr2line.c
index 69d8d995..ea01c1be 100644
--- a/src/addr2line.c
+++ b/src/addr2line.c
@@ -516,7 +516,7 @@ adjust_to_section (const char *name, uintmax_t *addr, Dwfl *dwfl)
   Dwfl_Module *mod = NULL;
   if (dwfl_getmodules (dwfl, &see_one_module, &mod, 0) != 0
       || mod == NULL)
-    error (EXIT_FAILURE, 0, gettext ("Section syntax requires"
+    error (EXIT_FAILURE, 0, _("Section syntax requires"
 				     " exactly one module"));
 
   int nscn = dwfl_module_relocations (mod);
@@ -539,7 +539,7 @@ adjust_to_section (const char *name, uintmax_t *addr, Dwfl *dwfl)
 
 	  if (*addr >= shdr->sh_size)
 	    error (0, 0,
-		   gettext ("offset %#" PRIxMAX " lies outside"
+		   _("offset %#" PRIxMAX " lies outside"
 			    " section '%s'"),
 		   *addr, scn);
 
@@ -629,12 +629,12 @@ handle_address (const char *string, Dwfl *dwfl)
 	  void *arg[3] = { name, &sym, &value };
 	  (void) dwfl_getmodules (dwfl, &find_symbol, arg, 0);
 	  if (arg[0] != NULL)
-	    error (0, 0, gettext ("cannot find symbol '%s'"), name);
+	    error (0, 0, _("cannot find symbol '%s'"), name);
 	  else
 	    {
 	      if (sym.st_size != 0 && addr >= sym.st_size)
 		error (0, 0,
-		       gettext ("offset %#" PRIxMAX " lies outside"
+		       _("offset %#" PRIxMAX " lies outside"
 				" contents of '%s'"),
 		       addr, name);
 	      addr += value;
diff --git a/src/ar.c b/src/ar.c
index 1a8e0d6e..2a17d0d3 100644
--- a/src/ar.c
+++ b/src/ar.c
@@ -177,12 +177,12 @@ main (int argc, char *argv[])
     {
       /* Only valid for certain operations.  */
       if (operation != oper_move && operation != oper_replace)
-	error (1, 0, gettext ("\
+	error (1, 0, _("\
 'a', 'b', and 'i' are only allowed with the 'm' and 'r' options"));
 
       if (remaining == argc)
 	{
-	  error (0, 0, gettext ("\
+	  error (0, 0, _("\
 MEMBER parameter required for 'a', 'b', and 'i' modifiers"));
 	  argp_help (&argp, stderr, ARGP_HELP_USAGE | ARGP_HELP_SEE,
 		     program_invocation_short_name);
@@ -198,12 +198,12 @@ MEMBER parameter required for 'a', 'b', and 'i' modifiers"));
     {
       /* Only valid for certain operations.  */
       if (operation != oper_extract && operation != oper_delete)
-	error (1, 0, gettext ("\
+	error (1, 0, _("\
 'N' is only meaningful with the 'x' and 'd' options"));
 
       if (remaining == argc)
 	{
-	  error (0, 0, gettext ("COUNT parameter required"));
+	  error (0, 0, _("COUNT parameter required"));
 	  argp_help (&argp, stderr, ARGP_HELP_SEE,
 		     program_invocation_short_name);
 	  exit (EXIT_FAILURE);
@@ -215,20 +215,20 @@ MEMBER parameter required for 'a', 'b', and 'i' modifiers"));
 	   && errno == ERANGE)
 	  || instance <= 0
 	  || *endp != '\0')
-	error (1, 0, gettext ("invalid COUNT parameter %s"), argv[remaining]);
+	error (1, 0, _("invalid COUNT parameter %s"), argv[remaining]);
 
       ++remaining;
     }
 
   if ((dont_replace_existing || allow_truncate_fname)
       && unlikely (operation != oper_extract))
-    error (1, 0, gettext ("'%c' is only meaningful with the 'x' option"),
+    error (1, 0, _("'%c' is only meaningful with the 'x' option"),
 	   dont_replace_existing ? 'C' : 'T');
 
   /* There must at least be one more parameter specifying the archive.   */
   if (remaining == argc)
     {
-      error (0, 0, gettext ("archive name required"));
+      error (0, 0, _("archive name required"));
       argp_help (&argp, stderr, ARGP_HELP_SEE, program_invocation_short_name);
       exit (EXIT_FAILURE);
     }
@@ -241,7 +241,7 @@ MEMBER parameter required for 'a', 'b', and 'i' modifiers"));
   switch (operation)
     {
     case oper_none:
-      error (0, 0, gettext ("command option required"));
+      error (0, 0, _("command option required"));
       argp_help (&argp, stderr, ARGP_HELP_STD_ERR,
 		 program_invocation_short_name);
       status = 1;
@@ -292,7 +292,7 @@ parse_opt (int key, char *arg __attribute__ ((unused)),
     case 'x':
       if (operation != oper_none)
 	{
-	  error (0, 0, gettext ("More than one operation specified"));
+	  error (0, 0, _("More than one operation specified"));
 	  argp_help (&argp, stderr, ARGP_HELP_SEE,
 		     program_invocation_short_name);
 	  exit (EXIT_FAILURE);
@@ -386,7 +386,7 @@ open_archive (const char *arfname, int flags, int mode, Elf **elf,
       if (miss_allowed)
 	return -1;
 
-      error (EXIT_FAILURE, errno, gettext ("cannot open archive '%s'"),
+      error (EXIT_FAILURE, errno, _("cannot open archive '%s'"),
 	     arfname);
     }
 
@@ -396,15 +396,15 @@ open_archive (const char *arfname, int flags, int mode, Elf **elf,
 
       *elf = elf_begin (fd, cmd, NULL);
       if (*elf == NULL)
-	error (EXIT_FAILURE, 0, gettext ("cannot open archive '%s': %s"),
+	error (EXIT_FAILURE, 0, _("cannot open archive '%s': %s"),
 	       arfname, elf_errmsg (-1));
 
       if (flags == O_RDONLY && elf_kind (*elf) != ELF_K_AR)
-	error (EXIT_FAILURE, 0, gettext ("%s: not an archive file"), arfname);
+	error (EXIT_FAILURE, 0, _("%s: not an archive file"), arfname);
     }
 
   if (st != NULL && fstat (fd, st) != 0)
-    error (EXIT_FAILURE, errno, gettext ("cannot stat archive '%s'"),
+    error (EXIT_FAILURE, errno, _("cannot stat archive '%s'"),
 	   arfname);
 
   return fd;
@@ -416,7 +416,7 @@ not_found (int argc, char *argv[argc], bool found[argc])
 {
   for (int i = 0; i < argc; ++i)
     if (!found[i])
-      printf (gettext ("no entry %s in archive\n"), argv[i]);
+      printf (_("no entry %s in archive\n"), argv[i]);
 }
 
 
@@ -469,14 +469,14 @@ do_oper_extract (int oper, const char *arfname, char **argv, int argc,
   int fd = open_archive (arfname, O_RDONLY, 0, &elf, NULL, false);
 
   if (hcreate (2 * argc) == 0)
-    error (EXIT_FAILURE, errno, gettext ("cannot create hash table"));
+    error (EXIT_FAILURE, errno, _("cannot create hash table"));
 
   for (int cnt = 0; cnt < argc; ++cnt)
     {
       ENTRY entry = { .key = argv[cnt], .data = &argv[cnt] };
       if (hsearch (entry, ENTER) == NULL)
 	error (EXIT_FAILURE, errno,
-	       gettext ("cannot insert into hash table"));
+	       _("cannot insert into hash table"));
     }
 
   struct stat st;
@@ -484,7 +484,7 @@ do_oper_extract (int oper, const char *arfname, char **argv, int argc,
     {
       if (fstat (fd, &st) != 0)
 	{
-	  error (0, errno, gettext ("cannot stat '%s'"), arfname);
+	  error (0, errno, _("cannot stat '%s'"), arfname);
 	  close (fd);
 	  return 1;
 	}
@@ -586,7 +586,7 @@ do_oper_extract (int oper, const char *arfname, char **argv, int argc,
 	  char *data = elf_rawfile (subelf, &nleft);
 	  if (data == NULL)
 	    {
-	      error (0, 0, gettext ("cannot read content of %s: %s"),
+	      error (0, 0, _("cannot read content of %s: %s"),
 		     arhdr->ar_name, elf_errmsg (-1));
 	      status = 1;
 	      goto next;
@@ -629,7 +629,7 @@ do_oper_extract (int oper, const char *arfname, char **argv, int argc,
 
 		      if (xfd == -1)
 			{
-			  error (0, errno, gettext ("cannot open %.*s"),
+			  error (0, errno, _("cannot open %.*s"),
 				 (int) printlen, arhdr->ar_name);
 			  status = 1;
 			  goto next;
@@ -651,7 +651,7 @@ do_oper_extract (int oper, const char *arfname, char **argv, int argc,
 
 	  if (unlikely (n == -1))
 	    {
-	      error (0, errno, gettext ("failed to write %s"), arhdr->ar_name);
+	      error (0, errno, _("failed to write %s"), arhdr->ar_name);
 	      status = 1;
 	      unlink (tempfname);
 	      close (xfd);
@@ -663,7 +663,7 @@ do_oper_extract (int oper, const char *arfname, char **argv, int argc,
 	      /* Fix up the mode.  */
 	      if (unlikely (fchmod (xfd, arhdr->ar_mode) != 0))
 		{
-		  error (0, errno, gettext ("cannot change mode of %s"),
+		  error (0, errno, _("cannot change mode of %s"),
 			 arhdr->ar_name);
 		  status = 0;
 		}
@@ -679,7 +679,7 @@ do_oper_extract (int oper, const char *arfname, char **argv, int argc,
 		  if (unlikely (futimens (xfd, tv) != 0))
 		    {
 		      error (0, errno,
-			     gettext ("cannot change modification time of %s"),
+			     _("cannot change modification time of %s"),
 			     arhdr->ar_name);
 		      status = 1;
 		    }
@@ -725,7 +725,7 @@ do_oper_extract (int oper, const char *arfname, char **argv, int argc,
 
 		      if (r != 0)
 			{
-			  error (0, errno, gettext ("\
+			  error (0, errno, _("\
 cannot rename temporary file to %.*s"),
 				 printlen, arhdr->ar_name);
 			  unlink (tempfname);
@@ -761,7 +761,7 @@ cannot rename temporary file to %.*s"),
 	  if (unlikely (newfd == -1))
 	    {
 	    nonew:
-	      error (0, errno, gettext ("cannot create new file"));
+	      error (0, errno, _("cannot create new file"));
 	      status = 1;
 	    }
 	  else
@@ -924,14 +924,14 @@ do_oper_delete (const char *arfname, char **argv, int argc,
   int fd = open_archive (arfname, O_RDONLY, 0, &elf, &st, false);
 
   if (hcreate (2 * argc) == 0)
-    error (EXIT_FAILURE, errno, gettext ("cannot create hash table"));
+    error (EXIT_FAILURE, errno, _("cannot create hash table"));
 
   for (int cnt = 0; cnt < argc; ++cnt)
     {
       ENTRY entry = { .key = argv[cnt], .data = &argv[cnt] };
       if (hsearch (entry, ENTER) == NULL)
 	error (EXIT_FAILURE, errno,
-	       gettext ("cannot insert into hash table"));
+	       _("cannot insert into hash table"));
     }
 
   arlib_init ();
@@ -1016,7 +1016,7 @@ do_oper_delete (const char *arfname, char **argv, int argc,
       if (newfd != -1)
 	close (newfd);
     nonew:
-      error (0, errno, gettext ("cannot create new file"));
+      error (0, errno, _("cannot create new file"));
       status = 1;
       goto errout;
     }
@@ -1131,7 +1131,7 @@ do_oper_insert (int oper, const char *arfname, char **argv, int argc,
   if (oper != oper_qappend)
     {
       if (hcreate (2 * argc) == 0)
-	error (EXIT_FAILURE, errno, gettext ("cannot create hash table"));
+	error (EXIT_FAILURE, errno, _("cannot create hash table"));
 
       for (int cnt = 0; cnt < argc; ++cnt)
 	{
@@ -1140,7 +1140,7 @@ do_oper_insert (int oper, const char *arfname, char **argv, int argc,
 	  entry.data = &argv[cnt];
 	  if (hsearch (entry, ENTER) == NULL)
 	    error (EXIT_FAILURE, errno,
-		   gettext ("cannot insert into hash table"));
+		   _("cannot insert into hash table"));
 	}
     }
 
@@ -1222,7 +1222,7 @@ do_oper_insert (int oper, const char *arfname, char **argv, int argc,
 
  no_old:
   if (member != NULL)
-    error (EXIT_FAILURE, 0, gettext ("position member %s not found"),
+    error (EXIT_FAILURE, 0, _("position member %s not found"),
 	   member);
 
   if (oper == oper_move)
@@ -1232,7 +1232,7 @@ do_oper_insert (int oper, const char *arfname, char **argv, int argc,
 	{
 	  if (found[cnt] == NULL)
 	    {
-	      fprintf (stderr, gettext ("%s: no entry %s in archive!\n"),
+	      fprintf (stderr, _("%s: no entry %s in archive!\n"),
 		       program_invocation_short_name, argv[cnt]);
 	      status = 1;
 	    }
@@ -1261,18 +1261,18 @@ do_oper_insert (int oper, const char *arfname, char **argv, int argc,
 	  int newfd = open (argv[cnt], O_RDONLY);
 	  if (newfd == -1)
 	    {
-	      error (0, errno, gettext ("cannot open %s"), argv[cnt]);
+	      error (0, errno, _("cannot open %s"), argv[cnt]);
 	      status = 1;
 	    }
 	  else if (fstat (newfd, &newst) == -1)
 	    {
-	      error (0, errno, gettext ("cannot stat %s"), argv[cnt]);
+	      error (0, errno, _("cannot stat %s"), argv[cnt]);
 	      close (newfd);
 	      status = 1;
 	    }
 	  else if (!S_ISREG (newst.st_mode))
 	    {
-	      error (0, errno, gettext ("%s is no regular file"), argv[cnt]);
+	      error (0, errno, _("%s is no regular file"), argv[cnt]);
 	      close (newfd);
 	      status = 1;
 	    }
@@ -1285,7 +1285,7 @@ do_oper_insert (int oper, const char *arfname, char **argv, int argc,
 		   == NULL)
 	    {
 	      fprintf (stderr,
-		       gettext ("cannot get ELF descriptor for %s: %s\n"),
+		       _("cannot get ELF descriptor for %s: %s\n"),
 		       argv[cnt], elf_errmsg (-1));
 	      status = 1;
 	    }
@@ -1305,7 +1305,7 @@ do_oper_insert (int oper, const char *arfname, char **argv, int argc,
 	      found[cnt]->mem = elf_rawfile (newelf, &found[cnt]->size);
 	      if (found[cnt]->mem == NULL
 		  || elf_cntl (newelf, ELF_C_FDDONE) != 0)
-		error (EXIT_FAILURE, 0, gettext ("cannot read %s: %s"),
+		error (EXIT_FAILURE, 0, _("cannot read %s: %s"),
 		       argv[cnt], elf_errmsg (-1));
 
 	      close (newfd);
@@ -1420,7 +1420,7 @@ do_oper_insert (int oper, const char *arfname, char **argv, int argc,
 	    close (newfd);
 	}
     nonew:
-      error (0, errno, gettext ("cannot create new file"));
+      error (0, errno, _("cannot create new file"));
       status = 1;
       goto errout;
     }
@@ -1480,31 +1480,31 @@ do_oper_insert (int oper, const char *arfname, char **argv, int argc,
 	      if (! no0print (false, arhdr.ar_date, sizeof (arhdr.ar_date),
 			      all->sec))
 		{
-		  error (0, errno, gettext ("cannot represent ar_date"));
+		  error (0, errno, _("cannot represent ar_date"));
 		  goto nonew_unlink;
 		}
 	      if (! no0print (false, arhdr.ar_uid, sizeof (arhdr.ar_uid),
 			      all->uid))
 		{
-		  error (0, errno, gettext ("cannot represent ar_uid"));
+		  error (0, errno, _("cannot represent ar_uid"));
 		  goto nonew_unlink;
 		}
 	      if (! no0print (false, arhdr.ar_gid, sizeof (arhdr.ar_gid),
 			      all->gid))
 		{
-		  error (0, errno, gettext ("cannot represent ar_gid"));
+		  error (0, errno, _("cannot represent ar_gid"));
 		  goto nonew_unlink;
 		}
 	      if (! no0print (true, arhdr.ar_mode, sizeof (arhdr.ar_mode),
 			all->mode))
 		{
-		  error (0, errno, gettext ("cannot represent ar_mode"));
+		  error (0, errno, _("cannot represent ar_mode"));
 		  goto nonew_unlink;
 		}
 	      if (! no0print (false, arhdr.ar_size, sizeof (arhdr.ar_size),
 			all->size))
 		{
-		  error (0, errno, gettext ("cannot represent ar_size"));
+		  error (0, errno, _("cannot represent ar_size"));
 		  goto nonew_unlink;
 		}
 	      memcpy (arhdr.ar_fmag, ARFMAG, sizeof (arhdr.ar_fmag));
diff --git a/src/arlib-argp.c b/src/arlib-argp.c
index 1bdd8d0b..c07d9299 100644
--- a/src/arlib-argp.c
+++ b/src/arlib-argp.c
@@ -62,7 +62,7 @@ help_filter (int key, const char *text, void *input __attribute__ ((unused)))
   inline char *text_for_default (void)
   {
     char *new_text;
-    if (unlikely (asprintf (&new_text, gettext ("%s (default)"), text) < 0))
+    if (unlikely (asprintf (&new_text, _("%s (default)"), text) < 0))
       return (char *) text;
     return new_text;
   }
diff --git a/src/arlib.c b/src/arlib.c
index a6521e30..a14c44d3 100644
--- a/src/arlib.c
+++ b/src/arlib.c
@@ -210,7 +210,7 @@ arlib_add_symbols (Elf *elf, const char *arfname, const char *membername,
 {
   if (sizeof (off) > sizeof (uint32_t) && off > ~((uint32_t) 0))
     /* The archive is too big.  */
-    error (EXIT_FAILURE, 0, gettext ("the archive '%s' is too large"),
+    error (EXIT_FAILURE, 0, _("the archive '%s' is too large"),
 	   arfname);
 
   /* We only add symbol tables for ELF files.  It makes not much sense
@@ -223,7 +223,7 @@ arlib_add_symbols (Elf *elf, const char *arfname, const char *membername,
   GElf_Ehdr ehdr_mem;
   GElf_Ehdr *ehdr = gelf_getehdr (elf, &ehdr_mem);
   if (ehdr == NULL)
-    error (EXIT_FAILURE, 0, gettext ("cannot read ELF header of %s(%s): %s"),
+    error (EXIT_FAILURE, 0, _("cannot read ELF header of %s(%s): %s"),
 	   arfname, membername, elf_errmsg (-1));
 
   GElf_Word symtype;
diff --git a/src/elfcmp.c b/src/elfcmp.c
index c07fdfd7..21d8d9dc 100644
--- a/src/elfcmp.c
+++ b/src/elfcmp.c
@@ -138,7 +138,7 @@ main (int argc, char *argv[])
   /* We expect exactly two non-option parameters.  */
   if (unlikely (remaining + 2 != argc))
     {
-      fputs (gettext ("Invalid number of parameters.\n"), stderr);
+      fputs (_("Invalid number of parameters.\n"), stderr);
       argp_help (&argp, stderr, ARGP_HELP_SEE, program_invocation_short_name);
       exit (1);
     }
@@ -169,12 +169,12 @@ main (int argc, char *argv[])
   GElf_Ehdr ehdr1_mem;
   GElf_Ehdr *ehdr1 = gelf_getehdr (elf1, &ehdr1_mem);
   if (ehdr1 == NULL)
-    error (2, 0, gettext ("cannot get ELF header of '%s': %s"),
+    error (2, 0, _("cannot get ELF header of '%s': %s"),
 	   fname1, elf_errmsg (-1));
   GElf_Ehdr ehdr2_mem;
   GElf_Ehdr *ehdr2 = gelf_getehdr (elf2, &ehdr2_mem);
   if (ehdr2 == NULL)
-    error (2, 0, gettext ("cannot get ELF header of '%s': %s"),
+    error (2, 0, _("cannot get ELF header of '%s': %s"),
 	   fname2, elf_errmsg (-1));
 
 #define DIFFERENCE							      \
@@ -200,37 +200,37 @@ main (int argc, char *argv[])
 		|| ehdr1->e_shentsize != ehdr2->e_shentsize))
     {
       if (! quiet)
-	error (0, 0, gettext ("%s %s diff: ELF header"), fname1, fname2);
+	error (0, 0, _("%s %s diff: ELF header"), fname1, fname2);
       DIFFERENCE;
     }
 
   size_t shnum1;
   size_t shnum2;
   if (unlikely (elf_getshdrnum (elf1, &shnum1) != 0))
-    error (2, 0, gettext ("cannot get section count of '%s': %s"),
+    error (2, 0, _("cannot get section count of '%s': %s"),
 	   fname1, elf_errmsg (-1));
   if (unlikely (elf_getshdrnum (elf2, &shnum2) != 0))
-    error (2, 0, gettext ("cannot get section count of '%s': %s"),
+    error (2, 0, _("cannot get section count of '%s': %s"),
 	   fname2, elf_errmsg (-1));
   if (unlikely (shnum1 != shnum2))
     {
       if (! quiet)
-	error (0, 0, gettext ("%s %s diff: section count"), fname1, fname2);
+	error (0, 0, _("%s %s diff: section count"), fname1, fname2);
       DIFFERENCE;
     }
 
   size_t phnum1;
   size_t phnum2;
   if (unlikely (elf_getphdrnum (elf1, &phnum1) != 0))
-    error (2, 0, gettext ("cannot get program header count of '%s': %s"),
+    error (2, 0, _("cannot get program header count of '%s': %s"),
 	   fname1, elf_errmsg (-1));
   if (unlikely (elf_getphdrnum (elf2, &phnum2) != 0))
-    error (2, 0, gettext ("cannot get program header count of '%s': %s"),
+    error (2, 0, _("cannot get program header count of '%s': %s"),
 	   fname2, elf_errmsg (-1));
   if (unlikely (phnum1 != phnum2))
     {
       if (! quiet)
-	error (0, 0, gettext ("%s %s diff: program header count"),
+	error (0, 0, _("%s %s diff: program header count"),
 	       fname1, fname2);
       DIFFERENCE;
     }
@@ -238,15 +238,15 @@ main (int argc, char *argv[])
   size_t shstrndx1;
   size_t shstrndx2;
   if (elf_getshdrstrndx (elf1, &shstrndx1) != 0)
-    error (2, 0, gettext ("cannot get hdrstrndx of '%s': %s"),
+    error (2, 0, _("cannot get hdrstrndx of '%s': %s"),
 	   fname1, elf_errmsg (-1));
   if (elf_getshdrstrndx (elf2, &shstrndx2) != 0)
-    error (2, 0, gettext ("cannot get hdrstrndx of '%s': %s"),
+    error (2, 0, _("cannot get hdrstrndx of '%s': %s"),
 	   fname2, elf_errmsg (-1));
   if (shstrndx1 != shstrndx2)
     {
       if (! quiet)
-	error (0, 0, gettext ("%s %s diff: shdr string index"),
+	error (0, 0, _("%s %s diff: shdr string index"),
 	       fname1, fname2);
       DIFFERENCE;
     }
@@ -304,7 +304,7 @@ main (int argc, char *argv[])
       if (unlikely (sname1 == NULL || sname2 == NULL
 		    || strcmp (sname1, sname2) != 0))
 	{
-	  error (0, 0, gettext ("%s %s differ: section [%zu], [%zu] name"),
+	  error (0, 0, _("%s %s differ: section [%zu], [%zu] name"),
 		 fname1, fname2, elf_ndxscn (scn1), elf_ndxscn (scn2));
 	  DIFFERENCE;
 	}
@@ -327,7 +327,7 @@ main (int argc, char *argv[])
 	  || shdr1->sh_addralign != shdr2->sh_addralign
 	  || shdr1->sh_entsize != shdr2->sh_entsize)
 	{
-	  error (0, 0, gettext ("%s %s differ: section [%zu] '%s' header"),
+	  error (0, 0, _("%s %s differ: section [%zu] '%s' header"),
 		 fname1, fname2, elf_ndxscn (scn1), sname1);
 	  DIFFERENCE;
 	}
@@ -335,13 +335,13 @@ main (int argc, char *argv[])
       Elf_Data *data1 = elf_getdata (scn1, NULL);
       if (data1 == NULL)
 	error (2, 0,
-	       gettext ("cannot get content of section %zu in '%s': %s"),
+	       _("cannot get content of section %zu in '%s': %s"),
 	       elf_ndxscn (scn1), fname1, elf_errmsg (-1));
 
       Elf_Data *data2 = elf_getdata (scn2, NULL);
       if (data2 == NULL)
 	error (2, 0,
-	       gettext ("cannot get content of section %zu in '%s': %s"),
+	       _("cannot get content of section %zu in '%s': %s"),
 	       elf_ndxscn (scn2), fname2, elf_errmsg (-1));
 
       switch (shdr1->sh_type)
@@ -350,7 +350,7 @@ main (int argc, char *argv[])
 	case SHT_SYMTAB:
 	  if (shdr1->sh_entsize == 0)
 	    error (2, 0,
-		   gettext ("symbol table [%zu] in '%s' has zero sh_entsize"),
+		   _("symbol table [%zu] in '%s' has zero sh_entsize"),
 		   elf_ndxscn (scn1), fname1);
 
 	  /* Iterate over the symbol table.  We ignore the st_size
@@ -362,13 +362,13 @@ main (int argc, char *argv[])
 	      GElf_Sym *sym1 = gelf_getsym (data1, ndx, &sym1_mem);
 	      if (sym1 == NULL)
 		error (2, 0,
-		       gettext ("cannot get symbol in '%s': %s"),
+		       _("cannot get symbol in '%s': %s"),
 		       fname1, elf_errmsg (-1));
 	      GElf_Sym sym2_mem;
 	      GElf_Sym *sym2 = gelf_getsym (data2, ndx, &sym2_mem);
 	      if (sym2 == NULL)
 		error (2, 0,
-		       gettext ("cannot get symbol in '%s': %s"),
+		       _("cannot get symbol in '%s': %s"),
 		       fname2, elf_errmsg (-1));
 
 	      const char *name1 = elf_strptr (elf1, shdr1->sh_link,
@@ -390,10 +390,10 @@ main (int argc, char *argv[])
 		    {
 		      if (elf_ndxscn (scn1) == elf_ndxscn (scn2))
 			error (0, 0,
-			       gettext ("%s %s differ: symbol table [%zu]"),
+			       _("%s %s differ: symbol table [%zu]"),
 			       fname1, fname2, elf_ndxscn (scn1));
 		      else
-			error (0, 0, gettext ("\
+			error (0, 0, _("\
 %s %s differ: symbol table [%zu,%zu]"),
 			       fname1, fname2, elf_ndxscn (scn1),
 			       elf_ndxscn (scn2));
@@ -440,7 +440,7 @@ main (int argc, char *argv[])
 		if (off2 >= data2->d_size)
 		  {
 		    if (! quiet)
-		      error (0, 0, gettext ("\
+		      error (0, 0, _("\
 %s %s differ: section [%zu] '%s' number of notes"),
 			     fname1, fname2, elf_ndxscn (scn1), sname1);
 		    DIFFERENCE;
@@ -448,7 +448,7 @@ main (int argc, char *argv[])
 		off2 = gelf_getnote (data2, off2, &note2,
 				     &name_offset, &desc_offset);
 		if (off2 == 0)
-		  error (2, 0, gettext ("\
+		  error (2, 0, _("\
 cannot read note section [%zu] '%s' in '%s': %s"),
 			 elf_ndxscn (scn2), sname2, fname2, elf_errmsg (-1));
 		const char *name2 = (note2.n_namesz == 0
@@ -459,7 +459,7 @@ cannot read note section [%zu] '%s' in '%s': %s"),
 		    || memcmp (name1, name2, note1.n_namesz))
 		  {
 		    if (! quiet)
-		      error (0, 0, gettext ("\
+		      error (0, 0, _("\
 %s %s differ: section [%zu] '%s' note name"),
 			     fname1, fname2, elf_ndxscn (scn1), sname1);
 		    DIFFERENCE;
@@ -467,7 +467,7 @@ cannot read note section [%zu] '%s' in '%s': %s"),
 		if (note1.n_type != note2.n_type)
 		  {
 		    if (! quiet)
-		      error (0, 0, gettext ("\
+		      error (0, 0, _("\
 %s %s differ: section [%zu] '%s' note '%s' type"),
 			     fname1, fname2, elf_ndxscn (scn1), sname1, name1);
 		    DIFFERENCE;
@@ -482,7 +482,7 @@ cannot read note section [%zu] '%s' in '%s': %s"),
 			if (note1.n_descsz != note2.n_descsz)
 			  {
 			    if (! quiet)
-			      error (0, 0, gettext ("\
+			      error (0, 0, _("\
 %s %s differ: build ID length"),
 				     fname1, fname2);
 			    DIFFERENCE;
@@ -490,7 +490,7 @@ cannot read note section [%zu] '%s' in '%s': %s"),
 			else if (! ignore_build_id)
 			  {
 			    if (! quiet)
-			      error (0, 0, gettext ("\
+			      error (0, 0, _("\
 %s %s differ: build ID content"),
 				     fname1, fname2);
 			    DIFFERENCE;
@@ -499,7 +499,7 @@ cannot read note section [%zu] '%s' in '%s': %s"),
 		    else
 		      {
 			if (! quiet)
-			  error (0, 0, gettext ("\
+			  error (0, 0, _("\
 %s %s differ: section [%zu] '%s' note '%s' content"),
 				 fname1, fname2, elf_ndxscn (scn1), sname1,
 				 name1);
@@ -510,7 +510,7 @@ cannot read note section [%zu] '%s' in '%s': %s"),
 	    if (off2 < data2->d_size)
 	      {
 		if (! quiet)
-		  error (0, 0, gettext ("\
+		  error (0, 0, _("\
 %s %s differ: section [%zu] '%s' number of notes"),
 			 fname1, fname2, elf_ndxscn (scn1), sname1);
 		DIFFERENCE;
@@ -540,11 +540,11 @@ cannot read note section [%zu] '%s' in '%s': %s"),
 	      if (! quiet)
 		{
 		  if (elf_ndxscn (scn1) == elf_ndxscn (scn2))
-		    error (0, 0, gettext ("\
+		    error (0, 0, _("\
 %s %s differ: section [%zu] '%s' content"),
 			   fname1, fname2, elf_ndxscn (scn1), sname1);
 		  else
-		    error (0, 0, gettext ("\
+		    error (0, 0, _("\
 %s %s differ: section [%zu,%zu] '%s' content"),
 			   fname1, fname2, elf_ndxscn (scn1),
 			   elf_ndxscn (scn2), sname1);
@@ -559,7 +559,7 @@ cannot read note section [%zu] '%s' in '%s': %s"),
     {
       if (! quiet)
 	error (0, 0,
-	       gettext ("%s %s differ: unequal amount of important sections"),
+	       _("%s %s differ: unequal amount of important sections"),
 	       fname1, fname2);
       DIFFERENCE;
     }
@@ -592,12 +592,12 @@ cannot read note section [%zu] '%s' in '%s': %s"),
     {
       raw1 = elf_rawfile (elf1, &size1);
       if (raw1 == NULL )
-	error (2, 0, gettext ("cannot load data of '%s': %s"),
+	error (2, 0, _("cannot load data of '%s': %s"),
 	       fname1, elf_errmsg (-1));
 
       raw2 = elf_rawfile (elf2, &size2);
       if (raw2 == NULL )
-	error (2, 0, gettext ("cannot load data of '%s': %s"),
+	error (2, 0, _("cannot load data of '%s': %s"),
 	       fname2, elf_errmsg (-1));
 
       for (size_t cnt = 0; cnt < nregions; ++cnt)
@@ -616,19 +616,19 @@ cannot read note section [%zu] '%s' in '%s': %s"),
       GElf_Phdr *phdr1 = gelf_getphdr (elf1, ndx, &phdr1_mem);
       if (phdr1 == NULL)
 	error (2, 0,
-	       gettext ("cannot get program header entry %d of '%s': %s"),
+	       _("cannot get program header entry %d of '%s': %s"),
 	       ndx, fname1, elf_errmsg (-1));
       GElf_Phdr phdr2_mem;
       GElf_Phdr *phdr2 = gelf_getphdr (elf2, ndx, &phdr2_mem);
       if (phdr2 == NULL)
 	error (2, 0,
-	       gettext ("cannot get program header entry %d of '%s': %s"),
+	       _("cannot get program header entry %d of '%s': %s"),
 	       ndx, fname2, elf_errmsg (-1));
 
       if (unlikely (memcmp (phdr1, phdr2, sizeof (GElf_Phdr)) != 0))
 	{
 	  if (! quiet)
-	    error (0, 0, gettext ("%s %s differ: program header %d"),
+	    error (0, 0, _("%s %s differ: program header %d"),
 		   fname1, fname2, ndx);
 	  DIFFERENCE;
 	}
@@ -652,7 +652,7 @@ cannot read note section [%zu] '%s' in '%s': %s"),
 		    {
 		    gapmismatch:
 		      if (!quiet)
-			error (0, 0, gettext ("%s %s differ: gap"),
+			error (0, 0, _("%s %s differ: gap"),
 			       fname1, fname2);
 		      DIFFERENCE;
 		      break;
@@ -703,7 +703,7 @@ parse_opt (int key, char *arg,
       else
 	{
 	  fprintf (stderr,
-		   gettext ("Invalid value '%s' for --gaps parameter."),
+		   _("Invalid value '%s' for --gaps parameter."),
 		   arg);
 	  argp_help (&argp, stderr, ARGP_HELP_SEE,
 		     program_invocation_short_name);
@@ -731,16 +731,16 @@ open_file (const char *fname, int *fdp, Ebl **eblp)
 {
   int fd = open (fname, O_RDONLY);
   if (unlikely (fd == -1))
-    error (2, errno, gettext ("cannot open '%s'"), fname);
+    error (2, errno, _("cannot open '%s'"), fname);
   Elf *elf = elf_begin (fd, ELF_C_READ_MMAP, NULL);
   if (elf == NULL)
     error (2, 0,
-	   gettext ("cannot create ELF descriptor for '%s': %s"),
+	   _("cannot create ELF descriptor for '%s': %s"),
 	   fname, elf_errmsg (-1));
   Ebl *ebl = ebl_openbackend (elf);
   if (ebl == NULL)
     error (2, 0,
-	   gettext ("cannot create EBL descriptor for '%s'"), fname);
+	   _("cannot create EBL descriptor for '%s'"), fname);
 
   *fdp = fd;
   *eblp = ebl;
@@ -758,7 +758,7 @@ search_for_copy_reloc (Ebl *ebl, size_t scnndx, int symndx)
       GElf_Shdr *shdr = gelf_getshdr (scn, &shdr_mem);
       if (shdr == NULL)
 	error (2, 0,
-	       gettext ("cannot get section header of section %zu: %s"),
+	       _("cannot get section header of section %zu: %s"),
 	       elf_ndxscn (scn), elf_errmsg (-1));
 
       if ((shdr->sh_type != SHT_REL && shdr->sh_type != SHT_RELA)
@@ -768,7 +768,7 @@ search_for_copy_reloc (Ebl *ebl, size_t scnndx, int symndx)
       Elf_Data *data = elf_getdata (scn, NULL);
       if (data == NULL)
 	error (2, 0,
-	       gettext ("cannot get content of section %zu: %s"),
+	       _("cannot get content of section %zu: %s"),
 	       elf_ndxscn (scn), elf_errmsg (-1));
 
       if (shdr->sh_type == SHT_REL && shdr->sh_entsize != 0)
@@ -778,7 +778,7 @@ search_for_copy_reloc (Ebl *ebl, size_t scnndx, int symndx)
 	    GElf_Rel rel_mem;
 	    GElf_Rel *rel = gelf_getrel (data, ndx, &rel_mem);
 	    if (rel == NULL)
-	      error (2, 0, gettext ("cannot get relocation: %s"),
+	      error (2, 0, _("cannot get relocation: %s"),
 		     elf_errmsg (-1));
 
 	    if ((int) GELF_R_SYM (rel->r_info) == symndx
@@ -792,7 +792,7 @@ search_for_copy_reloc (Ebl *ebl, size_t scnndx, int symndx)
 	    GElf_Rela rela_mem;
 	    GElf_Rela *rela = gelf_getrela (data, ndx, &rela_mem);
 	    if (rela == NULL)
-	      error (2, 0, gettext ("cannot get relocation: %s"),
+	      error (2, 0, _("cannot get relocation: %s"),
 		     elf_errmsg (-1));
 
 	    if ((int) GELF_R_SYM (rela->r_info) == symndx
diff --git a/src/elflint.c b/src/elflint.c
index 4c129813..cb1079de 100644
--- a/src/elflint.c
+++ b/src/elflint.c
@@ -177,11 +177,11 @@ main (int argc, char *argv[])
 
 	  /* Now we can close the descriptor.  */
 	  if (elf_end (elf) != 0)
-	    ERROR (gettext ("error while closing Elf descriptor: %s\n"),
+	    ERROR (_("error while closing Elf descriptor: %s\n"),
 		   elf_errmsg (-1));
 
 	  if (prev_error_count == error_count && !be_quiet)
-	    puts (gettext ("No errors"));
+	    puts (_("No errors"));
 	}
 
       close (fd);
@@ -216,7 +216,7 @@ parse_opt (int key, char *arg __attribute__ ((unused)),
       break;
 
     case ARGP_KEY_NO_ARGS:
-      fputs (gettext ("Missing file name.\n"), stderr);
+      fputs (_("Missing file name.\n"), stderr);
       argp_help (&argp, stderr, ARGP_HELP_SEE, program_invocation_short_name);
       exit (EXIT_FAILURE);
 
@@ -281,7 +281,7 @@ process_file (int fd, Elf *elf, const char *prefix, const char *suffix,
 	    /* Get next archive element.  */
 	    cmd = elf_next (subelf);
 	    if (elf_end (subelf) != 0)
-	      ERROR (gettext (" error while freeing sub-ELF descriptor: %s\n"),
+	      ERROR (_(" error while freeing sub-ELF descriptor: %s\n"),
 		     elf_errmsg (-1));
 	  }
       }
@@ -289,7 +289,7 @@ process_file (int fd, Elf *elf, const char *prefix, const char *suffix,
 
     default:
       /* We cannot do anything.  */
-      ERROR (gettext ("\
+      ERROR (_("\
 Not an ELF file - it has the wrong magic bytes at the start\n"));
       break;
     }
@@ -354,16 +354,16 @@ check_elf_header (Ebl *ebl, GElf_Ehdr *ehdr, size_t size)
 
   if (ehdr->e_ident[EI_CLASS] != ELFCLASS32
       && ehdr->e_ident[EI_CLASS] != ELFCLASS64)
-    ERROR (gettext ("e_ident[%d] == %d is no known class\n"),
+    ERROR (_("e_ident[%d] == %d is no known class\n"),
 	   EI_CLASS, ehdr->e_ident[EI_CLASS]);
 
   if (ehdr->e_ident[EI_DATA] != ELFDATA2LSB
       && ehdr->e_ident[EI_DATA] != ELFDATA2MSB)
-    ERROR (gettext ("e_ident[%d] == %d is no known data encoding\n"),
+    ERROR (_("e_ident[%d] == %d is no known data encoding\n"),
 	   EI_DATA, ehdr->e_ident[EI_DATA]);
 
   if (ehdr->e_ident[EI_VERSION] != EV_CURRENT)
-    ERROR (gettext ("unknown ELF header version number e_ident[%d] == %d\n"),
+    ERROR (_("unknown ELF header version number e_ident[%d] == %d\n"),
 	   EI_VERSION, ehdr->e_ident[EI_VERSION]);
 
   /* We currently don't handle any OS ABIs other than Linux and the
@@ -371,46 +371,46 @@ check_elf_header (Ebl *ebl, GElf_Ehdr *ehdr, size_t size)
   if (ehdr->e_ident[EI_OSABI] != ELFOSABI_NONE
       && ehdr->e_ident[EI_OSABI] != ELFOSABI_LINUX
       && ehdr->e_ident[EI_OSABI] != ELFOSABI_FREEBSD)
-    ERROR (gettext ("unsupported OS ABI e_ident[%d] == '%s'\n"),
+    ERROR (_("unsupported OS ABI e_ident[%d] == '%s'\n"),
 	   EI_OSABI,
 	   ebl_osabi_name (ebl, ehdr->e_ident[EI_OSABI], buf, sizeof (buf)));
 
   /* No ABI versions other than zero are supported either.  */
   if (ehdr->e_ident[EI_ABIVERSION] != 0)
-    ERROR (gettext ("unsupported ABI version e_ident[%d] == %d\n"),
+    ERROR (_("unsupported ABI version e_ident[%d] == %d\n"),
 	   EI_ABIVERSION, ehdr->e_ident[EI_ABIVERSION]);
 
   for (cnt = EI_PAD; cnt < EI_NIDENT; ++cnt)
     if (ehdr->e_ident[cnt] != 0)
-      ERROR (gettext ("e_ident[%zu] is not zero\n"), cnt);
+      ERROR (_("e_ident[%zu] is not zero\n"), cnt);
 
   /* Check the e_type field.  */
   if (ehdr->e_type != ET_REL && ehdr->e_type != ET_EXEC
       && ehdr->e_type != ET_DYN && ehdr->e_type != ET_CORE)
-    ERROR (gettext ("unknown object file type %d\n"), ehdr->e_type);
+    ERROR (_("unknown object file type %d\n"), ehdr->e_type);
 
   /* Check the e_machine field.  */
   for (cnt = 0; cnt < nvalid_e_machine; ++cnt)
     if (valid_e_machine[cnt] == ehdr->e_machine)
       break;
   if (cnt == nvalid_e_machine)
-    ERROR (gettext ("unknown machine type %d\n"), ehdr->e_machine);
+    ERROR (_("unknown machine type %d\n"), ehdr->e_machine);
 
   /* Check the e_version field.  */
   if (ehdr->e_version != EV_CURRENT)
-    ERROR (gettext ("unknown object file version\n"));
+    ERROR (_("unknown object file version\n"));
 
   /* Check the e_phoff and e_phnum fields.  */
   if (ehdr->e_phoff == 0)
     {
       if (ehdr->e_phnum != 0)
-	ERROR (gettext ("invalid program header offset\n"));
+	ERROR (_("invalid program header offset\n"));
       else if (ehdr->e_type == ET_EXEC || ehdr->e_type == ET_DYN)
-	ERROR (gettext ("\
+	ERROR (_("\
 executables and DSOs cannot have zero program header offset\n"));
     }
   else if (ehdr->e_phnum == 0)
-    ERROR (gettext ("invalid number of program header entries\n"));
+    ERROR (_("invalid number of program header entries\n"));
 
   /* Check the e_shoff field.  */
   shnum = ehdr->e_shnum;
@@ -418,10 +418,10 @@ executables and DSOs cannot have zero program header offset\n"));
   if (ehdr->e_shoff == 0)
     {
       if (ehdr->e_shnum != 0)
-	ERROR (gettext ("invalid section header table offset\n"));
+	ERROR (_("invalid section header table offset\n"));
       else if (ehdr->e_type != ET_EXEC && ehdr->e_type != ET_DYN
 	       && ehdr->e_type != ET_CORE)
-	ERROR (gettext ("section header table must be present\n"));
+	ERROR (_("section header table must be present\n"));
     }
   else
     {
@@ -435,7 +435,7 @@ executables and DSOs cannot have zero program header offset\n"));
 	    {
 	      /* The error will be reported later.  */
 	      if (shdr->sh_size == 0)
-		ERROR (gettext ("\
+		ERROR (_("\
 invalid number of section header table entries\n"));
 	      else
 		shnum = shdr->sh_size;
@@ -452,7 +452,7 @@ invalid number of section header table entries\n"));
 	    shstrndx = shdr->sh_link;
 	}
       else if (shstrndx >= shnum)
-	ERROR (gettext ("invalid section header index\n"));
+	ERROR (_("invalid section header index\n"));
     }
 
   /* Check the shdrs actually exist.  And uncompress them before
@@ -470,7 +470,7 @@ invalid number of section header table entries\n"));
 	if (elf_compress (scn, 0, 0) < 0) { ; }
      }
   if (scnt < shnum)
-    ERROR (gettext ("Can only check %u headers, shnum was %u\n"), scnt, shnum);
+    ERROR (_("Can only check %u headers, shnum was %u\n"), scnt, shnum);
   shnum = scnt;
 
   phnum = ehdr->e_phnum;
@@ -484,7 +484,7 @@ invalid number of section header table entries\n"));
 	{
 	  /* The error will be reported later.  */
 	  if (shdr->sh_info < PN_XNUM)
-	    ERROR (gettext ("\
+	    ERROR (_("\
 invalid number of program header table entries\n"));
 	  else
 	    phnum = shdr->sh_info;
@@ -501,48 +501,48 @@ invalid number of program header table entries\n"));
 	  break;
      }
   if (pcnt < phnum)
-    ERROR (gettext ("Can only check %u headers, phnum was %u\n"), pcnt, phnum);
+    ERROR (_("Can only check %u headers, phnum was %u\n"), pcnt, phnum);
   phnum = pcnt;
 
   /* Check the e_flags field.  */
   if (!ebl_machine_flag_check (ebl, ehdr->e_flags))
-    ERROR (gettext ("invalid machine flags: %s\n"),
+    ERROR (_("invalid machine flags: %s\n"),
 	   ebl_machine_flag_name (ebl, ehdr->e_flags, buf, sizeof (buf)));
 
   /* Check e_ehsize, e_phentsize, and e_shentsize fields.  */
   if (gelf_getclass (ebl->elf) == ELFCLASS32)
     {
       if (ehdr->e_ehsize != 0 && ehdr->e_ehsize != sizeof (Elf32_Ehdr))
-	ERROR (gettext ("invalid ELF header size: %hd\n"), ehdr->e_ehsize);
+	ERROR (_("invalid ELF header size: %hd\n"), ehdr->e_ehsize);
 
       if (ehdr->e_phentsize != 0 && ehdr->e_phentsize != sizeof (Elf32_Phdr))
-	ERROR (gettext ("invalid program header size: %hd\n"),
+	ERROR (_("invalid program header size: %hd\n"),
 	       ehdr->e_phentsize);
       else if (ehdr->e_phoff + phnum * ehdr->e_phentsize > size)
-	ERROR (gettext ("invalid program header position or size\n"));
+	ERROR (_("invalid program header position or size\n"));
 
       if (ehdr->e_shentsize != 0 && ehdr->e_shentsize != sizeof (Elf32_Shdr))
-	ERROR (gettext ("invalid section header size: %hd\n"),
+	ERROR (_("invalid section header size: %hd\n"),
 	       ehdr->e_shentsize);
       else if (ehdr->e_shoff + shnum * ehdr->e_shentsize > size)
-	ERROR (gettext ("invalid section header position or size\n"));
+	ERROR (_("invalid section header position or size\n"));
     }
   else if (gelf_getclass (ebl->elf) == ELFCLASS64)
     {
       if (ehdr->e_ehsize != 0 && ehdr->e_ehsize != sizeof (Elf64_Ehdr))
-	ERROR (gettext ("invalid ELF header size: %hd\n"), ehdr->e_ehsize);
+	ERROR (_("invalid ELF header size: %hd\n"), ehdr->e_ehsize);
 
       if (ehdr->e_phentsize != 0 && ehdr->e_phentsize != sizeof (Elf64_Phdr))
-	ERROR (gettext ("invalid program header size: %hd\n"),
+	ERROR (_("invalid program header size: %hd\n"),
 	       ehdr->e_phentsize);
       else if (ehdr->e_phoff + phnum * ehdr->e_phentsize > size)
-	ERROR (gettext ("invalid program header position or size\n"));
+	ERROR (_("invalid program header position or size\n"));
 
       if (ehdr->e_shentsize != 0 && ehdr->e_shentsize != sizeof (Elf64_Shdr))
-	ERROR (gettext ("invalid section header size: %hd\n"),
+	ERROR (_("invalid section header size: %hd\n"),
 	       ehdr->e_shentsize);
       else if (ehdr->e_shoff + shnum * ehdr->e_shentsize > size)
-	ERROR (gettext ("invalid section header position or size\n"));
+	ERROR (_("invalid section header position or size\n"));
     }
 }
 
@@ -587,11 +587,11 @@ check_scn_group (Ebl *ebl, int idx)
 
     out:
       if (cnt == shnum)
-	ERROR (gettext ("\
+	ERROR (_("\
 section [%2d] '%s': section with SHF_GROUP flag set not part of a section group\n"),
 	       idx, section_name (ebl, idx));
       else
-	ERROR (gettext ("\
+	ERROR (_("\
 section [%2d] '%s': section group [%2zu] '%s' does not precede group member\n"),
 	       idx, section_name (ebl, idx),
 	       cnt, section_name (ebl, cnt));
@@ -607,7 +607,7 @@ check_symtab (Ebl *ebl, GElf_Ehdr *ehdr, GElf_Shdr *shdr, int idx)
   Elf_Data *data = elf_getdata (elf_getscn (ebl->elf, idx), NULL);
   if (data == NULL)
     {
-      ERROR (gettext ("section [%2d] '%s': cannot get section data\n"),
+      ERROR (_("section [%2d] '%s': cannot get section data\n"),
 	     idx, section_name (ebl, idx));
       return;
     }
@@ -620,7 +620,7 @@ check_symtab (Ebl *ebl, GElf_Ehdr *ehdr, GElf_Shdr *shdr, int idx)
 
   if (strshdr->sh_type != SHT_STRTAB)
     {
-      ERROR (gettext ("section [%2d] '%s': referenced as string table for section [%2d] '%s' but type is not SHT_STRTAB\n"),
+      ERROR (_("section [%2d] '%s': referenced as string table for section [%2d] '%s' but type is not SHT_STRTAB\n"),
 	     shdr->sh_link, section_name (ebl, shdr->sh_link),
 	     idx, section_name (ebl, idx));
       strshdr = NULL;
@@ -643,7 +643,7 @@ check_symtab (Ebl *ebl, GElf_Ehdr *ehdr, GElf_Shdr *shdr, int idx)
 	    && xndxshdr->sh_link == (GElf_Word) idx)
 	  {
 	    if (found_xndx)
-	      ERROR (gettext ("\
+	      ERROR (_("\
 section [%2d] '%s': symbol table cannot have more than one extended index section\n"),
 		     idx, section_name (ebl, idx));
 
@@ -655,11 +655,11 @@ section [%2d] '%s': symbol table cannot have more than one extended index sectio
 
   size_t sh_entsize = gelf_fsize (ebl->elf, ELF_T_SYM, 1, EV_CURRENT);
   if (shdr->sh_entsize != sh_entsize)
-    ERROR (gettext ("\
+    ERROR (_("\
 section [%2u] '%s': entry size is does not match ElfXX_Sym\n"),
 	   idx, section_name (ebl, idx));
   else if (shdr->sh_info > shdr->sh_size / sh_entsize)
-    ERROR (gettext ("\
+    ERROR (_("\
 section [%2u] '%s': number of local entries in 'st_info' larger than table size\n"),
 	   idx, section_name (ebl, idx));
 
@@ -668,30 +668,30 @@ section [%2u] '%s': number of local entries in 'st_info' larger than table size\
   Elf32_Word xndx;
   GElf_Sym *sym = gelf_getsymshndx (data, xndxdata, 0, &sym_mem, &xndx);
   if (sym == NULL)
-      ERROR (gettext ("section [%2d] '%s': cannot get symbol %d: %s\n"),
+      ERROR (_("section [%2d] '%s': cannot get symbol %d: %s\n"),
 	     idx, section_name (ebl, idx), 0, elf_errmsg (-1));
   else
     {
       if (sym->st_name != 0)
-	ERROR (gettext ("section [%2d] '%s': '%s' in zeroth entry not zero\n"),
+	ERROR (_("section [%2d] '%s': '%s' in zeroth entry not zero\n"),
 	       idx, section_name (ebl, idx), "st_name");
       if (sym->st_value != 0)
-	ERROR (gettext ("section [%2d] '%s': '%s' in zeroth entry not zero\n"),
+	ERROR (_("section [%2d] '%s': '%s' in zeroth entry not zero\n"),
 	       idx, section_name (ebl, idx), "st_value");
       if (sym->st_size != 0)
-	ERROR (gettext ("section [%2d] '%s': '%s' in zeroth entry not zero\n"),
+	ERROR (_("section [%2d] '%s': '%s' in zeroth entry not zero\n"),
 	       idx, section_name (ebl, idx), "st_size");
       if (sym->st_info != 0)
-	ERROR (gettext ("section [%2d] '%s': '%s' in zeroth entry not zero\n"),
+	ERROR (_("section [%2d] '%s': '%s' in zeroth entry not zero\n"),
 	       idx, section_name (ebl, idx), "st_info");
       if (sym->st_other != 0)
-	ERROR (gettext ("section [%2d] '%s': '%s' in zeroth entry not zero\n"),
+	ERROR (_("section [%2d] '%s': '%s' in zeroth entry not zero\n"),
 	       idx, section_name (ebl, idx), "st_other");
       if (sym->st_shndx != 0)
-	ERROR (gettext ("section [%2d] '%s': '%s' in zeroth entry not zero\n"),
+	ERROR (_("section [%2d] '%s': '%s' in zeroth entry not zero\n"),
 	       idx, section_name (ebl, idx), "st_shndx");
       if (xndxdata != NULL && xndx != 0)
-	ERROR (gettext ("\
+	ERROR (_("\
 section [%2d] '%s': XINDEX for zeroth entry not zero\n"),
 	       xndxscnidx, section_name (ebl, xndxscnidx));
     }
@@ -701,7 +701,7 @@ section [%2d] '%s': XINDEX for zeroth entry not zero\n"),
       sym = gelf_getsymshndx (data, xndxdata, cnt, &sym_mem, &xndx);
       if (sym == NULL)
 	{
-	  ERROR (gettext ("section [%2d] '%s': cannot get symbol %zu: %s\n"),
+	  ERROR (_("section [%2d] '%s': cannot get symbol %zu: %s\n"),
 		 idx, section_name (ebl, idx), cnt, elf_errmsg (-1));
 	  continue;
 	}
@@ -710,7 +710,7 @@ section [%2d] '%s': XINDEX for zeroth entry not zero\n"),
       if (strshdr == NULL)
 	name = "";
       else if (sym->st_name >= strshdr->sh_size)
-	ERROR (gettext ("\
+	ERROR (_("\
 section [%2d] '%s': symbol %zu: invalid name value\n"),
 	       idx, section_name (ebl, idx), cnt);
       else
@@ -725,13 +725,13 @@ section [%2d] '%s': symbol %zu: invalid name value\n"),
 	  if (xndxdata == NULL)
 	    {
 	      if (!no_xndx_warned)
-		ERROR (gettext ("\
+		ERROR (_("\
 section [%2d] '%s': symbol %zu (%s): too large section index but no extended section index section\n"),
 		       idx, section_name (ebl, idx), cnt, name);
 	      no_xndx_warned = true;
 	    }
 	  else if (xndx < SHN_LORESERVE)
-	    ERROR (gettext ("\
+	    ERROR (_("\
 section [%2d] '%s': symbol %zu (%s): XINDEX used for index which would fit in st_shndx (%" PRIu32 ")\n"),
 		   xndxscnidx, section_name (ebl, xndxscnidx), cnt, name,
 		   xndx);
@@ -743,7 +743,7 @@ section [%2d] '%s': symbol %zu (%s): XINDEX used for index which would fit in st
 	       || (sym->st_shndx >= shnum
 		   && (sym->st_shndx < SHN_LORESERVE
 		       /* || sym->st_shndx > SHN_HIRESERVE  always false */)))
-	ERROR (gettext ("\
+	ERROR (_("\
 section [%2d] '%s': symbol %zu (%s): invalid section index\n"),
 	       idx, section_name (ebl, idx), cnt, name);
       else
@@ -751,18 +751,18 @@ section [%2d] '%s': symbol %zu (%s): invalid section index\n"),
 
       if (GELF_ST_TYPE (sym->st_info) >= STT_NUM
 	  && !ebl_symbol_type_name (ebl, GELF_ST_TYPE (sym->st_info), NULL, 0))
-	ERROR (gettext ("section [%2d] '%s': symbol %zu (%s): unknown type\n"),
+	ERROR (_("section [%2d] '%s': symbol %zu (%s): unknown type\n"),
 	       idx, section_name (ebl, idx), cnt, name);
 
       if (GELF_ST_BIND (sym->st_info) >= STB_NUM
 	  && !ebl_symbol_binding_name (ebl, GELF_ST_BIND (sym->st_info), NULL,
 				       0))
-	ERROR (gettext ("\
+	ERROR (_("\
 section [%2d] '%s': symbol %zu (%s): unknown symbol binding\n"),
 	       idx, section_name (ebl, idx), cnt, name);
       if (GELF_ST_BIND (sym->st_info) == STB_GNU_UNIQUE
 	  && GELF_ST_TYPE (sym->st_info) != STT_OBJECT)
-	ERROR (gettext ("\
+	ERROR (_("\
 section [%2d] '%s': symbol %zu (%s): unique symbol not of object type\n"),
 	       idx, section_name (ebl, idx), cnt, name);
 
@@ -770,15 +770,15 @@ section [%2d] '%s': symbol %zu (%s): unique symbol not of object type\n"),
 	{
 	  /* Common symbols can only appear in relocatable files.  */
 	  if (ehdr->e_type != ET_REL)
-	    ERROR (gettext ("\
+	    ERROR (_("\
 section [%2d] '%s': symbol %zu (%s): COMMON only allowed in relocatable files\n"),
 		   idx, section_name (ebl, idx), cnt, name);
 	  if (cnt < shdr->sh_info)
-	    ERROR (gettext ("\
+	    ERROR (_("\
 section [%2d] '%s': symbol %zu (%s): local COMMON symbols are nonsense\n"),
 		   idx, section_name (ebl, idx), cnt, name);
 	  if (GELF_R_TYPE (sym->st_info) == STT_FUNC)
-	    ERROR (gettext ("\
+	    ERROR (_("\
 section [%2d] '%s': symbol %zu (%s): function in COMMON section is nonsense\n"),
 		   idx, section_name (ebl, idx), cnt, name);
 	}
@@ -829,13 +829,13 @@ section [%2d] '%s': symbol %zu (%s): function in COMMON section is nonsense\n"),
 				  && strcmp (name, "__edata") != 0
 				  && strcmp (name, "_end") != 0
 				  && strcmp (name, "__end") != 0))
-			    ERROR (gettext ("\
+			    ERROR (_("\
 section [%2d] '%s': symbol %zu (%s): st_value out of bounds\n"),
 				   idx, section_name (ebl, idx), cnt, name);
 			}
 		      else if ((st_value - sh_addr
 				+ sym->st_size) > destshdr->sh_size)
-			ERROR (gettext ("\
+			ERROR (_("\
 section [%2d] '%s': symbol %zu (%s) does not fit completely in referenced section [%2d] '%s'\n"),
 			       idx, section_name (ebl, idx), cnt, name,
 			       (int) xndx, section_name (ebl, xndx));
@@ -844,7 +844,7 @@ section [%2d] '%s': symbol %zu (%s) does not fit completely in referenced sectio
 	      else
 		{
 		  if ((destshdr->sh_flags & SHF_TLS) == 0)
-		    ERROR (gettext ("\
+		    ERROR (_("\
 section [%2d] '%s': symbol %zu (%s): referenced section [%2d] '%s' does not have SHF_TLS flag set\n"),
 			   idx, section_name (ebl, idx), cnt, name,
 			   (int) xndx, section_name (ebl, xndx));
@@ -854,13 +854,13 @@ section [%2d] '%s': symbol %zu (%s): referenced section [%2d] '%s' does not have
 		      /* For object files the symbol value must fall
 			 into the section.  */
 		      if (st_value > destshdr->sh_size)
-			ERROR (gettext ("\
+			ERROR (_("\
 section [%2d] '%s': symbol %zu (%s): st_value out of bounds of referenced section [%2d] '%s'\n"),
 			       idx, section_name (ebl, idx), cnt, name,
 			       (int) xndx, section_name (ebl, xndx));
 		      else if (st_value + sym->st_size
 			       > destshdr->sh_size)
-			ERROR (gettext ("\
+			ERROR (_("\
 section [%2d] '%s': symbol %zu (%s) does not fit completely in referenced section [%2d] '%s'\n"),
 			       idx, section_name (ebl, idx), cnt, name,
 			       (int) xndx, section_name (ebl, xndx));
@@ -881,13 +881,13 @@ section [%2d] '%s': symbol %zu (%s) does not fit completely in referenced sectio
 		      if (pcnt == phnum)
 			{
 			  if (no_pt_tls++ == 0)
-			    ERROR (gettext ("\
+			    ERROR (_("\
 section [%2d] '%s': symbol %zu (%s): TLS symbol but no TLS program header entry\n"),
 				   idx, section_name (ebl, idx), cnt, name);
 			}
 		      else if (phdr == NULL)
 			{
-			    ERROR (gettext ("\
+			    ERROR (_("\
 section [%2d] '%s': symbol %zu (%s): TLS symbol but couldn't get TLS program header entry\n"),
 				   idx, section_name (ebl, idx), cnt, name);
 			}
@@ -895,21 +895,21 @@ section [%2d] '%s': symbol %zu (%s): TLS symbol but couldn't get TLS program hea
 			{
 			  if (st_value
 			      < destshdr->sh_offset - phdr->p_offset)
-			    ERROR (gettext ("\
+			    ERROR (_("\
 section [%2d] '%s': symbol %zu (%s): st_value short of referenced section [%2d] '%s'\n"),
 				   idx, section_name (ebl, idx), cnt, name,
 				   (int) xndx, section_name (ebl, xndx));
 			  else if (st_value
 				   > (destshdr->sh_offset - phdr->p_offset
 				      + destshdr->sh_size))
-			    ERROR (gettext ("\
+			    ERROR (_("\
 section [%2d] '%s': symbol %zu (%s): st_value out of bounds of referenced section [%2d] '%s'\n"),
 				   idx, section_name (ebl, idx), cnt, name,
 				   (int) xndx, section_name (ebl, xndx));
 			  else if (st_value + sym->st_size
 				   > (destshdr->sh_offset - phdr->p_offset
 				      + destshdr->sh_size))
-			    ERROR (gettext ("\
+			    ERROR (_("\
 section [%2d] '%s': symbol %zu (%s) does not fit completely in referenced section [%2d] '%s'\n"),
 				   idx, section_name (ebl, idx), cnt, name,
 				   (int) xndx, section_name (ebl, xndx));
@@ -922,21 +922,21 @@ section [%2d] '%s': symbol %zu (%s) does not fit completely in referenced sectio
       if (GELF_ST_BIND (sym->st_info) == STB_LOCAL)
 	{
 	  if (cnt >= shdr->sh_info)
-	    ERROR (gettext ("\
+	    ERROR (_("\
 section [%2d] '%s': symbol %zu (%s): local symbol outside range described in sh_info\n"),
 		   idx, section_name (ebl, idx), cnt, name);
 	}
       else
 	{
 	  if (cnt < shdr->sh_info)
-	    ERROR (gettext ("\
+	    ERROR (_("\
 section [%2d] '%s': symbol %zu (%s): non-local symbol outside range described in sh_info\n"),
 		   idx, section_name (ebl, idx), cnt, name);
 	}
 
       if (GELF_ST_TYPE (sym->st_info) == STT_SECTION
 	  && GELF_ST_BIND (sym->st_info) != STB_LOCAL)
-	ERROR (gettext ("\
+	ERROR (_("\
 section [%2d] '%s': symbol %zu (%s): non-local section symbol\n"),
 	       idx, section_name (ebl, idx), cnt, name);
 
@@ -986,14 +986,14 @@ section [%2d] '%s': symbol %zu (%s): non-local section symbol\n"),
 	      if (sname == NULL)
 		{
 		  if (xndx != SHN_UNDEF || ehdr->e_type != ET_REL)
-		    ERROR (gettext ("\
+		    ERROR (_("\
 section [%2d] '%s': _GLOBAL_OFFSET_TABLE_ symbol refers to \
 bad section [%2d]\n"),
 			   idx, section_name (ebl, idx), xndx);
 		}
 	      else if (strcmp (sname, ".got.plt") != 0
 		       && strcmp (sname, ".got") != 0)
-		ERROR (gettext ("\
+		ERROR (_("\
 section [%2d] '%s': _GLOBAL_OFFSET_TABLE_ symbol refers to \
 section [%2d] '%s'\n"),
 		       idx, section_name (ebl, idx), xndx, sname);
@@ -1009,14 +1009,14 @@ section [%2d] '%s'\n"),
 			/* This test is more strict than the psABIs which
 			   usually allow the symbol to be in the middle of
 			   the .got section, allowing negative offsets.  */
-			ERROR (gettext ("\
+			ERROR (_("\
 section [%2d] '%s': _GLOBAL_OFFSET_TABLE_ symbol value %#" PRIx64 " does not match %s section address %#" PRIx64 "\n"),
 			       idx, section_name (ebl, idx),
 			       (uint64_t) sym->st_value,
 			       sname, (uint64_t) destshdr->sh_addr);
 
 		      if (!gnuld && sym->st_size != destshdr->sh_size)
-			ERROR (gettext ("\
+			ERROR (_("\
 section [%2d] '%s': _GLOBAL_OFFSET_TABLE_ symbol size %" PRIu64 " does not match %s section size %" PRIu64 "\n"),
 			       idx, section_name (ebl, idx),
 			       (uint64_t) sym->st_size,
@@ -1024,7 +1024,7 @@ section [%2d] '%s': _GLOBAL_OFFSET_TABLE_ symbol size %" PRIu64 " does not match
 		    }
 		}
 	      else
-		ERROR (gettext ("\
+		ERROR (_("\
 section [%2d] '%s': _GLOBAL_OFFSET_TABLE_ symbol present, but no .got section\n"),
 		       idx, section_name (ebl, idx));
 	    }
@@ -1040,14 +1040,14 @@ section [%2d] '%s': _GLOBAL_OFFSET_TABLE_ symbol present, but no .got section\n"
 		if (phdr != NULL && phdr->p_type == PT_DYNAMIC)
 		  {
 		    if (sym->st_value != phdr->p_vaddr)
-		      ERROR (gettext ("\
+		      ERROR (_("\
 section [%2d] '%s': _DYNAMIC_ symbol value %#" PRIx64 " does not match dynamic segment address %#" PRIx64 "\n"),
 			     idx, section_name (ebl, idx),
 			     (uint64_t) sym->st_value,
 			     (uint64_t) phdr->p_vaddr);
 
 		    if (!gnuld && sym->st_size != phdr->p_memsz)
-		      ERROR (gettext ("\
+		      ERROR (_("\
 section [%2d] '%s': _DYNAMIC symbol size %" PRIu64 " does not match dynamic segment size %" PRIu64 "\n"),
 			     idx, section_name (ebl, idx),
 			     (uint64_t) sym->st_size,
@@ -1060,11 +1060,11 @@ section [%2d] '%s': _DYNAMIC symbol size %" PRIu64 " does not match dynamic segm
 
       if (GELF_ST_VISIBILITY (sym->st_other) != STV_DEFAULT
 	  && shdr->sh_type == SHT_DYNSYM)
-	ERROR (gettext ("\
+	ERROR (_("\
 section [%2d] '%s': symbol %zu (%s): symbol in dynamic symbol table with non-default visibility\n"),
 	       idx, section_name (ebl, idx), cnt, name);
       if (! ebl_check_st_other_bits (ebl, sym->st_other))
-	ERROR (gettext ("\
+	ERROR (_("\
 section [%2d] '%s': symbol %zu (%s): unknown bit set in st_other\n"),
 	       idx, section_name (ebl, idx), cnt, name);
 
@@ -1102,7 +1102,7 @@ is_rel_dyn (Ebl *ebl, const GElf_Ehdr *ehdr, int idx, const GElf_Shdr *shdr,
 	  size_t cnt;
 
 	  if (d == NULL)
-	    ERROR (gettext ("\
+	    ERROR (_("\
 section [%2d] '%s': cannot get section data.\n"),
 		   idx, section_name (ebl, idx));
 
@@ -1118,7 +1118,7 @@ section [%2d] '%s': cannot get section data.\n"),
 		{
 		  /* Found it.  Does the type match.  */
 		  if (is_rela)
-		    ERROR (gettext ("\
+		    ERROR (_("\
 section [%2d] '%s': DT_RELCOUNT used for this RELA section\n"),
 			   idx, section_name (ebl, idx));
 		  else
@@ -1129,7 +1129,7 @@ section [%2d] '%s': DT_RELCOUNT used for this RELA section\n"),
 		      if (shdr->sh_entsize != 0
 			  && dyn->d_un.d_val > (shdr->sh_size
 						/ shdr->sh_entsize))
-			ERROR (gettext ("\
+			ERROR (_("\
 section [%2d] '%s': DT_RELCOUNT value %d too high for this section\n"),
 			       idx, section_name (ebl, idx),
 			       (int) dyn->d_un.d_val);
@@ -1154,13 +1154,13 @@ section [%2d] '%s': DT_RELCOUNT value %d too high for this section\n"),
 						      GELF_R_TYPE (rel->r_info)))
 			      {
 				if (inner >= dyn->d_un.d_val)
-				  ERROR (gettext ("\
+				  ERROR (_("\
 section [%2d] '%s': relative relocations after index %d as specified by DT_RELCOUNT\n"),
 					 idx, section_name (ebl, idx),
 					 (int) dyn->d_un.d_val);
 			      }
 			    else if (inner < dyn->d_un.d_val)
-			      ERROR (gettext ("\
+			      ERROR (_("\
 section [%2d] '%s': non-relative relocation at index %zu; DT_RELCOUNT specified %d relative relocations\n"),
 				     idx, section_name (ebl, idx),
 				     inner, (int) dyn->d_un.d_val);
@@ -1172,7 +1172,7 @@ section [%2d] '%s': non-relative relocation at index %zu; DT_RELCOUNT specified
 		{
 		  /* Found it.  Does the type match.  */
 		  if (!is_rela)
-		    ERROR (gettext ("\
+		    ERROR (_("\
 section [%2d] '%s': DT_RELACOUNT used for this REL section\n"),
 			   idx, section_name (ebl, idx));
 		  else
@@ -1182,7 +1182,7 @@ section [%2d] '%s': DT_RELACOUNT used for this REL section\n"),
 			 relocations?  */
 		      if (shdr->sh_entsize != 0
 			  && dyn->d_un.d_val > shdr->sh_size / shdr->sh_entsize)
-			ERROR (gettext ("\
+			ERROR (_("\
 section [%2d] '%s': DT_RELCOUNT value %d too high for this section\n"),
 			       idx, section_name (ebl, idx),
 			       (int) dyn->d_un.d_val);
@@ -1207,13 +1207,13 @@ section [%2d] '%s': DT_RELCOUNT value %d too high for this section\n"),
 						      GELF_R_TYPE (rela->r_info)))
 			      {
 				if (inner >= dyn->d_un.d_val)
-				  ERROR (gettext ("\
+				  ERROR (_("\
 section [%2d] '%s': relative relocations after index %d as specified by DT_RELCOUNT\n"),
 					 idx, section_name (ebl, idx),
 					 (int) dyn->d_un.d_val);
 			      }
 			    else if (inner < dyn->d_un.d_val)
-			      ERROR (gettext ("\
+			      ERROR (_("\
 section [%2d] '%s': non-relative relocation at index %zu; DT_RELCOUNT specified %d relative relocations\n"),
 				     idx, section_name (ebl, idx),
 				     inner, (int) dyn->d_un.d_val);
@@ -1255,7 +1255,7 @@ check_reloc_shdr (Ebl *ebl, const GElf_Ehdr *ehdr, const GElf_Shdr *shdr,
 
   /* Check whether the link to the section we relocate is reasonable.  */
   if (shdr->sh_info >= shnum)
-    ERROR (gettext ("section [%2d] '%s': invalid destination section index\n"),
+    ERROR (_("section [%2d] '%s': invalid destination section index\n"),
 	   idx, section_name (ebl, idx));
   else if (shdr->sh_info != 0)
     {
@@ -1267,7 +1267,7 @@ check_reloc_shdr (Ebl *ebl, const GElf_Ehdr *ehdr, const GElf_Shdr *shdr,
 	    {
 	      reldyn = is_rel_dyn (ebl, ehdr, idx, shdr, true);
 	      if (!reldyn)
-		ERROR (gettext ("\
+		ERROR (_("\
 section [%2d] '%s': invalid destination section type\n"),
 		       idx, section_name (ebl, idx));
 	      else
@@ -1275,7 +1275,7 @@ section [%2d] '%s': invalid destination section type\n"),
 		  /* There is no standard, but we require that .rel{,a}.dyn
 		     sections have a sh_info value of zero.  */
 		  if (shdr->sh_info != 0)
-		    ERROR (gettext ("\
+		    ERROR (_("\
 section [%2d] '%s': sh_info should be zero\n"),
 			   idx, section_name (ebl, idx));
 		}
@@ -1283,7 +1283,7 @@ section [%2d] '%s': sh_info should be zero\n"),
 
 	  if ((((*destshdrp)->sh_flags & SHF_MERGE) != 0)
 	      && ((*destshdrp)->sh_flags & SHF_STRINGS) != 0)
-	    ERROR (gettext ("\
+	    ERROR (_("\
 section [%2d] '%s': no relocations for merge-able string sections possible\n"),
 		   idx, section_name (ebl, idx));
 	}
@@ -1291,7 +1291,7 @@ section [%2d] '%s': no relocations for merge-able string sections possible\n"),
 
   size_t sh_entsize = gelf_fsize (ebl->elf, reltype, 1, EV_CURRENT);
   if (shdr->sh_entsize != sh_entsize)
-    ERROR (gettext (reltype == ELF_T_RELA ? "\
+    ERROR (_(reltype == ELF_T_RELA ? "\
 section [%2d] '%s': section entry size does not match ElfXX_Rela\n" : "\
 section [%2d] '%s': section entry size does not match ElfXX_Rel\n"),
 	   idx, section_name (ebl, idx));
@@ -1351,7 +1351,7 @@ section [%2d] '%s': section entry size does not match ElfXX_Rel\n"),
       while (seg != NULL && !seg->read_only)
 	seg = seg->next;
       if (seg == NULL)
-	ERROR (gettext ("\
+	ERROR (_("\
 text relocation flag set but there is no read-only segment\n"));
     }
 
@@ -1378,7 +1378,7 @@ check_one_reloc (Ebl *ebl, GElf_Ehdr *ehdr, GElf_Shdr *relshdr, int idx,
   bool known_broken = gnuld;
 
   if (!ebl_reloc_type_check (ebl, GELF_R_TYPE (r_info)))
-    ERROR (gettext ("section [%2d] '%s': relocation %zu: invalid type\n"),
+    ERROR (_("section [%2d] '%s': relocation %zu: invalid type\n"),
 	   idx, section_name (ebl, idx), cnt);
   else if (((ehdr->e_type != ET_EXEC && ehdr->e_type != ET_DYN)
 	    /* The executable/DSO can contain relocation sections with
@@ -1386,7 +1386,7 @@ check_one_reloc (Ebl *ebl, GElf_Ehdr *ehdr, GElf_Shdr *relshdr, int idx,
 	       are marked non-loaded, though.  */
 	    || (relshdr->sh_flags & SHF_ALLOC) != 0)
 	   && !ebl_reloc_valid_use (ebl, GELF_R_TYPE (r_info)))
-    ERROR (gettext ("\
+    ERROR (_("\
 section [%2d] '%s': relocation %zu: relocation type invalid for the file type\n"),
 	   idx, section_name (ebl, idx), cnt);
 
@@ -1394,7 +1394,7 @@ section [%2d] '%s': relocation %zu: relocation type invalid for the file type\n"
       && ((GELF_R_SYM (r_info) + 1)
 	  * gelf_fsize (ebl->elf, ELF_T_SYM, 1, EV_CURRENT)
 	  > symshdr->sh_size))
-    ERROR (gettext ("\
+    ERROR (_("\
 section [%2d] '%s': relocation %zu: invalid symbol index\n"),
 	   idx, section_name (ebl, idx), cnt);
 
@@ -1412,7 +1412,7 @@ section [%2d] '%s': relocation %zu: invalid symbol index\n"),
 	  /* Get the name for the symbol.  */
 	  && (name = elf_strptr (ebl->elf, symshdr->sh_link, sym->st_name))
 	  && strcmp (name, "_GLOBAL_OFFSET_TABLE_") !=0 )
-	ERROR (gettext ("\
+	ERROR (_("\
 section [%2d] '%s': relocation %zu: only symbol '_GLOBAL_OFFSET_TABLE_' can be used with %s\n"),
 	       idx, section_name (ebl, idx), cnt,
 	       ebl_reloc_type_name (ebl, GELF_R_SYM (r_info),
@@ -1429,7 +1429,7 @@ section [%2d] '%s': relocation %zu: only symbol '_GLOBAL_OFFSET_TABLE_' can be u
 	  && GELF_R_TYPE (r_info) != 0
 	  && (r_offset - (ehdr->e_type == ET_REL ? 0
 			  : destshdr->sh_addr)) >= destshdr->sh_size)
-	ERROR (gettext ("\
+	ERROR (_("\
 section [%2d] '%s': relocation %zu: offset out of bounds\n"),
 	       idx, section_name (ebl, idx), cnt);
     }
@@ -1444,7 +1444,7 @@ section [%2d] '%s': relocation %zu: offset out of bounds\n"),
       && GELF_ST_TYPE (sym->st_info) != STT_OBJECT)
     {
       char buf[64];
-      ERROR (gettext ("section [%2d] '%s': relocation %zu: copy relocation against symbol of type %s\n"),
+      ERROR (_("section [%2d] '%s': relocation %zu: copy relocation against symbol of type %s\n"),
 	     idx, section_name (ebl, idx), cnt,
 	     ebl_symbol_type_name (ebl, GELF_ST_TYPE (sym->st_info),
 				   buf, sizeof (buf)));
@@ -1465,7 +1465,7 @@ section [%2d] '%s': relocation %zu: offset out of bounds\n"),
 		  if (textrel)
 		    needed_textrel = true;
 		  else
-		    ERROR (gettext ("section [%2d] '%s': relocation %zu: read-only section modified but text relocation flag not set\n"),
+		    ERROR (_("section [%2d] '%s': relocation %zu: read-only section modified but text relocation flag not set\n"),
 			   idx, section_name (ebl, idx), cnt);
 		}
 
@@ -1480,7 +1480,7 @@ section [%2d] '%s': relocation %zu: offset out of bounds\n"),
       else if ((*statep == state_unloaded && in_loaded_seg)
 	       || (*statep == state_loaded && !in_loaded_seg))
 	{
-	  ERROR (gettext ("\
+	  ERROR (_("\
 section [%2d] '%s': relocations are against loaded and unloaded data\n"),
 		 idx, section_name (ebl, idx));
 	  *statep = state_error;
@@ -1495,7 +1495,7 @@ check_rela (Ebl *ebl, GElf_Ehdr *ehdr, GElf_Shdr *shdr, int idx)
   Elf_Data *data = elf_getdata (elf_getscn (ebl->elf, idx), NULL);
   if (data == NULL)
     {
-      ERROR (gettext ("section [%2d] '%s': cannot get section data\n"),
+      ERROR (_("section [%2d] '%s': cannot get section data\n"),
 	     idx, section_name (ebl, idx));
       return;
     }
@@ -1520,7 +1520,7 @@ check_rela (Ebl *ebl, GElf_Ehdr *ehdr, GElf_Shdr *shdr, int idx)
       GElf_Rela *rela = gelf_getrela (data, cnt, &rela_mem);
       if (rela == NULL)
 	{
-	  ERROR (gettext ("\
+	  ERROR (_("\
 section [%2d] '%s': cannot get relocation %zu: %s\n"),
 		 idx, section_name (ebl, idx), cnt, elf_errmsg (-1));
 	  continue;
@@ -1546,7 +1546,7 @@ check_rel (Ebl *ebl, GElf_Ehdr *ehdr, GElf_Shdr *shdr, int idx)
   Elf_Data *data = elf_getdata (elf_getscn (ebl->elf, idx), NULL);
   if (data == NULL)
     {
-      ERROR (gettext ("section [%2d] '%s': cannot get section data\n"),
+      ERROR (_("section [%2d] '%s': cannot get section data\n"),
 	     idx, section_name (ebl, idx));
       return;
     }
@@ -1571,7 +1571,7 @@ check_rel (Ebl *ebl, GElf_Ehdr *ehdr, GElf_Shdr *shdr, int idx)
       GElf_Rel *rel = gelf_getrel (data, cnt, &rel_mem);
       if (rel == NULL)
 	{
-	  ERROR (gettext ("\
+	  ERROR (_("\
 section [%2d] '%s': cannot get relocation %zu: %s\n"),
 		 idx, section_name (ebl, idx), cnt, elf_errmsg (-1));
 	  continue;
@@ -1647,25 +1647,25 @@ check_dynamic (Ebl *ebl, GElf_Ehdr *ehdr, GElf_Shdr *shdr, int idx)
   memset (has_addr_dt, '\0', sizeof (has_addr_dt));
 
   if (++ndynamic == 2)
-    ERROR (gettext ("more than one dynamic section present\n"));
+    ERROR (_("more than one dynamic section present\n"));
 
   data = elf_getdata (elf_getscn (ebl->elf, idx), NULL);
   if (data == NULL)
     {
-      ERROR (gettext ("section [%2d] '%s': cannot get section data\n"),
+      ERROR (_("section [%2d] '%s': cannot get section data\n"),
 	     idx, section_name (ebl, idx));
       return;
     }
 
   strshdr = gelf_getshdr (elf_getscn (ebl->elf, shdr->sh_link), &strshdr_mem);
   if (strshdr != NULL && strshdr->sh_type != SHT_STRTAB)
-    ERROR (gettext ("\
+    ERROR (_("\
 section [%2d] '%s': referenced as string table for section [%2d] '%s' but type is not SHT_STRTAB\n"),
 	   shdr->sh_link, section_name (ebl, shdr->sh_link),
 	   idx, section_name (ebl, idx));
   else if (strshdr == NULL)
     {
-      ERROR (gettext ("\
+      ERROR (_("\
 section [%2d]: referenced as string table for section [%2d] '%s' but section link value is invalid\n"),
 	   shdr->sh_link, idx, section_name (ebl, idx));
       return;
@@ -1673,12 +1673,12 @@ section [%2d]: referenced as string table for section [%2d] '%s' but section lin
 
   size_t sh_entsize = gelf_fsize (ebl->elf, ELF_T_DYN, 1, EV_CURRENT);
   if (shdr->sh_entsize != sh_entsize)
-    ERROR (gettext ("\
+    ERROR (_("\
 section [%2d] '%s': section entry size does not match ElfXX_Dyn\n"),
 	   idx, section_name (ebl, idx));
 
   if (shdr->sh_info != 0)
-    ERROR (gettext ("section [%2d] '%s': sh_info not zero\n"),
+    ERROR (_("section [%2d] '%s': sh_info not zero\n"),
 	   idx, section_name (ebl, idx));
 
   bool non_null_warned = false;
@@ -1688,7 +1688,7 @@ section [%2d] '%s': section entry size does not match ElfXX_Dyn\n"),
       GElf_Dyn *dyn = gelf_getdyn (data, cnt, &dyn_mem);
       if (dyn == NULL)
 	{
-	  ERROR (gettext ("\
+	  ERROR (_("\
 section [%2d] '%s': cannot get dynamic section entry %zu: %s\n"),
 		 idx, section_name (ebl, idx), cnt, elf_errmsg (-1));
 	  continue;
@@ -1696,14 +1696,14 @@ section [%2d] '%s': cannot get dynamic section entry %zu: %s\n"),
 
       if (has_dt[DT_NULL] && dyn->d_tag != DT_NULL && ! non_null_warned)
 	{
-	  ERROR (gettext ("\
+	  ERROR (_("\
 section [%2d] '%s': non-DT_NULL entries follow DT_NULL entry\n"),
 		 idx, section_name (ebl, idx));
 	  non_null_warned = true;
 	}
 
       if (!ebl_dynamic_tag_check (ebl, dyn->d_tag))
-	ERROR (gettext ("section [%2d] '%s': entry %zu: unknown tag\n"),
+	ERROR (_("section [%2d] '%s': entry %zu: unknown tag\n"),
 	       idx, section_name (ebl, idx), cnt);
 
       if (dyn->d_tag >= 0 && dyn->d_tag < DT_NUM)
@@ -1714,7 +1714,7 @@ section [%2d] '%s': non-DT_NULL entries follow DT_NULL entry\n"),
 	      && dyn->d_tag != DT_POSFLAG_1)
 	    {
 	      char buf[50];
-	      ERROR (gettext ("\
+	      ERROR (_("\
 section [%2d] '%s': entry %zu: more than one entry with tag %s\n"),
 		     idx, section_name (ebl, idx), cnt,
 		     ebl_dynamic_tag_name (ebl, dyn->d_tag,
@@ -1724,7 +1724,7 @@ section [%2d] '%s': entry %zu: more than one entry with tag %s\n"),
 	  if (be_strict && level2[dyn->d_tag])
 	    {
 	      char buf[50];
-	      ERROR (gettext ("\
+	      ERROR (_("\
 section [%2d] '%s': entry %zu: level 2 tag %s used\n"),
 		     idx, section_name (ebl, idx), cnt,
 		     ebl_dynamic_tag_name (ebl, dyn->d_tag,
@@ -1742,7 +1742,7 @@ section [%2d] '%s': entry %zu: level 2 tag %s used\n"),
 
       if (dyn->d_tag == DT_PLTREL && dyn->d_un.d_val != DT_REL
 	  && dyn->d_un.d_val != DT_RELA)
-	ERROR (gettext ("\
+	ERROR (_("\
 section [%2d] '%s': entry %zu: DT_PLTREL value must be DT_REL or DT_RELA\n"),
 	       idx, section_name (ebl, idx), cnt);
 
@@ -1755,7 +1755,7 @@ section [%2d] '%s': entry %zu: DT_PLTREL value must be DT_REL or DT_RELA\n"),
 	     specified in sh_link.  */
 	  if (strshdr->sh_addr != dyn->d_un.d_val)
 	    {
-	      ERROR (gettext ("\
+	      ERROR (_("\
 section [%2d] '%s': entry %zu: pointer does not match address of section [%2d] '%s' referenced by sh_link\n"),
 		     idx, section_name (ebl, idx), cnt,
 		     shdr->sh_link, section_name (ebl, shdr->sh_link));
@@ -1798,7 +1798,7 @@ section [%2d] '%s': entry %zu: pointer does not match address of section [%2d] '
 	  if (unlikely (n >= phnum))
 	    {
 	      char buf[50];
-	      ERROR (gettext ("\
+	      ERROR (_("\
 section [%2d] '%s': entry %zu: %s value must point into loaded segment\n"),
 		     idx, section_name (ebl, idx), cnt,
 		     ebl_dynamic_tag_name (ebl, dyn->d_tag, buf,
@@ -1813,7 +1813,7 @@ section [%2d] '%s': entry %zu: %s value must point into loaded segment\n"),
 	  if (dyn->d_un.d_ptr >= strshdr->sh_size)
 	    {
 	      char buf[50];
-	      ERROR (gettext ("\
+	      ERROR (_("\
 section [%2d] '%s': entry %zu: %s value must be valid offset in section [%2d] '%s'\n"),
 		     idx, section_name (ebl, idx), cnt,
 		     ebl_dynamic_tag_name (ebl, dyn->d_tag, buf,
@@ -1833,7 +1833,7 @@ section [%2d] '%s': entry %zu: %s value must be valid offset in section [%2d] '%
 	      char buf1[50];
 	      char buf2[50];
 
-	      ERROR (gettext ("\
+	      ERROR (_("\
 section [%2d] '%s': contains %s entry but not %s\n"),
 		     idx, section_name (ebl, idx),
 		     ebl_dynamic_tag_name (ebl, cnt, buf1, sizeof (buf1)),
@@ -1845,7 +1845,7 @@ section [%2d] '%s': contains %s entry but not %s\n"),
 	if (mandatory[cnt])
 	  {
 	    char buf[50];
-	    ERROR (gettext ("\
+	    ERROR (_("\
 section [%2d] '%s': mandatory tag %s not present\n"),
 		   idx, section_name (ebl, idx),
 		   ebl_dynamic_tag_name (ebl, cnt, buf, sizeof (buf)));
@@ -1854,14 +1854,14 @@ section [%2d] '%s': mandatory tag %s not present\n"),
 
   /* Make sure we have an hash table.  */
   if (!has_dt[DT_HASH] && !has_addr_dt[DT_ADDRTAGIDX (DT_GNU_HASH)])
-    ERROR (gettext ("\
+    ERROR (_("\
 section [%2d] '%s': no hash section present\n"),
 	   idx, section_name (ebl, idx));
 
   /* The GNU-style hash table also needs a symbol table.  */
   if (!has_dt[DT_HASH] && has_addr_dt[DT_ADDRTAGIDX (DT_GNU_HASH)]
       && !has_dt[DT_SYMTAB])
-    ERROR (gettext ("\
+    ERROR (_("\
 section [%2d] '%s': contains %s entry but not %s\n"),
 	   idx, section_name (ebl, idx),
 	   "DT_GNU_HASH", "DT_SYMTAB");
@@ -1869,14 +1869,14 @@ section [%2d] '%s': contains %s entry but not %s\n"),
   /* Check the rel/rela tags.  At least one group must be available.  */
   if ((has_dt[DT_RELA] || has_dt[DT_RELASZ] || has_dt[DT_RELAENT])
       && (!has_dt[DT_RELA] || !has_dt[DT_RELASZ] || !has_dt[DT_RELAENT]))
-    ERROR (gettext ("\
+    ERROR (_("\
 section [%2d] '%s': not all of %s, %s, and %s are present\n"),
 	   idx, section_name (ebl, idx),
 	   "DT_RELA", "DT_RELASZ", "DT_RELAENT");
 
   if ((has_dt[DT_REL] || has_dt[DT_RELSZ] || has_dt[DT_RELENT])
       && (!has_dt[DT_REL] || !has_dt[DT_RELSZ] || !has_dt[DT_RELENT]))
-    ERROR (gettext ("\
+    ERROR (_("\
 section [%2d] '%s': not all of %s, %s, and %s are present\n"),
 	   idx, section_name (ebl, idx),
 	   "DT_REL", "DT_RELSZ", "DT_RELENT");
@@ -1886,17 +1886,17 @@ section [%2d] '%s': not all of %s, %s, and %s are present\n"),
       || has_val_dt[DT_VALTAGIDX (DT_CHECKSUM)])
     {
       if (!has_val_dt[DT_VALTAGIDX (DT_GNU_PRELINKED)])
-	ERROR (gettext ("\
+	ERROR (_("\
 section [%2d] '%s': %s tag missing in DSO marked during prelinking\n"),
 	       idx, section_name (ebl, idx), "DT_GNU_PRELINKED");
       if (!has_val_dt[DT_VALTAGIDX (DT_CHECKSUM)])
-	ERROR (gettext ("\
+	ERROR (_("\
 section [%2d] '%s': %s tag missing in DSO marked during prelinking\n"),
 	       idx, section_name (ebl, idx), "DT_CHECKSUM");
 
       /* Only DSOs can be marked like this.  */
       if (ehdr->e_type != ET_DYN)
-	ERROR (gettext ("\
+	ERROR (_("\
 section [%2d] '%s': non-DSO file marked as dependency during prelink\n"),
 	       idx, section_name (ebl, idx));
     }
@@ -1907,19 +1907,19 @@ section [%2d] '%s': non-DSO file marked as dependency during prelink\n"),
       || has_addr_dt[DT_ADDRTAGIDX (DT_GNU_LIBLIST)])
     {
       if (!has_val_dt[DT_VALTAGIDX (DT_GNU_CONFLICTSZ)])
-	ERROR (gettext ("\
+	ERROR (_("\
 section [%2d] '%s': %s tag missing in prelinked executable\n"),
 	       idx, section_name (ebl, idx), "DT_GNU_CONFLICTSZ");
       if (!has_val_dt[DT_VALTAGIDX (DT_GNU_LIBLISTSZ)])
-	ERROR (gettext ("\
+	ERROR (_("\
 section [%2d] '%s': %s tag missing in prelinked executable\n"),
 	       idx, section_name (ebl, idx), "DT_GNU_LIBLISTSZ");
       if (!has_addr_dt[DT_ADDRTAGIDX (DT_GNU_CONFLICT)])
-	ERROR (gettext ("\
+	ERROR (_("\
 section [%2d] '%s': %s tag missing in prelinked executable\n"),
 	       idx, section_name (ebl, idx), "DT_GNU_CONFLICT");
       if (!has_addr_dt[DT_ADDRTAGIDX (DT_GNU_LIBLIST)])
-	ERROR (gettext ("\
+	ERROR (_("\
 section [%2d] '%s': %s tag missing in prelinked executable\n"),
 	       idx, section_name (ebl, idx), "DT_GNU_LIBLIST");
     }
@@ -1931,7 +1931,7 @@ check_symtab_shndx (Ebl *ebl, GElf_Ehdr *ehdr, GElf_Shdr *shdr, int idx)
 {
   if (ehdr->e_type != ET_REL)
     {
-      ERROR (gettext ("\
+      ERROR (_("\
 section [%2d] '%s': only relocatable files can have extended section index\n"),
 	     idx, section_name (ebl, idx));
       return;
@@ -1941,19 +1941,19 @@ section [%2d] '%s': only relocatable files can have extended section index\n"),
   GElf_Shdr symshdr_mem;
   GElf_Shdr *symshdr = gelf_getshdr (symscn, &symshdr_mem);
   if (symshdr != NULL && symshdr->sh_type != SHT_SYMTAB)
-    ERROR (gettext ("\
+    ERROR (_("\
 section [%2d] '%s': extended section index section not for symbol table\n"),
 	   idx, section_name (ebl, idx));
   else if (symshdr == NULL)
-    ERROR (gettext ("\
+    ERROR (_("\
 section [%2d] '%s': sh_link extended section index [%2d] is invalid\n"),
 	   idx, section_name (ebl, idx), shdr->sh_link);
   Elf_Data *symdata = elf_getdata (symscn, NULL);
   if (symdata == NULL)
-    ERROR (gettext ("cannot get data for symbol section\n"));
+    ERROR (_("cannot get data for symbol section\n"));
 
   if (shdr->sh_entsize != sizeof (Elf32_Word))
-    ERROR (gettext ("\
+    ERROR (_("\
 section [%2d] '%s': entry size does not match Elf32_Word\n"),
 	   idx, section_name (ebl, idx));
 
@@ -1962,12 +1962,12 @@ section [%2d] '%s': entry size does not match Elf32_Word\n"),
       && symshdr->sh_entsize != 0
       && (shdr->sh_size / shdr->sh_entsize
 	  < symshdr->sh_size / symshdr->sh_entsize))
-    ERROR (gettext ("\
+    ERROR (_("\
 section [%2d] '%s': extended index table too small for symbol table\n"),
 	   idx, section_name (ebl, idx));
 
   if (shdr->sh_info != 0)
-    ERROR (gettext ("section [%2d] '%s': sh_info not zero\n"),
+    ERROR (_("section [%2d] '%s': sh_info not zero\n"),
 	   idx, section_name (ebl, idx));
 
   for (size_t cnt = idx + 1; cnt < shnum; ++cnt)
@@ -1977,7 +1977,7 @@ section [%2d] '%s': extended index table too small for symbol table\n"),
       if (rshdr != NULL && rshdr->sh_type == SHT_SYMTAB_SHNDX
 	  && rshdr->sh_link == shdr->sh_link)
 	{
-	  ERROR (gettext ("\
+	  ERROR (_("\
 section [%2d] '%s': extended section index in section [%2zu] '%s' refers to same symbol table\n"),
 		 idx, section_name (ebl, idx),
 		 cnt, section_name (ebl, cnt));
@@ -1988,14 +1988,14 @@ section [%2d] '%s': extended section index in section [%2zu] '%s' refers to same
   Elf_Data *data = elf_getdata (elf_getscn (ebl->elf, idx), NULL);
   if (data == NULL || data->d_buf == NULL)
     {
-      ERROR (gettext ("section [%2d] '%s': cannot get section data\n"),
+      ERROR (_("section [%2d] '%s': cannot get section data\n"),
 	     idx, section_name (ebl, idx));
       return;
     }
 
   if (data->d_size < sizeof (Elf32_Word)
       || *((Elf32_Word *) data->d_buf) != 0)
-    ERROR (gettext ("symbol 0 should have zero extended section index\n"));
+    ERROR (_("symbol 0 should have zero extended section index\n"));
 
   for (size_t cnt = 1; cnt < data->d_size / sizeof (Elf32_Word); ++cnt)
     {
@@ -2007,12 +2007,12 @@ section [%2d] '%s': extended section index in section [%2zu] '%s' refers to same
 	  GElf_Sym *sym = gelf_getsym (symdata, cnt, &sym_data);
 	  if (sym == NULL)
 	    {
-	      ERROR (gettext ("cannot get data for symbol %zu\n"), cnt);
+	      ERROR (_("cannot get data for symbol %zu\n"), cnt);
 	      continue;
 	    }
 
 	  if (sym->st_shndx != SHN_XINDEX)
-	    ERROR (gettext ("\
+	    ERROR (_("\
 extended section index is %" PRIu32 " but symbol index is not XINDEX\n"),
 		   (uint32_t) xndx);
 	}
@@ -2029,7 +2029,7 @@ check_sysv_hash (Ebl *ebl, GElf_Shdr *shdr, Elf_Data *data, int idx,
 
   if (shdr->sh_size < (2ULL + nbucket + nchain) * sizeof (Elf32_Word))
     {
-      ERROR (gettext ("\
+      ERROR (_("\
 section [%2d] '%s': hash table section is too small (is %ld, expected %ld)\n"),
 	     idx, section_name (ebl, idx), (long int) shdr->sh_size,
 	     (long int) ((2 + nbucket + nchain) * sizeof (Elf32_Word)));
@@ -2043,7 +2043,7 @@ section [%2d] '%s': hash table section is too small (is %ld, expected %ld)\n"),
       size_t symsize = symshdr->sh_size / symshdr->sh_entsize;
 
       if (nchain > symshdr->sh_size / symshdr->sh_entsize)
-	ERROR (gettext ("section [%2d] '%s': chain array too large\n"),
+	ERROR (_("section [%2d] '%s': chain array too large\n"),
 	       idx, section_name (ebl, idx));
 
       maxidx = symsize;
@@ -2057,7 +2057,7 @@ section [%2d] '%s': hash table section is too small (is %ld, expected %ld)\n"),
       if (buf + cnt >= end)
 	break;
       else if (buf[cnt] >= maxidx)
-      ERROR (gettext ("\
+      ERROR (_("\
 section [%2d] '%s': hash bucket reference %zu out of bounds\n"),
 	     idx, section_name (ebl, idx), cnt - 2);
     }
@@ -2067,7 +2067,7 @@ section [%2d] '%s': hash bucket reference %zu out of bounds\n"),
       if (buf + cnt >= end)
 	break;
       else if (buf[cnt] >= maxidx)
-      ERROR (gettext ("\
+      ERROR (_("\
 section [%2d] '%s': hash chain reference %zu out of bounds\n"),
 	     idx, section_name (ebl, idx), cnt - 2 - nbucket);
     }
@@ -2086,7 +2086,7 @@ check_sysv_hash64 (Ebl *ebl, GElf_Shdr *shdr, Elf_Data *data, int idx,
       || maxwords - 2 < nbucket
       || maxwords - 2 - nbucket < nchain)
     {
-      ERROR (gettext ("\
+      ERROR (_("\
 section [%2d] '%s': hash table section is too small (is %ld, expected %ld)\n"),
 	     idx, section_name (ebl, idx), (long int) shdr->sh_size,
 	     (long int) ((2 + nbucket + nchain) * sizeof (Elf64_Xword)));
@@ -2100,7 +2100,7 @@ section [%2d] '%s': hash table section is too small (is %ld, expected %ld)\n"),
       size_t symsize = symshdr->sh_size / symshdr->sh_entsize;
 
       if (nchain > symshdr->sh_size / symshdr->sh_entsize)
-	ERROR (gettext ("section [%2d] '%s': chain array too large\n"),
+	ERROR (_("section [%2d] '%s': chain array too large\n"),
 	       idx, section_name (ebl, idx));
 
       maxidx = symsize;
@@ -2114,7 +2114,7 @@ section [%2d] '%s': hash table section is too small (is %ld, expected %ld)\n"),
       if (buf + cnt >= end)
 	break;
       else if (buf[cnt] >= maxidx)
-      ERROR (gettext ("\
+      ERROR (_("\
 section [%2d] '%s': hash bucket reference %zu out of bounds\n"),
 	     idx, section_name (ebl, idx), cnt - 2);
     }
@@ -2124,7 +2124,7 @@ section [%2d] '%s': hash bucket reference %zu out of bounds\n"),
       if (buf + cnt >= end)
 	break;
       else if (buf[cnt] >= maxidx)
-      ERROR (gettext ("\
+      ERROR (_("\
 section [%2d] '%s': hash chain reference %" PRIu64 " out of bounds\n"),
 	       idx, section_name (ebl, idx), (uint64_t) cnt - 2 - nbucket);
     }
@@ -2137,7 +2137,7 @@ check_gnu_hash (Ebl *ebl, GElf_Shdr *shdr, Elf_Data *data, int idx,
 {
   if (data->d_size < 4 * sizeof (Elf32_Word))
     {
-      ERROR (gettext ("\
+      ERROR (_("\
 section [%2d] '%s': not enough data\n"),
 	     idx, section_name (ebl, idx));
       return;
@@ -2149,7 +2149,7 @@ section [%2d] '%s': not enough data\n"),
 
   if (bitmask_words == 0 || !powerof2 (bitmask_words))
     {
-      ERROR (gettext ("\
+      ERROR (_("\
 section [%2d] '%s': bitmask size zero or not power of 2: %u\n"),
 	     idx, section_name (ebl, idx), bitmask_words);
       return;
@@ -2165,7 +2165,7 @@ section [%2d] '%s': bitmask size zero or not power of 2: %u\n"),
   uint64_t used_buf = (4ULL + bitmask_words + nbuckets) * sizeof (Elf32_Word);
   if (used_buf > data->d_size)
     {
-      ERROR (gettext ("\
+      ERROR (_("\
 section [%2d] '%s': hash table section is too small (is %ld, expected at least %ld)\n"),
 	     idx, section_name (ebl, idx), (long int) shdr->sh_size,
 	     (long int) used_buf);
@@ -2174,7 +2174,7 @@ section [%2d] '%s': hash table section is too small (is %ld, expected at least %
 
   if (shift > 31)
     {
-      ERROR (gettext ("\
+      ERROR (_("\
 section [%2d] '%s': 2nd hash function shift too big: %u\n"),
 	     idx, section_name (ebl, idx), shift);
       return;
@@ -2208,7 +2208,7 @@ section [%2d] '%s': 2nd hash function shift too big: %u\n"),
 
       if (symidx < symbias)
 	{
-	  ERROR (gettext ("\
+	  ERROR (_("\
 section [%2d] '%s': hash chain for bucket %zu lower than symbol index bias\n"),
 		 idx, section_name (ebl, idx), cnt - (4 + bitmask_words));
 	  continue;
@@ -2229,7 +2229,7 @@ section [%2d] '%s': hash chain for bucket %zu lower than symbol index bias\n"),
 	      GElf_Sym *sym = gelf_getsym (symdata, symidx, &sym_mem);
 	      if (sym != NULL && sym->st_shndx == SHN_UNDEF
 		  && GELF_ST_TYPE (sym->st_info) != STT_FUNC)
-		ERROR (gettext ("\
+		ERROR (_("\
 section [%2d] '%s': symbol %u referenced in chain for bucket %zu is undefined\n"),
 		       idx, section_name (ebl, idx), symidx,
 		       cnt - (4 + bitmask_words));
@@ -2242,7 +2242,7 @@ section [%2d] '%s': symbol %u referenced in chain for bucket %zu is undefined\n"
 		{
 		  Elf32_Word hval = elf_gnu_hash (symname);
 		  if ((hval & ~1u) != (chainhash & ~1u))
-		    ERROR (gettext ("\
+		    ERROR (_("\
 section [%2d] '%s': hash value for symbol %u in chain for bucket %zu wrong\n"),
 			   idx, section_name (ebl, idx), symidx,
 			   cnt - (4 + bitmask_words));
@@ -2251,7 +2251,7 @@ section [%2d] '%s': hash value for symbol %u in chain for bucket %zu wrong\n"),
 		  size_t maskidx = (hval / classbits) & bitmask_idxmask;
 		  if (maskidx >= bitmask_words)
 		    {
-		      ERROR (gettext ("\
+		      ERROR (_("\
 section [%2d] '%s': mask index for symbol %u in chain for bucket %zu wrong\n"),
 			     idx, section_name (ebl, idx), symidx,
 			     cnt - (4 + bitmask_words));
@@ -2281,18 +2281,18 @@ section [%2d] '%s': mask index for symbol %u in chain for bucket %zu wrong\n"),
 	}
 
       if (symidx - symbias >= maxidx)
-	ERROR (gettext ("\
+	ERROR (_("\
 section [%2d] '%s': hash chain for bucket %zu out of bounds\n"),
 	       idx, section_name (ebl, idx), cnt - (4 + bitmask_words));
       else if (symshdr != NULL && symshdr->sh_entsize != 0
 	       && symidx > symshdr->sh_size / symshdr->sh_entsize)
-	ERROR (gettext ("\
+	ERROR (_("\
 section [%2d] '%s': symbol reference in chain for bucket %zu out of bounds\n"),
 	       idx, section_name (ebl, idx), cnt - (4 + bitmask_words));
     }
 
   if (memcmp (collected.p32, bitmask.p32, bitmask_words * sizeof (Elf32_Word)))
-    ERROR (gettext ("\
+    ERROR (_("\
 section [%2d] '%s': bitmask does not match names in the hash table\n"),
 	   idx, section_name (ebl, idx));
 
@@ -2305,7 +2305,7 @@ check_hash (int tag, Ebl *ebl, GElf_Ehdr *ehdr, GElf_Shdr *shdr, int idx)
 {
   if (ehdr->e_type == ET_REL)
     {
-      ERROR (gettext ("\
+      ERROR (_("\
 section [%2d] '%s': relocatable files cannot have hash tables\n"),
 	     idx, section_name (ebl, idx));
       return;
@@ -2314,7 +2314,7 @@ section [%2d] '%s': relocatable files cannot have hash tables\n"),
   Elf_Data *data = elf_getdata (elf_getscn (ebl->elf, idx), NULL);
   if (data == NULL || data->d_buf == NULL)
     {
-      ERROR (gettext ("section [%2d] '%s': cannot get section data\n"),
+      ERROR (_("section [%2d] '%s': cannot get section data\n"),
 	     idx, section_name (ebl, idx));
       return;
     }
@@ -2323,11 +2323,11 @@ section [%2d] '%s': relocatable files cannot have hash tables\n"),
   GElf_Shdr *symshdr = gelf_getshdr (elf_getscn (ebl->elf, shdr->sh_link),
 				     &symshdr_mem);
   if (symshdr != NULL && symshdr->sh_type != SHT_DYNSYM)
-    ERROR (gettext ("\
+    ERROR (_("\
 section [%2d] '%s': hash table not for dynamic symbol table\n"),
 	   idx, section_name (ebl, idx));
   else if (symshdr == NULL)
-    ERROR (gettext ("\
+    ERROR (_("\
 section [%2d] '%s': invalid sh_link symbol table section index [%2d]\n"),
 	   idx, section_name (ebl, idx), shdr->sh_link);
 
@@ -2337,17 +2337,17 @@ section [%2d] '%s': invalid sh_link symbol table section index [%2d]\n"),
 			   : (size_t) ebl_sysvhash_entrysize (ebl));
 
   if (shdr->sh_entsize != expect_entsize)
-    ERROR (gettext ("\
+    ERROR (_("\
 section [%2d] '%s': hash table entry size incorrect\n"),
 	   idx, section_name (ebl, idx));
 
   if ((shdr->sh_flags & SHF_ALLOC) == 0)
-    ERROR (gettext ("section [%2d] '%s': not marked to be allocated\n"),
+    ERROR (_("section [%2d] '%s': not marked to be allocated\n"),
 	   idx, section_name (ebl, idx));
 
   if (shdr->sh_size < (tag == SHT_GNU_HASH ? 4 : 2) * (expect_entsize ?: 4))
     {
-      ERROR (gettext ("\
+      ERROR (_("\
 section [%2d] '%s': hash table has not even room for initial administrative entries\n"),
 	     idx, section_name (ebl, idx));
       return;
@@ -2396,7 +2396,7 @@ compare_hash_gnu_hash (Ebl *ebl, GElf_Ehdr *ehdr, size_t hash_idx,
   /* The link must point to the same symbol table.  */
   if (hash_shdr->sh_link != gnu_hash_shdr->sh_link)
     {
-      ERROR (gettext ("\
+      ERROR (_("\
 sh_link in hash sections [%2zu] '%s' and [%2zu] '%s' not identical\n"),
 	     hash_idx, elf_strptr (ebl->elf, shstrndx, hash_shdr->sh_name),
 	     gnu_hash_idx,
@@ -2420,7 +2420,7 @@ sh_link in hash sections [%2zu] '%s' and [%2zu] '%s' not identical\n"),
 
   if (gnu_hash_data->d_size < 4 * sizeof (Elf32_Word))
     {
-      ERROR (gettext ("\
+      ERROR (_("\
 hash section [%2zu] '%s' does not contain enough data\n"),
 	     gnu_hash_idx, gnu_hash_name);
       return;
@@ -2441,7 +2441,7 @@ hash section [%2zu] '%s' does not contain enough data\n"),
 
   if (gnu_hasharr[2] == 0)
     {
-      ERROR (gettext ("\
+      ERROR (_("\
 hash section [%2zu] '%s' has zero bit mask words\n"),
 	     gnu_hash_idx, gnu_hash_name);
       return;
@@ -2452,7 +2452,7 @@ hash section [%2zu] '%s' has zero bit mask words\n"),
   uint32_t max_nsyms = (gnu_hash_data->d_size - used_buf) / sizeof (Elf32_Word);
   if (used_buf > gnu_hash_data->d_size)
     {
-      ERROR (gettext ("\
+      ERROR (_("\
 hash section [%2zu] '%s' uses too much data\n"),
 	     gnu_hash_idx, gnu_hash_name);
       return;
@@ -2467,7 +2467,7 @@ hash section [%2zu] '%s' uses too much data\n"),
 	    {
 	      if (symidx >= max_nsyms || symidx + gnu_symbias >= nentries)
 		{
-		  ERROR (gettext ("\
+		  ERROR (_("\
 hash section [%2zu] '%s' invalid symbol index %" PRIu32 " (max_nsyms: %" PRIu32 ", nentries: %" PRIu32 "\n"),
 			 gnu_hash_idx, gnu_hash_name, symidx, max_nsyms, nentries);
 		  return;
@@ -2485,7 +2485,7 @@ hash section [%2zu] '%s' invalid symbol index %" PRIu32 " (max_nsyms: %" PRIu32
       const Elf32_Word *hasharr = (Elf32_Word *) hash_data->d_buf;
       if (hash_data->d_size < 2 * sizeof (Elf32_Word))
 	{
-	  ERROR (gettext ("\
+	  ERROR (_("\
 hash section [%2zu] '%s' does not contain enough data\n"),
 		 hash_idx, hash_name);
 	  return;
@@ -2496,7 +2496,7 @@ hash section [%2zu] '%s' does not contain enough data\n"),
       uint64_t hash_used = (2ULL + nchain + nbucket) * sizeof (Elf32_Word);
       if (hash_used > hash_data->d_size)
 	{
-	  ERROR (gettext ("\
+	  ERROR (_("\
 hash section [%2zu] '%s' uses too much data\n"),
 		 hash_idx, hash_name);
 	  return;
@@ -2520,7 +2520,7 @@ hash section [%2zu] '%s' uses too much data\n"),
       const Elf64_Xword *hasharr = (Elf64_Xword *) hash_data->d_buf;
       if (hash_data->d_size < 2 * sizeof (Elf32_Word))
 	{
-	  ERROR (gettext ("\
+	  ERROR (_("\
 hash section [%2zu] '%s' does not contain enough data\n"),
 		 hash_idx, hash_name);
 	  return;
@@ -2533,7 +2533,7 @@ hash section [%2zu] '%s' does not contain enough data\n"),
 	  || maxwords - 2 < nbucket
 	  || maxwords - 2 - nbucket < nchain)
 	{
-	  ERROR (gettext ("\
+	  ERROR (_("\
 hash section [%2zu] '%s' uses too much data\n"),
 		 hash_idx, hash_name);
 	  return;
@@ -2554,7 +2554,7 @@ hash section [%2zu] '%s' uses too much data\n"),
     }
   else
     {
-      ERROR (gettext ("\
+      ERROR (_("\
 hash section [%2zu] '%s' invalid sh_entsize\n"),
 	     hash_idx, hash_name);
       return;
@@ -2564,18 +2564,18 @@ hash section [%2zu] '%s' invalid sh_entsize\n"),
      (unless the symbol is undefined in which case it can be omitted
      in the new table format).  */
   if ((used[0] & 1) != 0)
-    ERROR (gettext ("section [%2zu] '%s': reference to symbol index 0\n"),
+    ERROR (_("section [%2zu] '%s': reference to symbol index 0\n"),
 	   gnu_hash_idx,
 	   elf_strptr (ebl->elf, shstrndx, gnu_hash_shdr->sh_name));
   if ((used[0] & 2) != 0)
-    ERROR (gettext ("section [%2zu] '%s': reference to symbol index 0\n"),
+    ERROR (_("section [%2zu] '%s': reference to symbol index 0\n"),
 	   hash_idx, elf_strptr (ebl->elf, shstrndx, hash_shdr->sh_name));
 
   for (uint32_t cnt = 1; cnt < nentries; ++cnt)
     if (used[cnt] != 0 && used[cnt] != 3)
       {
 	if (used[cnt] == 1)
-	  ERROR (gettext ("\
+	  ERROR (_("\
 symbol %d referenced in new hash table in [%2zu] '%s' but not in old hash table in [%2zu] '%s'\n"),
 		 cnt, gnu_hash_idx,
 		 elf_strptr (ebl->elf, shstrndx, gnu_hash_shdr->sh_name),
@@ -2587,7 +2587,7 @@ symbol %d referenced in new hash table in [%2zu] '%s' but not in old hash table
 	    GElf_Sym *sym = gelf_getsym (sym_data, cnt, &sym_mem);
 
 	    if (sym != NULL && sym->st_shndx != STN_UNDEF)
-	      ERROR (gettext ("\
+	      ERROR (_("\
 symbol %d referenced in old hash table in [%2zu] '%s' but not in new hash table in [%2zu] '%s'\n"),
 		     cnt, hash_idx,
 		     elf_strptr (ebl->elf, shstrndx, hash_shdr->sh_name),
@@ -2603,7 +2603,7 @@ check_null (Ebl *ebl, GElf_Shdr *shdr, int idx)
 {
 #define TEST(name, extra) \
   if (extra && shdr->sh_##name != 0)					      \
-    ERROR (gettext ("section [%2d] '%s': nonzero sh_%s for NULL section\n"),  \
+    ERROR (_("section [%2d] '%s': nonzero sh_%s for NULL section\n"),  \
 	   idx, section_name (ebl, idx), #name)
 
   TEST (name, 1);
@@ -2623,7 +2623,7 @@ check_group (Ebl *ebl, GElf_Ehdr *ehdr, GElf_Shdr *shdr, int idx)
 {
   if (ehdr->e_type != ET_REL)
     {
-      ERROR (gettext ("\
+      ERROR (_("\
 section [%2d] '%s': section groups only allowed in relocatable object files\n"),
 	     idx, section_name (ebl, idx));
       return;
@@ -2634,51 +2634,51 @@ section [%2d] '%s': section groups only allowed in relocatable object files\n"),
   GElf_Shdr symshdr_mem;
   GElf_Shdr *symshdr = gelf_getshdr (symscn, &symshdr_mem);
   if (symshdr == NULL)
-    ERROR (gettext ("section [%2d] '%s': cannot get symbol table: %s\n"),
+    ERROR (_("section [%2d] '%s': cannot get symbol table: %s\n"),
 	   idx, section_name (ebl, idx), elf_errmsg (-1));
   else
     {
       if (symshdr->sh_type != SHT_SYMTAB)
-	ERROR (gettext ("\
+	ERROR (_("\
 section [%2d] '%s': section reference in sh_link is no symbol table\n"),
 	       idx, section_name (ebl, idx));
 
       if (shdr->sh_info >= symshdr->sh_size / gelf_fsize (ebl->elf, ELF_T_SYM,
 							  1, EV_CURRENT))
-	ERROR (gettext ("\
+	ERROR (_("\
 section [%2d] '%s': invalid symbol index in sh_info\n"),
 	       idx, section_name (ebl, idx));
 
       if (shdr->sh_flags != 0)
-	ERROR (gettext ("section [%2d] '%s': sh_flags not zero\n"),
+	ERROR (_("section [%2d] '%s': sh_flags not zero\n"),
 	       idx, section_name (ebl, idx));
 
       GElf_Sym sym_data;
       GElf_Sym *sym = gelf_getsym (elf_getdata (symscn, NULL), shdr->sh_info,
 				   &sym_data);
       if (sym == NULL)
-	ERROR (gettext ("\
+	ERROR (_("\
 section [%2d] '%s': cannot get symbol for signature\n"),
 	       idx, section_name (ebl, idx));
       else if (elf_strptr (ebl->elf, symshdr->sh_link, sym->st_name) == NULL)
-	ERROR (gettext ("\
+	ERROR (_("\
 section [%2d] '%s': cannot get symbol name for signature\n"),
 	       idx, section_name (ebl, idx));
       else if (strcmp (elf_strptr (ebl->elf, symshdr->sh_link, sym->st_name),
 		       "") == 0)
-	ERROR (gettext ("\
+	ERROR (_("\
 section [%2d] '%s': signature symbol cannot be empty string\n"),
 	       idx, section_name (ebl, idx));
 
       if (be_strict
 	  && shdr->sh_entsize != elf32_fsize (ELF_T_WORD, 1, EV_CURRENT))
-	ERROR (gettext ("section [%2d] '%s': sh_flags not set correctly\n"),
+	ERROR (_("section [%2d] '%s': sh_flags not set correctly\n"),
 	       idx, section_name (ebl, idx));
     }
 
   Elf_Data *data = elf_getdata (elf_getscn (ebl->elf, idx), NULL);
   if (data == NULL || data->d_buf == NULL)
-    ERROR (gettext ("section [%2d] '%s': cannot get data: %s\n"),
+    ERROR (_("section [%2d] '%s': cannot get data: %s\n"),
 	   idx, section_name (ebl, idx), elf_errmsg (-1));
   else
     {
@@ -2687,13 +2687,13 @@ section [%2d] '%s': signature symbol cannot be empty string\n"),
       Elf32_Word val;
 
       if (data->d_size % elsize != 0)
-	ERROR (gettext ("\
+	ERROR (_("\
 section [%2d] '%s': section size not multiple of sizeof(Elf32_Word)\n"),
 	       idx, section_name (ebl, idx));
 
       if (data->d_size < elsize)
 	{
-	  ERROR (gettext ("\
+	  ERROR (_("\
 section [%2d] '%s': section group without flags word\n"),
 	       idx, section_name (ebl, idx));
 	  return;
@@ -2701,11 +2701,11 @@ section [%2d] '%s': section group without flags word\n"),
       else if (be_strict)
 	{
 	  if (data->d_size < 2 * elsize)
-	    ERROR (gettext ("\
+	    ERROR (_("\
 section [%2d] '%s': section group without member\n"),
 		   idx, section_name (ebl, idx));
 	  else if (data->d_size < 3 * elsize)
-	    ERROR (gettext ("\
+	    ERROR (_("\
 section [%2d] '%s': section group with only one member\n"),
 		   idx, section_name (ebl, idx));
 	}
@@ -2716,7 +2716,7 @@ section [%2d] '%s': section group with only one member\n"),
       memcpy (&val, data->d_buf, elsize);
 #endif
       if ((val & ~GRP_COMDAT) != 0)
-	ERROR (gettext ("section [%2d] '%s': unknown section group flags\n"),
+	ERROR (_("section [%2d] '%s': unknown section group flags\n"),
 	       idx, section_name (ebl, idx));
 
       for (cnt = elsize; cnt + elsize <= data->d_size; cnt += elsize)
@@ -2728,7 +2728,7 @@ section [%2d] '%s': section group with only one member\n"),
 #endif
 
 	  if (val > shnum)
-	    ERROR (gettext ("\
+	    ERROR (_("\
 section [%2d] '%s': section index %zu out of range\n"),
 		   idx, section_name (ebl, idx), cnt / elsize);
 	  else
@@ -2737,27 +2737,27 @@ section [%2d] '%s': section index %zu out of range\n"),
 	      GElf_Shdr *refshdr = gelf_getshdr (elf_getscn (ebl->elf, val),
 						 &refshdr_mem);
 	      if (refshdr == NULL)
-		ERROR (gettext ("\
+		ERROR (_("\
 section [%2d] '%s': cannot get section header for element %zu: %s\n"),
 		       idx, section_name (ebl, idx), cnt / elsize,
 		       elf_errmsg (-1));
 	      else
 		{
 		  if (refshdr->sh_type == SHT_GROUP)
-		    ERROR (gettext ("\
+		    ERROR (_("\
 section [%2d] '%s': section group contains another group [%2d] '%s'\n"),
 			   idx, section_name (ebl, idx),
 			   val, section_name (ebl, val));
 
 		  if ((refshdr->sh_flags & SHF_GROUP) == 0)
-		    ERROR (gettext ("\
+		    ERROR (_("\
 section [%2d] '%s': element %zu references section [%2d] '%s' without SHF_GROUP flag set\n"),
 			   idx, section_name (ebl, idx), cnt / elsize,
 			   val, section_name (ebl, val));
 		}
 
 	      if (val < shnum && ++scnref[val] == 2)
-		ERROR (gettext ("\
+		ERROR (_("\
 section [%2d] '%s' is contained in more than one section group\n"),
 		       val, section_name (ebl, val));
 	    }
@@ -2933,7 +2933,7 @@ check_versym (Ebl *ebl, int idx)
   Elf_Data *data = elf_getdata (scn, NULL);
   if (data == NULL)
     {
-      ERROR (gettext ("section [%2d] '%s': cannot get section data\n"),
+      ERROR (_("section [%2d] '%s': cannot get section data\n"),
 	     idx, section_name (ebl, idx));
       return;
     }
@@ -2947,7 +2947,7 @@ check_versym (Ebl *ebl, int idx)
 
   if (symshdr->sh_type != SHT_DYNSYM)
     {
-      ERROR (gettext ("\
+      ERROR (_("\
 section [%2d] '%s' refers in sh_link to section [%2d] '%s' which is no dynamic symbol table\n"),
 	     idx, section_name (ebl, idx),
 	     shdr->sh_link, section_name (ebl, shdr->sh_link));
@@ -2959,7 +2959,7 @@ section [%2d] '%s' refers in sh_link to section [%2d] '%s' which is no dynamic s
   if (shdr->sh_entsize != 0 && symshdr->sh_entsize != 0
       && (shdr->sh_size / shdr->sh_entsize
 	  != symshdr->sh_size / symshdr->sh_entsize))
-    ERROR (gettext ("\
+    ERROR (_("\
 section [%2d] '%s' has different number of entries than symbol table [%2d] '%s'\n"),
 	   idx, section_name (ebl, idx),
 	   shdr->sh_link, section_name (ebl, shdr->sh_link));
@@ -2975,7 +2975,7 @@ section [%2d] '%s' has different number of entries than symbol table [%2d] '%s'\
       GElf_Versym *versym = gelf_getversym (data, cnt, &versym_mem);
       if (versym == NULL)
 	{
-	  ERROR (gettext ("\
+	  ERROR (_("\
 section [%2d] '%s': symbol %d: cannot read version data\n"),
 		 idx, section_name (ebl, idx), cnt);
 	  break;
@@ -2991,7 +2991,7 @@ section [%2d] '%s': symbol %d: cannot read version data\n"),
 	{
 	  /* Global symbol.  Make sure it is not defined as local.  */
 	  if (GELF_ST_BIND (sym->st_info) == STB_LOCAL)
-	    ERROR (gettext ("\
+	    ERROR (_("\
 section [%2d] '%s': symbol %d: local symbol with global scope\n"),
 		   idx, section_name (ebl, idx), cnt);
 	}
@@ -2999,7 +2999,7 @@ section [%2d] '%s': symbol %d: local symbol with global scope\n"),
 	{
 	  /* Versioned symbol.  Make sure it is not defined as local.  */
 	  if (!gnuld && GELF_ST_BIND (sym->st_info) == STB_LOCAL)
-	    ERROR (gettext ("\
+	    ERROR (_("\
 section [%2d] '%s': symbol %d: local symbol with version\n"),
 		   idx, section_name (ebl, idx), cnt);
 
@@ -3013,12 +3013,12 @@ section [%2d] '%s': symbol %d: local symbol with version\n"),
 	      runp = runp->next;
 
 	  if (runp == NULL)
-	    ERROR (gettext ("\
+	    ERROR (_("\
 section [%2d] '%s': symbol %d: invalid version index %d\n"),
 		   idx, section_name (ebl, idx), cnt, (int) *versym);
 	  else if (sym->st_shndx == SHN_UNDEF
 		   && runp->type == ver_def)
-	    ERROR (gettext ("\
+	    ERROR (_("\
 section [%2d] '%s': symbol %d: version index %d is for defined version\n"),
 		   idx, section_name (ebl, idx), cnt, (int) *versym);
 	  else if (sym->st_shndx != SHN_UNDEF
@@ -3028,7 +3028,7 @@ section [%2d] '%s': symbol %d: version index %d is for defined version\n"),
 		 this must not happen.  */
 	      if (!has_copy_reloc (ebl, shdr->sh_link, cnt)
 		  && !in_nobits_scn (ebl, sym->st_shndx))
-		ERROR (gettext ("\
+		ERROR (_("\
 section [%2d] '%s': symbol %d: version index %d is for requested version\n"),
 		       idx, section_name (ebl, idx), cnt, (int) *versym);
 	    }
@@ -3081,7 +3081,7 @@ static void
 check_verneed (Ebl *ebl, GElf_Shdr *shdr, int idx)
 {
   if (++nverneed == 2)
-    ERROR (gettext ("more than one version reference section present\n"));
+    ERROR (_("more than one version reference section present\n"));
 
   GElf_Shdr strshdr_mem;
   GElf_Shdr *strshdr = gelf_getshdr (elf_getscn (ebl->elf, shdr->sh_link),
@@ -3089,14 +3089,14 @@ check_verneed (Ebl *ebl, GElf_Shdr *shdr, int idx)
   if (strshdr == NULL)
     return;
   if (strshdr->sh_type != SHT_STRTAB)
-    ERROR (gettext ("\
+    ERROR (_("\
 section [%2d] '%s': sh_link does not link to string table\n"),
 	   idx, section_name (ebl, idx));
 
   Elf_Data *data = elf_getdata (elf_getscn (ebl->elf, idx), NULL);
   if (data == NULL)
     {
-      ERROR (gettext ("section [%2d] '%s': cannot get section data\n"),
+      ERROR (_("section [%2d] '%s': cannot get section data\n"),
 	     idx, section_name (ebl, idx));
       return;
     }
@@ -3114,14 +3114,14 @@ section [%2d] '%s': sh_link does not link to string table\n"),
       unsigned int auxoffset = offset + need->vn_aux;
 
       if (need->vn_version != EV_CURRENT)
-	ERROR (gettext ("\
+	ERROR (_("\
 section [%2d] '%s': entry %d has wrong version %d\n"),
 	       idx, section_name (ebl, idx), cnt, (int) need->vn_version);
 
       if (need->vn_cnt > 0 && need->vn_aux < gelf_fsize (ebl->elf, ELF_T_VNEED,
 							 1, EV_CURRENT))
 	{
-	  ERROR (gettext ("\
+	  ERROR (_("\
 section [%2d] '%s': entry %d has wrong offset of auxiliary data\n"),
 	         idx, section_name (ebl, idx), cnt);
 	  break;
@@ -3131,7 +3131,7 @@ section [%2d] '%s': entry %d has wrong offset of auxiliary data\n"),
 					need->vn_file);
       if (libname == NULL)
 	{
-	  ERROR (gettext ("\
+	  ERROR (_("\
 section [%2d] '%s': entry %d has invalid file reference\n"),
 		 idx, section_name (ebl, idx), cnt);
 	  goto next_need;
@@ -3139,7 +3139,7 @@ section [%2d] '%s': entry %d has invalid file reference\n"),
 
       /* Check that there is a DT_NEEDED entry for the referenced library.  */
       if (unknown_dependency_p (ebl->elf, libname))
-	ERROR (gettext ("\
+	ERROR (_("\
 section [%2d] '%s': entry %d references unknown dependency\n"),
 	       idx, section_name (ebl, idx), cnt);
 
@@ -3151,7 +3151,7 @@ section [%2d] '%s': entry %d references unknown dependency\n"),
 	    break;
 
 	  if ((aux->vna_flags & ~VER_FLG_WEAK) != 0)
-	    ERROR (gettext ("\
+	    ERROR (_("\
 section [%2d] '%s': auxiliary entry %d of entry %d has unknown flag\n"),
 		   idx, section_name (ebl, idx), need->vn_cnt - cnt2, cnt);
 
@@ -3159,7 +3159,7 @@ section [%2d] '%s': auxiliary entry %d of entry %d has unknown flag\n"),
 					   aux->vna_name);
 	  if (verstr == NULL)
 	    {
-	      ERROR (gettext ("\
+	      ERROR (_("\
 section [%2d] '%s': auxiliary entry %d of entry %d has invalid name reference\n"),
 		     idx, section_name (ebl, idx), need->vn_cnt - cnt2, cnt);
 	      break;
@@ -3168,7 +3168,7 @@ section [%2d] '%s': auxiliary entry %d of entry %d has invalid name reference\n"
 	    {
 	      GElf_Word hashval = elf_hash (verstr);
 	      if (hashval != aux->vna_hash)
-		ERROR (gettext ("\
+		ERROR (_("\
 section [%2d] '%s': auxiliary entry %d of entry %d has wrong hash value: %#x, expected %#x\n"),
 		       idx, section_name (ebl, idx), need->vn_cnt - cnt2,
 		       cnt, (int) hashval, (int) aux->vna_hash);
@@ -3177,7 +3177,7 @@ section [%2d] '%s': auxiliary entry %d of entry %d has wrong hash value: %#x, ex
 				     ver_need);
 	      if (unlikely (res !=0))
 		{
-		  ERROR (gettext ("\
+		  ERROR (_("\
 section [%2d] '%s': auxiliary entry %d of entry %d has duplicate version name '%s'\n"),
 			 idx, section_name (ebl, idx), need->vn_cnt - cnt2,
 			 cnt, verstr);
@@ -3188,7 +3188,7 @@ section [%2d] '%s': auxiliary entry %d of entry %d has duplicate version name '%
 	      && aux->vna_next < gelf_fsize (ebl->elf, ELF_T_VNAUX, 1,
 					     EV_CURRENT))
 	    {
-	      ERROR (gettext ("\
+	      ERROR (_("\
 section [%2d] '%s': auxiliary entry %d of entry %d has wrong next field\n"),
 		     idx, section_name (ebl, idx), need->vn_cnt - cnt2, cnt);
 	      break;
@@ -3205,7 +3205,7 @@ section [%2d] '%s': auxiliary entry %d of entry %d has wrong next field\n"),
       if ((need->vn_next != 0 || cnt > 0)
 	  && offset < auxoffset)
 	{
-	  ERROR (gettext ("\
+	  ERROR (_("\
 section [%2d] '%s': entry %d has invalid offset to next entry\n"),
 	         idx, section_name (ebl, idx), cnt);
 	  break;
@@ -3213,7 +3213,7 @@ section [%2d] '%s': entry %d has invalid offset to next entry\n"),
 
       if (need->vn_next == 0 && cnt > 0)
 	{
-	  ERROR (gettext ("\
+	  ERROR (_("\
 section [%2d] '%s': entry %d has zero offset to next entry, but sh_info says there are more entries\n"),
 	         idx, section_name (ebl, idx), cnt);
 	  break;
@@ -3228,7 +3228,7 @@ static void
 check_verdef (Ebl *ebl, GElf_Shdr *shdr, int idx)
 {
   if (++nverdef == 2)
-    ERROR (gettext ("more than one version definition section present\n"));
+    ERROR (_("more than one version definition section present\n"));
 
   GElf_Shdr strshdr_mem;
   GElf_Shdr *strshdr = gelf_getshdr (elf_getscn (ebl->elf, shdr->sh_link),
@@ -3236,7 +3236,7 @@ check_verdef (Ebl *ebl, GElf_Shdr *shdr, int idx)
   if (strshdr == NULL)
     return;
   if (strshdr->sh_type != SHT_STRTAB)
-    ERROR (gettext ("\
+    ERROR (_("\
 section [%2d] '%s': sh_link does not link to string table\n"),
 	   idx, section_name (ebl, idx));
 
@@ -3244,7 +3244,7 @@ section [%2d] '%s': sh_link does not link to string table\n"),
   if (data == NULL)
     {
     no_data:
-      ERROR (gettext ("section [%2d] '%s': cannot get section data\n"),
+      ERROR (_("section [%2d] '%s': cannot get section data\n"),
 	     idx, section_name (ebl, idx));
       return;
     }
@@ -3275,29 +3275,29 @@ section [%2d] '%s': sh_link does not link to string table\n"),
       if ((def->vd_flags & VER_FLG_BASE) != 0)
 	{
 	  if (has_base)
-	    ERROR (gettext ("\
+	    ERROR (_("\
 section [%2d] '%s': more than one BASE definition\n"),
 		   idx, section_name (ebl, idx));
 	  if (def->vd_ndx != VER_NDX_GLOBAL)
-	    ERROR (gettext ("\
+	    ERROR (_("\
 section [%2d] '%s': BASE definition must have index VER_NDX_GLOBAL\n"),
 		   idx, section_name (ebl, idx));
 	  has_base = true;
 	}
       if ((def->vd_flags & ~(VER_FLG_BASE|VER_FLG_WEAK)) != 0)
-	ERROR (gettext ("\
+	ERROR (_("\
 section [%2d] '%s': entry %d has unknown flag\n"),
 	       idx, section_name (ebl, idx), cnt);
 
       if (def->vd_version != EV_CURRENT)
-	ERROR (gettext ("\
+	ERROR (_("\
 section [%2d] '%s': entry %d has wrong version %d\n"),
 	       idx, section_name (ebl, idx), cnt, (int) def->vd_version);
 
       if (def->vd_cnt > 0 && def->vd_aux < gelf_fsize (ebl->elf, ELF_T_VDEF,
 						       1, EV_CURRENT))
 	{
-	  ERROR (gettext ("\
+	  ERROR (_("\
 section [%2d] '%s': entry %d has wrong offset of auxiliary data\n"),
 	         idx, section_name (ebl, idx), cnt);
 	  break;
@@ -3312,14 +3312,14 @@ section [%2d] '%s': entry %d has wrong offset of auxiliary data\n"),
       const char *name = elf_strptr (ebl->elf, shdr->sh_link, aux->vda_name);
       if (name == NULL)
 	{
-	  ERROR (gettext ("\
+	  ERROR (_("\
 section [%2d] '%s': entry %d has invalid name reference\n"),
 		 idx, section_name (ebl, idx), cnt);
 	  goto next_def;
 	}
       GElf_Word hashval = elf_hash (name);
       if (def->vd_hash != hashval)
-	ERROR (gettext ("\
+	ERROR (_("\
 section [%2d] '%s': entry %d has wrong hash value: %#x, expected %#x\n"),
 	       idx, section_name (ebl, idx), cnt, (int) hashval,
 	       (int) def->vd_hash);
@@ -3327,7 +3327,7 @@ section [%2d] '%s': entry %d has wrong hash value: %#x, expected %#x\n"),
       int res = add_version (NULL, name, def->vd_ndx, ver_def);
       if (unlikely (res !=0))
 	{
-	  ERROR (gettext ("\
+	  ERROR (_("\
 section [%2d] '%s': entry %d has duplicate version name '%s'\n"),
 		 idx, section_name (ebl, idx), cnt, name);
 	}
@@ -3347,7 +3347,7 @@ section [%2d] '%s': entry %d has duplicate version name '%s'\n"),
 	  name = elf_strptr (ebl->elf, shdr->sh_link, aux->vda_name);
 	  if (name == NULL)
 	    {
-	      ERROR (gettext ("\
+	      ERROR (_("\
 section [%2d] '%s': entry %d has invalid name reference in auxiliary data\n"),
 		     idx, section_name (ebl, idx), cnt);
 	      break;
@@ -3364,7 +3364,7 @@ section [%2d] '%s': entry %d has invalid name reference in auxiliary data\n"),
 	      && aux->vda_next < gelf_fsize (ebl->elf, ELF_T_VDAUX, 1,
 					     EV_CURRENT))
 	    {
-	      ERROR (gettext ("\
+	      ERROR (_("\
 section [%2d] '%s': entry %d has wrong next field in auxiliary data\n"),
 		     idx, section_name (ebl, idx), cnt);
 	      break;
@@ -3381,7 +3381,7 @@ section [%2d] '%s': entry %d has wrong next field in auxiliary data\n"),
       if ((def->vd_next != 0 || cnt > 0)
 	  && offset < auxoffset)
 	{
-	  ERROR (gettext ("\
+	  ERROR (_("\
 section [%2d] '%s': entry %d has invalid offset to next entry\n"),
 	         idx, section_name (ebl, idx), cnt);
 	  break;
@@ -3389,7 +3389,7 @@ section [%2d] '%s': entry %d has invalid offset to next entry\n"),
 
       if (def->vd_next == 0 && cnt > 0)
 	{
-	  ERROR (gettext ("\
+	  ERROR (_("\
 section [%2d] '%s': entry %d has zero offset to next entry, but sh_info says there are more entries\n"),
 	         idx, section_name (ebl, idx), cnt);
 	  break;
@@ -3397,7 +3397,7 @@ section [%2d] '%s': entry %d has zero offset to next entry, but sh_info says the
     }
 
   if (!has_base)
-    ERROR (gettext ("section [%2d] '%s': no BASE definition\n"),
+    ERROR (_("section [%2d] '%s': no BASE definition\n"),
 	   idx, section_name (ebl, idx));
 
   /* Check whether the referenced names are available.  */
@@ -3413,7 +3413,7 @@ section [%2d] '%s': entry %d has zero offset to next entry, but sh_info says the
 	}
 
       if (runp == NULL)
-	ERROR (gettext ("\
+	ERROR (_("\
 section [%2d] '%s': unknown parent version '%s'\n"),
 	       idx, section_name (ebl, idx), namelist->name);
 
@@ -3426,7 +3426,7 @@ check_attributes (Ebl *ebl, GElf_Ehdr *ehdr, GElf_Shdr *shdr, int idx)
 {
   if (shdr->sh_size == 0)
     {
-      ERROR (gettext ("section [%2d] '%s': empty object attributes section\n"),
+      ERROR (_("section [%2d] '%s': empty object attributes section\n"),
 	     idx, section_name (ebl, idx));
       return;
     }
@@ -3434,7 +3434,7 @@ check_attributes (Ebl *ebl, GElf_Ehdr *ehdr, GElf_Shdr *shdr, int idx)
   Elf_Data *data = elf_rawdata (elf_getscn (ebl->elf, idx), NULL);
   if (data == NULL || data->d_size == 0 || data->d_buf == NULL)
     {
-      ERROR (gettext ("section [%2d] '%s': cannot get section data\n"),
+      ERROR (_("section [%2d] '%s': cannot get section data\n"),
 	     idx, section_name (ebl, idx));
       return;
     }
@@ -3447,7 +3447,7 @@ check_attributes (Ebl *ebl, GElf_Ehdr *ehdr, GElf_Shdr *shdr, int idx)
   const unsigned char *p = data->d_buf;
   if (*p++ != 'A')
     {
-      ERROR (gettext ("section [%2d] '%s': unrecognized attribute format\n"),
+      ERROR (_("section [%2d] '%s': unrecognized attribute format\n"),
 	     idx, section_name (ebl, idx));
       return;
     }
@@ -3463,7 +3463,7 @@ check_attributes (Ebl *ebl, GElf_Ehdr *ehdr, GElf_Shdr *shdr, int idx)
       memcpy (&len, p, sizeof len);
 
       if (len == 0)
-	ERROR (gettext ("\
+	ERROR (_("\
 section [%2d] '%s': offset %zu: zero length field in attribute section\n"),
 	       idx, section_name (ebl, idx), pos (p));
 
@@ -3472,7 +3472,7 @@ section [%2d] '%s': offset %zu: zero length field in attribute section\n"),
 
       if (len > left ())
 	{
-	  ERROR (gettext ("\
+	  ERROR (_("\
 section [%2d] '%s': offset %zu: invalid length in attribute section\n"),
 		 idx, section_name (ebl, idx), pos (p));
 	  break;
@@ -3484,7 +3484,7 @@ section [%2d] '%s': offset %zu: invalid length in attribute section\n"),
       unsigned const char *q = memchr (name, '\0', len);
       if (q == NULL)
 	{
-	  ERROR (gettext ("\
+	  ERROR (_("\
 section [%2d] '%s': offset %zu: unterminated vendor name string\n"),
 		 idx, section_name (ebl, idx), pos (p));
 	  break;
@@ -3501,7 +3501,7 @@ section [%2d] '%s': offset %zu: unterminated vendor name string\n"),
 
 	    if (q >= p)
 	      {
-		ERROR (gettext ("\
+		ERROR (_("\
 section [%2d] '%s': offset %zu: endless ULEB128 in attribute subsection tag\n"),
 		       idx, section_name (ebl, idx), pos (chunk));
 		break;
@@ -3510,7 +3510,7 @@ section [%2d] '%s': offset %zu: endless ULEB128 in attribute subsection tag\n"),
 	    uint32_t subsection_len;
 	    if (p - q < (ptrdiff_t) sizeof subsection_len)
 	      {
-		ERROR (gettext ("\
+		ERROR (_("\
 section [%2d] '%s': offset %zu: truncated attribute section\n"),
 		       idx, section_name (ebl, idx), pos (q));
 		break;
@@ -3519,7 +3519,7 @@ section [%2d] '%s': offset %zu: truncated attribute section\n"),
 	    memcpy (&subsection_len, q, sizeof subsection_len);
 	    if (subsection_len == 0)
 	      {
-		ERROR (gettext ("\
+		ERROR (_("\
 section [%2d] '%s': offset %zu: zero length field in attribute subsection\n"),
 		       idx, section_name (ebl, idx), pos (q));
 
@@ -3534,7 +3534,7 @@ section [%2d] '%s': offset %zu: zero length field in attribute subsection\n"),
 	    if (p - chunk < (ptrdiff_t) subsection_len
 	        || subsection_len >= (uint32_t) PTRDIFF_MAX)
 	      {
-		ERROR (gettext ("\
+		ERROR (_("\
 section [%2d] '%s': offset %zu: invalid length in attribute subsection\n"),
 		       idx, section_name (ebl, idx), pos (q));
 		break;
@@ -3545,7 +3545,7 @@ section [%2d] '%s': offset %zu: invalid length in attribute subsection\n"),
 	    q = subsection_end;
 
 	    if (subsection_tag != 1) /* Tag_File */
-	      ERROR (gettext ("\
+	      ERROR (_("\
 section [%2d] '%s': offset %zu: attribute subsection has unexpected tag %u\n"),
 		     idx, section_name (ebl, idx), pos (chunk), subsection_tag);
 	    else
@@ -3563,7 +3563,7 @@ section [%2d] '%s': offset %zu: attribute subsection has unexpected tag %u\n"),
 			get_uleb128 (value, r, q);
 			if (r > q)
 			  {
-			    ERROR (gettext ("\
+			    ERROR (_("\
 section [%2d] '%s': offset %zu: endless ULEB128 in attribute tag\n"),
 				   idx, section_name (ebl, idx), pos (chunk));
 			    break;
@@ -3574,7 +3574,7 @@ section [%2d] '%s': offset %zu: endless ULEB128 in attribute tag\n"),
 			r = memchr (r, '\0', q - r);
 			if (r == NULL)
 			  {
-			    ERROR (gettext ("\
+			    ERROR (_("\
 section [%2d] '%s': offset %zu: unterminated string in attribute\n"),
 				   idx, section_name (ebl, idx), pos (chunk));
 			    break;
@@ -3587,11 +3587,11 @@ section [%2d] '%s': offset %zu: unterminated string in attribute\n"),
 		    if (!ebl_check_object_attribute (ebl, (const char *) name,
 						     tag, value,
 						     &tag_name, &value_name))
-		      ERROR (gettext ("\
+		      ERROR (_("\
 section [%2d] '%s': offset %zu: unrecognized attribute tag %u\n"),
 			     idx, section_name (ebl, idx), pos (chunk), tag);
 		    else if ((tag & 1) == 0 && value_name == NULL)
-		      ERROR (gettext ("\
+		      ERROR (_("\
 section [%2d] '%s': offset %zu: unrecognized %s attribute value %" PRIu64 "\n"),
 			     idx, section_name (ebl, idx), pos (chunk),
 			     tag_name, value);
@@ -3601,13 +3601,13 @@ section [%2d] '%s': offset %zu: unrecognized %s attribute value %" PRIu64 "\n"),
 	      }
 	  }
       else
-	ERROR (gettext ("\
+	ERROR (_("\
 section [%2d] '%s': offset %zu: vendor '%s' unknown\n"),
 	       idx, section_name (ebl, idx), pos (p), name);
     }
 
   if (left () != 0)
-    ERROR (gettext ("\
+    ERROR (_("\
 section [%2d] '%s': offset %zu: extra bytes after last attribute section\n"),
 	   idx, section_name (ebl, idx), pos (p));
 }
@@ -3697,34 +3697,34 @@ check_sections (Ebl *ebl, GElf_Ehdr *ehdr)
   GElf_Shdr shdr_mem;
   GElf_Shdr *shdr = gelf_getshdr (elf_getscn (ebl->elf, 0), &shdr_mem);
   if (shdr == NULL)
-    ERROR (gettext ("cannot get section header of zeroth section\n"));
+    ERROR (_("cannot get section header of zeroth section\n"));
   else
     {
       if (shdr->sh_name != 0)
-	ERROR (gettext ("zeroth section has nonzero name\n"));
+	ERROR (_("zeroth section has nonzero name\n"));
       if (shdr->sh_type != 0)
-	ERROR (gettext ("zeroth section has nonzero type\n"));
+	ERROR (_("zeroth section has nonzero type\n"));
       if (shdr->sh_flags != 0)
-	ERROR (gettext ("zeroth section has nonzero flags\n"));
+	ERROR (_("zeroth section has nonzero flags\n"));
       if (shdr->sh_addr != 0)
-	ERROR (gettext ("zeroth section has nonzero address\n"));
+	ERROR (_("zeroth section has nonzero address\n"));
       if (shdr->sh_offset != 0)
-	ERROR (gettext ("zeroth section has nonzero offset\n"));
+	ERROR (_("zeroth section has nonzero offset\n"));
       if (shdr->sh_addralign != 0)
-	ERROR (gettext ("zeroth section has nonzero align value\n"));
+	ERROR (_("zeroth section has nonzero align value\n"));
       if (shdr->sh_entsize != 0)
-	ERROR (gettext ("zeroth section has nonzero entry size value\n"));
+	ERROR (_("zeroth section has nonzero entry size value\n"));
 
       if (shdr->sh_size != 0 && ehdr->e_shnum != 0)
-	ERROR (gettext ("\
+	ERROR (_("\
 zeroth section has nonzero size value while ELF header has nonzero shnum value\n"));
 
       if (shdr->sh_link != 0 && ehdr->e_shstrndx != SHN_XINDEX)
-	ERROR (gettext ("\
+	ERROR (_("\
 zeroth section has nonzero link value while ELF header does not signal overflow in shstrndx\n"));
 
       if (shdr->sh_info != 0 && ehdr->e_phnum != PN_XNUM)
-	ERROR (gettext ("\
+	ERROR (_("\
 zeroth section has nonzero link value while ELF header does not signal overflow in phnum\n"));
     }
 
@@ -3742,7 +3742,7 @@ zeroth section has nonzero link value while ELF header does not signal overflow
       shdr = gelf_getshdr (scn, &shdr_mem);
       if (shdr == NULL)
 	{
-	  ERROR (gettext ("\
+	  ERROR (_("\
 cannot get section header for section [%2zu] '%s': %s\n"),
 		 cnt, section_name (ebl, cnt), elf_errmsg (-1));
 	  continue;
@@ -3751,7 +3751,7 @@ cannot get section header for section [%2zu] '%s': %s\n"),
       const char *scnname = elf_strptr (ebl->elf, shstrndx, shdr->sh_name);
 
       if (scnname == NULL)
-	ERROR (gettext ("section [%2zu]: invalid name\n"), cnt);
+	ERROR (_("section [%2zu]: invalid name\n"), cnt);
       else
 	{
 	  /* Check whether it is one of the special sections defined in
@@ -3778,7 +3778,7 @@ cannot get section header for section [%2zu] '%s': %s\n"),
 			|| IS_KNOWN_SPECIAL (s, ".debug_str", false)
 			|| IS_KNOWN_SPECIAL (s, ".debug", true)
 			|| IS_KNOWN_SPECIAL (s, ".shstrtab", false)))
-		  ERROR (gettext ("\
+		  ERROR (_("\
 section [%2d] '%s' has wrong type: expected %s, is %s\n"),
 			 (int) cnt, scnname,
 			 ebl_section_type_name (ebl, special_sections[s].type,
@@ -3796,7 +3796,7 @@ section [%2d] '%s' has wrong type: expected %s, is %s\n"),
 			 & ~(SHF_LINK_ORDER | SHF_GROUP | SHF_COMPRESSED))
 			!= special_sections[s].attr
 			&& (special_sections[s].attrflag == exact || !gnuld))
-		      ERROR (gettext ("\
+		      ERROR (_("\
 section [%2zu] '%s' has wrong flags: expected %s, is %s\n"),
 			     cnt, scnname,
 			     section_flags_string (special_sections[s].attr,
@@ -3814,7 +3814,7 @@ section [%2zu] '%s' has wrong flags: expected %s, is %s\n"),
 				 | special_sections[s].attr
 				 | special_sections[s].attr2))
 			    != 0))
-		      ERROR (gettext ("\
+		      ERROR (_("\
 section [%2zu] '%s' has wrong flags: expected %s and possibly %s, is %s\n"),
 			     cnt, scnname,
 			     section_flags_string (special_sections[s].attr,
@@ -3832,18 +3832,18 @@ section [%2zu] '%s' has wrong flags: expected %s and possibly %s, is %s\n"),
 		    dot_interp_section = true;
 
 		    if (ehdr->e_type == ET_REL)
-		      ERROR (gettext ("\
+		      ERROR (_("\
 section [%2zu] '%s' present in object file\n"),
 			     cnt, scnname);
 
 		    if ((shdr->sh_flags & SHF_ALLOC) != 0
 			&& !has_loadable_segment)
-		      ERROR (gettext ("\
+		      ERROR (_("\
 section [%2zu] '%s' has SHF_ALLOC flag set but there is no loadable segment\n"),
 			     cnt, scnname);
 		    else if ((shdr->sh_flags & SHF_ALLOC) == 0
 			     && has_loadable_segment)
-		      ERROR (gettext ("\
+		      ERROR (_("\
 section [%2zu] '%s' has SHF_ALLOC flag not set but there are loadable segments\n"),
 			     cnt, scnname);
 		  }
@@ -3851,7 +3851,7 @@ section [%2zu] '%s' has SHF_ALLOC flag not set but there are loadable segments\n
 		  {
 		    if (strcmp (scnname, ".symtab_shndx") == 0
 			&& ehdr->e_type != ET_REL)
-		      ERROR (gettext ("\
+		      ERROR (_("\
 section [%2zu] '%s' is extension section index table in non-object file\n"),
 			     cnt, scnname);
 
@@ -3870,12 +3870,12 @@ section [%2zu] '%s' is extension section index table in non-object file\n"),
 		    // XXX TODO
 		    if ((shdr->sh_flags & SHF_ALLOC) != 0
 			&& !has_loadable_segment)
-		      ERROR (gettext ("\
+		      ERROR (_("\
 section [%2zu] '%s' has SHF_ALLOC flag set but there is no loadable segment\n"),
 			     cnt, scnname);
 		    else if ((shdr->sh_flags & SHF_ALLOC) == 0
 			     && has_loadable_segment)
-		      ERROR (gettext ("\
+		      ERROR (_("\
 section [%2zu] '%s' has SHF_ALLOC flag not set but there are loadable segments\n"),
 			     cnt, scnname);
 #endif
@@ -3894,12 +3894,12 @@ section [%2zu] '%s' has SHF_ALLOC flag not set but there are loadable segments\n
 	}
 
       if (shdr->sh_entsize != 0 && shdr->sh_size % shdr->sh_entsize)
-	ERROR (gettext ("\
+	ERROR (_("\
 section [%2zu] '%s': size not multiple of entry size\n"),
 	       cnt, section_name (ebl, cnt));
 
       if (elf_strptr (ebl->elf, shstrndx, shdr->sh_name) == NULL)
-	ERROR (gettext ("cannot get section header\n"));
+	ERROR (_("cannot get section header\n"));
 
       if (shdr->sh_type >= SHT_NUM
 	  && shdr->sh_type != SHT_GNU_ATTRIBUTES
@@ -3909,7 +3909,7 @@ section [%2zu] '%s': size not multiple of entry size\n"),
 	  && shdr->sh_type != SHT_GNU_verneed
 	  && shdr->sh_type != SHT_GNU_versym
 	  && ebl_section_type_name (ebl, shdr->sh_type, NULL, 0) == NULL)
-	ERROR (gettext ("section [%2zu] '%s' has unsupported type %d\n"),
+	ERROR (_("section [%2zu] '%s' has unsupported type %d\n"),
 	       cnt, section_name (ebl, cnt),
 	       (int) shdr->sh_type);
 
@@ -3929,14 +3929,14 @@ section [%2zu] '%s': size not multiple of entry size\n"),
 		sh_flags &= ~(GElf_Xword) SHF_EXCLUDE;
 	      if (!ebl_machine_section_flag_check (ebl,
 						   sh_flags & SHF_MASKPROC))
-		ERROR (gettext ("section [%2zu] '%s'"
+		ERROR (_("section [%2zu] '%s'"
 				" contains invalid processor-specific flag(s)"
 				" %#" PRIx64 "\n"),
 		       cnt, section_name (ebl, cnt), sh_flags & SHF_MASKPROC);
 	      sh_flags &= ~(GElf_Xword) SHF_MASKPROC;
 	    }
 	  if (sh_flags != 0)
-	    ERROR (gettext ("section [%2zu] '%s' contains unknown flag(s)"
+	    ERROR (_("section [%2zu] '%s' contains unknown flag(s)"
 			    " %#" PRIx64 "\n"),
 		   cnt, section_name (ebl, cnt), sh_flags);
 	}
@@ -3944,7 +3944,7 @@ section [%2zu] '%s': size not multiple of entry size\n"),
 	{
 	  // XXX Correct?
 	  if (shdr->sh_addr != 0 && !gnuld)
-	    ERROR (gettext ("\
+	    ERROR (_("\
 section [%2zu] '%s': thread-local data sections address not zero\n"),
 		   cnt, section_name (ebl, cnt));
 
@@ -3954,41 +3954,41 @@ section [%2zu] '%s': thread-local data sections address not zero\n"),
       if (shdr->sh_flags & SHF_COMPRESSED)
 	{
 	  if (shdr->sh_flags & SHF_ALLOC)
-	    ERROR (gettext ("\
+	    ERROR (_("\
 section [%2zu] '%s': allocated section cannot be compressed\n"),
 		   cnt, section_name (ebl, cnt));
 
 	  if (shdr->sh_type == SHT_NOBITS)
-	    ERROR (gettext ("\
+	    ERROR (_("\
 section [%2zu] '%s': nobits section cannot be compressed\n"),
 		   cnt, section_name (ebl, cnt));
 
 	  GElf_Chdr chdr;
 	  if (gelf_getchdr (scn, &chdr) == NULL)
-	    ERROR (gettext ("\
+	    ERROR (_("\
 section [%2zu] '%s': compressed section with no compression header: %s\n"),
 		   cnt, section_name (ebl, cnt), elf_errmsg (-1));
 	}
 
       if (shdr->sh_link >= shnum)
-	ERROR (gettext ("\
+	ERROR (_("\
 section [%2zu] '%s': invalid section reference in link value\n"),
 	       cnt, section_name (ebl, cnt));
 
       if (SH_INFO_LINK_P (shdr) && shdr->sh_info >= shnum)
-	ERROR (gettext ("\
+	ERROR (_("\
 section [%2zu] '%s': invalid section reference in info value\n"),
 	       cnt, section_name (ebl, cnt));
 
       if ((shdr->sh_flags & SHF_MERGE) == 0
 	  && (shdr->sh_flags & SHF_STRINGS) != 0
 	  && be_strict)
-	ERROR (gettext ("\
+	ERROR (_("\
 section [%2zu] '%s': strings flag set without merge flag\n"),
 	       cnt, section_name (ebl, cnt));
 
       if ((shdr->sh_flags & SHF_MERGE) != 0 && shdr->sh_entsize == 0)
-	ERROR (gettext ("\
+	ERROR (_("\
 section [%2zu] '%s': merge flag set but entry size is zero\n"),
 	       cnt, section_name (ebl, cnt));
 
@@ -4007,7 +4007,7 @@ section [%2zu] '%s': merge flag set but entry size is zero\n"),
 		break;
 	      FALLTHROUGH;
 	    default:
-	      ERROR (gettext ("\
+	      ERROR (_("\
 section [%2zu] '%s' has unexpected type %d for an executable section\n"),
 		     cnt, section_name (ebl, cnt), shdr->sh_type);
 	      break;
@@ -4016,14 +4016,14 @@ section [%2zu] '%s' has unexpected type %d for an executable section\n"),
 	  if (shdr->sh_flags & SHF_WRITE)
 	    {
 	      if (is_debuginfo && shdr->sh_type != SHT_NOBITS)
-		ERROR (gettext ("\
+		ERROR (_("\
 section [%2zu] '%s' must be of type NOBITS in debuginfo files\n"),
 		       cnt, section_name (ebl, cnt));
 
 	      if (!is_debuginfo
 		  && !ebl_check_special_section (ebl, cnt, shdr,
 						 section_name (ebl, cnt)))
-		ERROR (gettext ("\
+		ERROR (_("\
 section [%2zu] '%s' is both executable and writable\n"),
 		       cnt, section_name (ebl, cnt));
 	    }
@@ -4054,7 +4054,7 @@ section [%2zu] '%s' is both executable and writable\n"),
 		/* Found the segment.  */
 		if (phdr->p_offset + phdr->p_memsz
 		    < shdr->sh_offset + shdr->sh_size)
-		  ERROR (gettext ("\
+		  ERROR (_("\
 section [%2zu] '%s' not fully contained in segment of program header entry %d\n"),
 			 cnt, section_name (ebl, cnt), pcnt);
 
@@ -4064,7 +4064,7 @@ section [%2zu] '%s' not fully contained in segment of program header entry %d\n"
 			&& !is_debuginfo)
 		      {
 			if (!gnuld)
-			  ERROR (gettext ("\
+			  ERROR (_("\
 section [%2zu] '%s' has type NOBITS but is read from the file in segment of program header entry %d\n"),
 				 cnt, section_name (ebl, cnt), pcnt);
 			else
@@ -4090,7 +4090,7 @@ section [%2zu] '%s' has type NOBITS but is read from the file in segment of prog
 			      bad = ((char *) databits->d_buf)[idx] != 0;
 
 			    if (bad)
-			      ERROR (gettext ("\
+			      ERROR (_("\
 section [%2zu] '%s' has type NOBITS but is read from the file in segment of program header entry %d and file contents is non-zero\n"),
 				     cnt, section_name (ebl, cnt), pcnt);
 			  }
@@ -4101,7 +4101,7 @@ section [%2zu] '%s' has type NOBITS but is read from the file in segment of prog
 		    const GElf_Off end = phdr->p_offset + phdr->p_filesz;
 		    if (shdr->sh_offset > end ||
 			(shdr->sh_offset == end && shdr->sh_size != 0))
-		      ERROR (gettext ("\
+		      ERROR (_("\
 section [%2zu] '%s' has not type NOBITS but is not read from the file in segment of program header entry %d\n"),
 			 cnt, section_name (ebl, cnt), pcnt);
 		  }
@@ -4112,7 +4112,7 @@ section [%2zu] '%s' has not type NOBITS but is not read from the file in segment
 		      {
 			segment_flags[pcnt] |= PF_X;
 			if ((phdr->p_flags & PF_X) == 0)
-			  ERROR (gettext ("\
+			  ERROR (_("\
 section [%2zu] '%s' is executable in nonexecutable segment %d\n"),
 				 cnt, section_name (ebl, cnt), pcnt);
 		      }
@@ -4122,7 +4122,7 @@ section [%2zu] '%s' is executable in nonexecutable segment %d\n"),
 			segment_flags[pcnt] |= PF_W;
 			if (0	/* XXX vdso images have this */
 			    && (phdr->p_flags & PF_W) == 0)
-			  ERROR (gettext ("\
+			  ERROR (_("\
 section [%2zu] '%s' is writable in unwritable segment %d\n"),
 				 cnt, section_name (ebl, cnt), pcnt);
 		      }
@@ -4132,13 +4132,13 @@ section [%2zu] '%s' is writable in unwritable segment %d\n"),
 	      }
 
 	  if (pcnt == phnum)
-	    ERROR (gettext ("\
+	    ERROR (_("\
 section [%2zu] '%s': alloc flag set but section not in any loaded segment\n"),
 		   cnt, section_name (ebl, cnt));
 	}
 
       if (cnt == shstrndx && shdr->sh_type != SHT_STRTAB)
-	ERROR (gettext ("\
+	ERROR (_("\
 section [%2zu] '%s': ELF header says this is the section header string table but type is not SHT_TYPE\n"),
 	       cnt, section_name (ebl, cnt));
 
@@ -4146,7 +4146,7 @@ section [%2zu] '%s': ELF header says this is the section header string table but
 	{
 	case SHT_DYNSYM:
 	  if (ehdr->e_type == ET_REL)
-	    ERROR (gettext ("\
+	    ERROR (_("\
 section [%2zu] '%s': relocatable files cannot have dynamic symbol tables\n"),
 		   cnt, section_name (ebl, cnt));
 	  FALLTHROUGH;
@@ -4197,7 +4197,7 @@ section [%2zu] '%s': relocatable files cannot have dynamic symbol tables\n"),
 	     that the verneed and verdef sections have already been read.
 	     Just remember the section index.  */
 	  if (versym_scnndx != 0)
-	    ERROR (gettext ("more than one version symbol table present\n"));
+	    ERROR (_("more than one version symbol table present\n"));
 	  versym_scnndx = cnt;
 	  break;
 
@@ -4220,7 +4220,7 @@ section [%2zu] '%s': relocatable files cannot have dynamic symbol tables\n"),
     }
 
   if (has_interp_segment && !dot_interp_section)
-    ERROR (gettext ("INTERP program header entry but no .interp section\n"));
+    ERROR (_("INTERP program header entry but no .interp section\n"));
 
   if (!is_debuginfo)
     for (unsigned int pcnt = 0; pcnt < phnum; ++pcnt)
@@ -4231,13 +4231,13 @@ section [%2zu] '%s': relocatable files cannot have dynamic symbol tables\n"),
 	  {
 	    if ((phdr->p_flags & PF_X) != 0
 		&& (segment_flags[pcnt] & PF_X) == 0)
-	      ERROR (gettext ("\
+	      ERROR (_("\
 loadable segment [%u] is executable but contains no executable sections\n"),
 		     pcnt);
 
 	    if ((phdr->p_flags & PF_W) != 0
 		&& (segment_flags[pcnt] & PF_W) == 0)
-	      ERROR (gettext ("\
+	      ERROR (_("\
 loadable segment [%u] is writable but contains no writable sections\n"),
 		     pcnt);
 	  }
@@ -4248,7 +4248,7 @@ loadable segment [%u] is writable but contains no writable sections\n"),
   if (version_namelist != NULL)
     {
       if (versym_scnndx == 0)
-    ERROR (gettext ("\
+    ERROR (_("\
 no .gnu.versym section present but .gnu.versym_d or .gnu.versym_r section exist\n"));
       else
 	check_versym (ebl, versym_scnndx);
@@ -4261,7 +4261,7 @@ no .gnu.versym section present but .gnu.versym_d or .gnu.versym_r section exist\
 	    {
 	      if (version_namelist->ndx == runp->ndx)
 		{
-		  ERROR (gettext ("duplicate version index %d\n"),
+		  ERROR (_("duplicate version index %d\n"),
 			 (int) version_namelist->ndx);
 		  break;
 		}
@@ -4275,7 +4275,7 @@ no .gnu.versym section present but .gnu.versym_d or .gnu.versym_r section exist\
       while (version_namelist != NULL);
     }
   else if (versym_scnndx != 0)
-    ERROR (gettext ("\
+    ERROR (_("\
 .gnu.versym section present without .gnu.versym_d or .gnu.versym_r\n"));
 
   if (hash_idx != 0 && gnu_hash_idx != 0)
@@ -4324,11 +4324,11 @@ check_note_data (Ebl *ebl, const GElf_Ehdr *ehdr,
 
 	  default:
 	    if (shndx == 0)
-	      ERROR (gettext ("\
+	      ERROR (_("\
 phdr[%d]: unknown core file note type %" PRIu32 " at offset %" PRIu64 "\n"),
 		     phndx, (uint32_t) nhdr.n_type, start + offset);
 	    else
-	      ERROR (gettext ("\
+	      ERROR (_("\
 section [%2d] '%s': unknown core file note type %" PRIu32
 			      " at offset %zu\n"),
 		     shndx, section_name (ebl, shndx),
@@ -4377,12 +4377,12 @@ section [%2d] '%s': unknown core file note type %" PRIu32
 	    {
 	    unknown_note:
 	    if (shndx == 0)
-	      ERROR (gettext ("\
+	      ERROR (_("\
 phdr[%d]: unknown object file note type %" PRIu32 " with owner name '%s' at offset %zu\n"),
 		     phndx, (uint32_t) nhdr.n_type,
 		     (char *) data->d_buf + name_offset, offset);
 	    else
-	      ERROR (gettext ("\
+	      ERROR (_("\
 section [%2d] '%s': unknown object file note type %" PRIu32
 			      " with owner name '%s' at offset %zu\n"),
 		     shndx, section_name (ebl, shndx),
@@ -4401,7 +4401,7 @@ check_note (Ebl *ebl, GElf_Ehdr *ehdr, GElf_Phdr *phdr, int cnt)
 {
   if (ehdr->e_type != ET_CORE && ehdr->e_type != ET_REL
       && ehdr->e_type != ET_EXEC && ehdr->e_type != ET_DYN)
-    ERROR (gettext ("\
+    ERROR (_("\
 phdr[%d]: no note entries defined for the type of file\n"),
 	   cnt);
 
@@ -4421,10 +4421,10 @@ phdr[%d]: no note entries defined for the type of file\n"),
     notes_size = check_note_data (ebl, ehdr, data, 0, cnt, phdr->p_offset);
 
   if (notes_size == 0)
-    ERROR (gettext ("phdr[%d]: cannot get content of note section: %s\n"),
+    ERROR (_("phdr[%d]: cannot get content of note section: %s\n"),
 	   cnt, elf_errmsg (-1));
   else if (notes_size != phdr->p_filesz)
-    ERROR (gettext ("phdr[%d]: extra %" PRIu64 " bytes after last note\n"),
+    ERROR (_("phdr[%d]: extra %" PRIu64 " bytes after last note\n"),
 	   cnt, phdr->p_filesz - notes_size);
 }
 
@@ -4438,24 +4438,24 @@ check_note_section (Ebl *ebl, GElf_Ehdr *ehdr, GElf_Shdr *shdr, int idx)
   Elf_Data *data = elf_getdata (elf_getscn (ebl->elf, idx), NULL);
   if (data == NULL || data->d_buf == NULL)
     {
-      ERROR (gettext ("section [%2d] '%s': cannot get section data\n"),
+      ERROR (_("section [%2d] '%s': cannot get section data\n"),
 	     idx, section_name (ebl, idx));
       return;
     }
 
   if (ehdr->e_type != ET_CORE && ehdr->e_type != ET_REL
       && ehdr->e_type != ET_EXEC && ehdr->e_type != ET_DYN)
-    ERROR (gettext ("\
+    ERROR (_("\
 section [%2d] '%s': no note entries defined for the type of file\n"),
 	     idx, section_name (ebl, idx));
 
   GElf_Off notes_size = check_note_data (ebl, ehdr, data, idx, 0, 0);
 
   if (notes_size == 0)
-    ERROR (gettext ("section [%2d] '%s': cannot get content of note section\n"),
+    ERROR (_("section [%2d] '%s': cannot get content of note section\n"),
 	   idx, section_name (ebl, idx));
   else if (notes_size != shdr->sh_size)
-    ERROR (gettext ("section [%2d] '%s': extra %" PRIu64
+    ERROR (_("section [%2d] '%s': extra %" PRIu64
 		    " bytes after last note\n"),
 	   idx, section_name (ebl, idx), shdr->sh_size - notes_size);
 }
@@ -4473,7 +4473,7 @@ check_program_header (Ebl *ebl, GElf_Ehdr *ehdr)
 
   if (ehdr->e_type != ET_EXEC && ehdr->e_type != ET_DYN
       && ehdr->e_type != ET_CORE)
-    ERROR (gettext ("\
+    ERROR (_("\
 only executables, shared objects, and core files can have program headers\n"));
 
   int num_pt_interp = 0;
@@ -4488,7 +4488,7 @@ only executables, shared objects, and core files can have program headers\n"));
       phdr = gelf_getphdr (ebl->elf, cnt, &phdr_mem);
       if (phdr == NULL)
 	{
-	  ERROR (gettext ("cannot get program header entry %d: %s\n"),
+	  ERROR (_("cannot get program header entry %d: %s\n"),
 		 cnt, elf_errmsg (-1));
 	  continue;
 	}
@@ -4498,7 +4498,7 @@ only executables, shared objects, and core files can have program headers\n"));
 	  && phdr->p_type != PT_GNU_PROPERTY
 	  /* Check for a known machine-specific type.  */
 	  && ebl_segment_type_name (ebl, phdr->p_type, NULL, 0) == NULL)
-	ERROR (gettext ("\
+	ERROR (_("\
 program header entry %d: unknown program header entry type %#" PRIx64 "\n"),
 	       cnt, (uint64_t) phdr->p_type);
 
@@ -4509,7 +4509,7 @@ program header entry %d: unknown program header entry type %#" PRIx64 "\n"),
 	  if (++num_pt_interp != 1)
 	    {
 	      if (num_pt_interp == 2)
-		ERROR (gettext ("\
+		ERROR (_("\
 more than one INTERP entry in program header\n"));
 	    }
 	  has_interp_segment = true;
@@ -4517,14 +4517,14 @@ more than one INTERP entry in program header\n"));
       else if (phdr->p_type == PT_TLS)
 	{
 	  if (++num_pt_tls == 2)
-	    ERROR (gettext ("more than one TLS entry in program header\n"));
+	    ERROR (_("more than one TLS entry in program header\n"));
 	}
       else if (phdr->p_type == PT_NOTE)
 	check_note (ebl, ehdr, phdr, cnt);
       else if (phdr->p_type == PT_DYNAMIC)
 	{
 	  if (ehdr->e_type == ET_EXEC && ! has_interp_segment)
-	    ERROR (gettext ("\
+	    ERROR (_("\
 static executable cannot have dynamic sections\n"));
 	  else
 	    {
@@ -4538,10 +4538,10 @@ static executable cannot have dynamic sections\n"));
 		  if (shdr != NULL && shdr->sh_type == SHT_DYNAMIC)
 		    {
 		      if (phdr->p_offset != shdr->sh_offset)
-			ERROR (gettext ("\
+			ERROR (_("\
 dynamic section reference in program header has wrong offset\n"));
 		      if (phdr->p_memsz != shdr->sh_size)
-			ERROR (gettext ("\
+			ERROR (_("\
 dynamic section size mismatch in program and section header\n"));
 		      break;
 		    }
@@ -4551,7 +4551,7 @@ dynamic section size mismatch in program and section header\n"));
       else if (phdr->p_type == PT_GNU_RELRO)
 	{
 	  if (++num_pt_relro == 2)
-	    ERROR (gettext ("\
+	    ERROR (_("\
 more than one GNU_RELRO entry in program header\n"));
 	  else
 	    {
@@ -4572,7 +4572,7 @@ more than one GNU_RELRO entry in program header\n"));
 			  <= phdr2->p_vaddr + phdr2->p_memsz))
 		    {
 		      if ((phdr2->p_flags & PF_W) == 0)
-			ERROR (gettext ("\
+			ERROR (_("\
 loadable segment GNU_RELRO applies to is not writable\n"));
 		      /* Unless fully covered, relro flags could be a
 			 subset of the phdrs2 flags.  For example the load
@@ -4583,14 +4583,14 @@ loadable segment GNU_RELRO applies to is not writable\n"));
 			{
 			  if ((phdr2->p_flags & ~PF_W)
 			      != (phdr->p_flags & ~PF_W))
-			    ERROR (gettext ("\
+			    ERROR (_("\
 loadable segment [%u] flags do not match GNU_RELRO [%u] flags\n"),
 				   cnt, inner);
 			}
 		      else
 			{
 			  if ((phdr->p_flags & ~phdr2->p_flags) != 0)
-			    ERROR (gettext ("\
+			    ERROR (_("\
 GNU_RELRO [%u] flags are not a subset of the loadable segment [%u] flags\n"),
 				   inner, cnt);
 			}
@@ -4599,7 +4599,7 @@ GNU_RELRO [%u] flags are not a subset of the loadable segment [%u] flags\n"),
 		}
 
 	      if (inner >= phnum)
-		ERROR (gettext ("\
+		ERROR (_("\
 %s segment not contained in a loaded segment\n"), "GNU_RELRO");
 	    }
 	}
@@ -4622,13 +4622,13 @@ GNU_RELRO [%u] flags are not a subset of the loadable segment [%u] flags\n"),
 	    }
 
 	  if (inner >= phnum)
-	    ERROR (gettext ("\
+	    ERROR (_("\
 %s segment not contained in a loaded segment\n"), "PHDR");
 
 	  /* Check that offset in segment corresponds to offset in ELF
 	     header.  */
 	  if (phdr->p_offset != ehdr->e_phoff)
-	    ERROR (gettext ("\
+	    ERROR (_("\
 program header offset in ELF header and PHDR entry do not match"));
 	}
       else if (phdr->p_type == PT_GNU_EH_FRAME)
@@ -4655,10 +4655,10 @@ program header offset in ELF header and PHDR entry do not match"));
 		  if (! is_debuginfo)
 		    {
 		      if (phdr->p_offset != shdr->sh_offset)
-			ERROR (gettext ("\
+			ERROR (_("\
 call frame search table reference in program header has wrong offset\n"));
 		      if (phdr->p_memsz != shdr->sh_size)
-			ERROR (gettext ("\
+			ERROR (_("\
 call frame search table size mismatch in program and section header\n"));
 		    }
 		  break;
@@ -4671,7 +4671,7 @@ call frame search table size mismatch in program and section header\n"));
 		 complain.  But if there is one there should be an
 		 entry for .eh_frame_hdr.  */
 	      if (any)
-		ERROR (gettext ("\
+		ERROR (_("\
 PT_GNU_EH_FRAME present but no .eh_frame_hdr section\n"));
 	    }
 	  else
@@ -4679,25 +4679,25 @@ PT_GNU_EH_FRAME present but no .eh_frame_hdr section\n"));
 	      /* The section must be allocated and not be writable and
 		 executable.  */
 	      if ((phdr->p_flags & PF_R) == 0)
-		ERROR (gettext ("\
+		ERROR (_("\
 call frame search table must be allocated\n"));
 	      else if (shdr != NULL && (shdr->sh_flags & SHF_ALLOC) == 0)
-		ERROR (gettext ("\
+		ERROR (_("\
 section [%2zu] '%s' must be allocated\n"), elf_ndxscn (scn), ".eh_frame_hdr");
 
 	      if ((phdr->p_flags & PF_W) != 0)
-		ERROR (gettext ("\
+		ERROR (_("\
 call frame search table must not be writable\n"));
 	      else if (shdr != NULL && (shdr->sh_flags & SHF_WRITE) != 0)
-		ERROR (gettext ("\
+		ERROR (_("\
 section [%2zu] '%s' must not be writable\n"),
 		       elf_ndxscn (scn), ".eh_frame_hdr");
 
 	      if ((phdr->p_flags & PF_X) != 0)
-		ERROR (gettext ("\
+		ERROR (_("\
 call frame search table must not be executable\n"));
 	      else if (shdr != NULL && (shdr->sh_flags & SHF_EXECINSTR) != 0)
-		ERROR (gettext ("\
+		ERROR (_("\
 section [%2zu] '%s' must not be executable\n"),
 		       elf_ndxscn (scn), ".eh_frame_hdr");
 	    }
@@ -4708,17 +4708,17 @@ section [%2zu] '%s' must not be executable\n"),
 
       if (phdr->p_filesz > phdr->p_memsz
 	  && (phdr->p_memsz != 0 || phdr->p_type != PT_NOTE))
-	ERROR (gettext ("\
+	ERROR (_("\
 program header entry %d: file size greater than memory size\n"),
 	       cnt);
 
       if (phdr->p_align > 1)
 	{
 	  if (!powerof2 (phdr->p_align))
-	    ERROR (gettext ("\
+	    ERROR (_("\
 program header entry %d: alignment not a power of 2\n"), cnt);
 	  else if ((phdr->p_vaddr - phdr->p_offset) % phdr->p_align != 0)
-	    ERROR (gettext ("\
+	    ERROR (_("\
 program header entry %d: file offset and virtual address not module of alignment\n"), cnt);
 	}
     }
@@ -4731,7 +4731,7 @@ check_exception_data (Ebl *ebl __attribute__ ((unused)),
 {
   if ((ehdr->e_type == ET_EXEC || ehdr->e_type == ET_DYN)
       && pt_gnu_eh_frame_pndx == 0 && eh_frame_hdr_scnndx != 0)
-    ERROR (gettext ("executable/DSO with .eh_frame_hdr section does not have "
+    ERROR (_("executable/DSO with .eh_frame_hdr section does not have "
 		    "a PT_GNU_EH_FRAME program header entry"));
 }
 
@@ -4765,7 +4765,7 @@ process_elf_file (Elf *elf, const char *prefix, const char *suffix,
 
   if (ehdr == NULL)
     {
-      ERROR (gettext ("cannot read ELF header: %s\n"), elf_errmsg (-1));
+      ERROR (_("cannot read ELF header: %s\n"), elf_errmsg (-1));
       return;
     }
 
@@ -4777,7 +4777,7 @@ process_elf_file (Elf *elf, const char *prefix, const char *suffix,
      memory situation.  */
   if (ebl == NULL)
     {
-      ERROR (gettext ("cannot create backend for ELF file\n"));
+      ERROR (_("cannot create backend for ELF file\n"));
       return;
     }
 
@@ -4798,7 +4798,7 @@ process_elf_file (Elf *elf, const char *prefix, const char *suffix,
 
   /* Report if no relocation section needed the text relocation flag.  */
   if (textrel && !needed_textrel)
-    ERROR (gettext ("text relocation flag set but not needed\n"));
+    ERROR (_("text relocation flag set but not needed\n"));
 
   /* Free the resources.  */
   ebl_closebackend (ebl);
diff --git a/src/findtextrel.c b/src/findtextrel.c
index f48752e5..220ee909 100644
--- a/src/findtextrel.c
+++ b/src/findtextrel.c
@@ -202,14 +202,14 @@ process_file (const char *fname, bool more_than_one)
   int fd = open (real_fname, O_RDONLY);
   if (fd == -1)
     {
-      error (0, errno, gettext ("cannot open '%s'"), fname);
+      error (0, errno, _("cannot open '%s'"), fname);
       return 1;
     }
 
   Elf *elf = elf_begin (fd, ELF_C_READ_MMAP, NULL);
   if (elf == NULL)
     {
-      error (0, 0, gettext ("cannot create ELF descriptor for '%s': %s"),
+      error (0, 0, _("cannot create ELF descriptor for '%s': %s"),
 	     fname, elf_errmsg (-1));
       goto err_close;
     }
@@ -219,7 +219,7 @@ process_file (const char *fname, bool more_than_one)
   GElf_Ehdr *ehdr = gelf_getehdr (elf, &ehdr_mem);
   if (ehdr == NULL)
     {
-      error (0, 0, gettext ("cannot get ELF header '%s': %s"),
+      error (0, 0, _("cannot get ELF header '%s': %s"),
 	     fname, elf_errmsg (-1));
     err_elf_close:
       elf_end (elf);
@@ -230,7 +230,7 @@ process_file (const char *fname, bool more_than_one)
 
   if (ehdr->e_type != ET_DYN)
     {
-      error (0, 0, gettext ("'%s' is not a DSO or PIE"), fname);
+      error (0, 0, _("'%s' is not a DSO or PIE"), fname);
       goto err_elf_close;
     }
 
@@ -250,7 +250,7 @@ process_file (const char *fname, bool more_than_one)
       if (shdr == NULL)
 	{
 	  error (0, 0,
-		 gettext ("getting get section header of section %zu: %s"),
+		 _("getting get section header of section %zu: %s"),
 		 elf_ndxscn (scn), elf_errmsg (-1));
 	  goto err_elf_close;
 	}
@@ -274,7 +274,7 @@ process_file (const char *fname, bool more_than_one)
 		  dyn = gelf_getdyn (data, cnt, &dynmem);
 		  if (dyn == NULL)
 		    {
-		      error (0, 0, gettext ("cannot read dynamic section: %s"),
+		      error (0, 0, _("cannot read dynamic section: %s"),
 			     elf_errmsg (-1));
 		      goto err_elf_close;
 		    }
@@ -295,7 +295,7 @@ process_file (const char *fname, bool more_than_one)
 
   if (!have_textrel)
     {
-      error (0, 0, gettext ("no text relocations reported in '%s'"), fname);
+      error (0, 0, _("no text relocations reported in '%s'"), fname);
       goto err_elf_close;
     }
 
@@ -307,11 +307,11 @@ process_file (const char *fname, bool more_than_one)
   struct segments *segments
     = (struct segments *) malloc (nsegments_max * sizeof (segments[0]));
   if (segments == NULL)
-    error (1, errno, gettext ("while reading ELF file"));
+    error (1, errno, _("while reading ELF file"));
 
   size_t phnum;
   if (elf_getphdrnum (elf, &phnum) != 0)
-    error (1, 0, gettext ("cannot get program header count: %s"),
+    error (1, 0, _("cannot get program header count: %s"),
            elf_errmsg (-1));
 
 
@@ -322,7 +322,7 @@ process_file (const char *fname, bool more_than_one)
       if (phdr == NULL)
 	{
 	  error (0, 0,
-		 gettext ("cannot get program header index at offset %zd: %s"),
+		 _("cannot get program header index at offset %zd: %s"),
 		 i, elf_errmsg (-1));
 	  result = 1;
 	  goto next;
@@ -339,7 +339,7 @@ process_file (const char *fname, bool more_than_one)
 					       * sizeof (segments[0]));
 	      if (segments == NULL)
 		{
-		  error (0, 0, gettext ("\
+		  error (0, 0, _("\
 cannot get program header index at offset %zd: %s"),
 			 i, elf_errmsg (-1));
 		  result = 1;
@@ -391,7 +391,7 @@ cannot get program header index at offset %zd: %s"),
 	  if (shdr == NULL)
 	    {
 	      error (0, 0,
-		     gettext ("cannot get section header of section %zu: %s"),
+		     _("cannot get section header of section %zu: %s"),
 		     elf_ndxscn (scn), elf_errmsg (-1));
 	      result = 1;
 	      goto next;
@@ -403,7 +403,7 @@ cannot get program header index at offset %zd: %s"),
 	      symscn = elf_getscn (elf, shdr->sh_link);
 	      if (symscn == NULL)
 		{
-		  error (0, 0, gettext ("\
+		  error (0, 0, _("\
 cannot get symbol table section %zu in '%s': %s"),
 			 (size_t) shdr->sh_link, fname, elf_errmsg (-1));
 		  result = 1;
@@ -424,7 +424,7 @@ cannot get symbol table section %zu in '%s': %s"),
 		  GElf_Rel *rel = gelf_getrel (data, cnt, &rel_mem);
 		  if (rel == NULL)
 		    {
-		      error (0, 0, gettext ("\
+		      error (0, 0, _("\
 cannot get relocation at index %d in section %zu in '%s': %s"),
 			     cnt, elf_ndxscn (scn), fname, elf_errmsg (-1));
 		      result = 1;
@@ -447,7 +447,7 @@ cannot get relocation at index %d in section %zu in '%s': %s"),
 		  GElf_Rela *rela = gelf_getrela (data, cnt, &rela_mem);
 		  if (rela == NULL)
 		    {
-		      error (0, 0, gettext ("\
+		      error (0, 0, _("\
 cannot get relocation at index %d in section %zu in '%s': %s"),
 			     cnt, elf_ndxscn (scn), fname, elf_errmsg (-1));
 		      result = 1;
@@ -513,7 +513,7 @@ check_rel (size_t nsegments, struct segments segments[nsegments],
 	       pointer comparison.  */
 	    if (tfind (src, knownsrcs, ptrcompare) == NULL)
 	      {
-		printf (gettext ("%s not compiled with -fpic/-fPIC\n"), src);
+		printf (_("%s not compiled with -fpic/-fPIC\n"), src);
 		tsearch (src, knownsrcs, ptrcompare);
 	      }
 	    return;
@@ -567,14 +567,14 @@ check_rel (size_t nsegments, struct segments segments[nsegments],
 			/* It is this function.  */
 			if (tfind (lowstr, knownsrcs, ptrcompare) == NULL)
 			  {
-			    printf (gettext ("\
+			    printf (_("\
 the file containing the function '%s' is not compiled with -fpic/-fPIC\n"),
 				    lowstr);
 			    tsearch (lowstr, knownsrcs, ptrcompare);
 			  }
 		      }
 		    else if (highidx == -1)
-		      printf (gettext ("\
+		      printf (_("\
 the file containing the function '%s' might not be compiled with -fpic/-fPIC\n"),
 			      lowstr);
 		    else
@@ -582,7 +582,7 @@ the file containing the function '%s' might not be compiled with -fpic/-fPIC\n")
 			sym = gelf_getsym (symdata, highidx, &sym_mem);
 			assert (sym != NULL);
 
-			printf (gettext ("\
+			printf (_("\
 either the file containing the function '%s' or the file containing the function '%s' is not compiled with -fpic/-fPIC\n"),
 				lowstr, elf_strptr (elf, shdr->sh_link,
 						    sym->st_name));
@@ -594,7 +594,7 @@ either the file containing the function '%s' or the file containing the function
 		    sym = gelf_getsym (symdata, highidx, &sym_mem);
 		    assert (sym != NULL);
 
-		    printf (gettext ("\
+		    printf (_("\
 the file containing the function '%s' might not be compiled with -fpic/-fPIC\n"),
 			    elf_strptr (elf, shdr->sh_link, sym->st_name));
 		    return;
@@ -602,7 +602,7 @@ the file containing the function '%s' might not be compiled with -fpic/-fPIC\n")
 	      }
 	  }
 
-	printf (gettext ("\
+	printf (_("\
 a relocation modifies memory at offset %llu in a write-protected segment\n"),
 		(unsigned long long int) addr);
 	break;
diff --git a/src/nm.c b/src/nm.c
index a6334743..fb761ef3 100644
--- a/src/nm.c
+++ b/src/nm.c
@@ -137,7 +137,7 @@ static int handle_elf (int fd, Elf *elf, const char *prefix, const char *fname,
 
 
 #define INTERNAL_ERROR(fname) \
-  error (EXIT_FAILURE, 0, gettext ("%s: INTERNAL ERROR %d (%s): %s"),      \
+  error (EXIT_FAILURE, 0, _("%s: INTERNAL ERROR %d (%s): %s"),      \
 	 fname, __LINE__, PACKAGE_VERSION, elf_errmsg (-1))
 
 
@@ -361,7 +361,7 @@ process_file (const char *fname, bool more_than_one)
   int fd = open (fname, O_RDONLY);
   if (fd == -1)
     {
-      error (0, errno, gettext ("cannot open '%s'"), fname);
+      error (0, errno, _("cannot open '%s'"), fname);
       return 1;
     }
 
@@ -378,7 +378,7 @@ process_file (const char *fname, bool more_than_one)
 	    INTERNAL_ERROR (fname);
 
 	  if (close (fd) != 0)
-	    error (EXIT_FAILURE, errno, gettext ("while closing '%s'"), fname);
+	    error (EXIT_FAILURE, errno, _("while closing '%s'"), fname);
 
 	  return result;
 	}
@@ -390,7 +390,7 @@ process_file (const char *fname, bool more_than_one)
 	    INTERNAL_ERROR (fname);
 
 	  if (close (fd) != 0)
-	    error (EXIT_FAILURE, errno, gettext ("while closing '%s'"), fname);
+	    error (EXIT_FAILURE, errno, _("while closing '%s'"), fname);
 
 	  return result;
 	}
@@ -400,7 +400,7 @@ process_file (const char *fname, bool more_than_one)
 	INTERNAL_ERROR (fname);
     }
 
-  error (0, 0, gettext ("%s: File format not recognized"), fname);
+  error (0, 0, _("%s: File format not recognized"), fname);
 
   return 1;
 }
@@ -440,7 +440,7 @@ handle_ar (int fd, Elf *elf, const char *prefix, const char *fname,
 	  Elf_Arhdr *arhdr = NULL;
 	  size_t arhdr_off = 0;	/* Note: 0 is no valid offset.  */
 
-	  fputs_unlocked (gettext("\nArchive index:\n"), stdout);
+	  fputs_unlocked (_("\nArchive index:\n"), stdout);
 
 	  while (arsym->as_off != 0)
 	    {
@@ -449,12 +449,12 @@ handle_ar (int fd, Elf *elf, const char *prefix, const char *fname,
 		      || (subelf = elf_begin (fd, cmd, elf)) == NULL
 		      || (arhdr = elf_getarhdr (subelf)) == NULL))
 		{
-		  error (0, 0, gettext ("invalid offset %zu for symbol %s"),
+		  error (0, 0, _("invalid offset %zu for symbol %s"),
 			 arsym->as_off, arsym->as_name);
 		  break;
 		}
 
-	      printf (gettext ("%s in %s\n"), arsym->as_name, arhdr->ar_name);
+	      printf (_("%s in %s\n"), arsym->as_name, arhdr->ar_name);
 
 	      ++arsym;
 	    }
@@ -462,7 +462,7 @@ handle_ar (int fd, Elf *elf, const char *prefix, const char *fname,
 	  if (elf_rand (elf, SARMAG) != SARMAG)
 	    {
 	      error (0, 0,
-		     gettext ("cannot reset archive offset to beginning"));
+		     _("cannot reset archive offset to beginning"));
 	      return 1;
 	    }
 	}
@@ -487,7 +487,7 @@ handle_ar (int fd, Elf *elf, const char *prefix, const char *fname,
 				 new_suffix);
 	  else
 	    {
-	      error (0, 0, gettext ("%s%s%s: file format not recognized"),
+	      error (0, 0, _("%s%s%s: file format not recognized"),
 		     new_prefix, arhdr->ar_name, new_suffix);
 	      result = 1;
 	    }
@@ -702,7 +702,7 @@ get_local_names (Dwarf *dbg)
 						local_compare);
 	    if (tres == NULL)
               error (EXIT_FAILURE, errno,
-                     gettext ("cannot create search tree"));
+                     _("cannot create search tree"));
 	    else if (*tres != newp)
 	      free (newp);
 	  }
@@ -743,7 +743,7 @@ show_symbols_sysv (Ebl *ebl, GElf_Word strndx, const char *fullname,
   size_t shstrndx;
   if (elf_getshdrstrndx (ebl->elf, &shstrndx) < 0)
     error (EXIT_FAILURE, 0,
-	   gettext ("cannot get section header string table index"));
+	   _("cannot get section header string table index"));
 
   /* Cache the section names.  */
   Elf_Scn *scn = NULL;
@@ -768,10 +768,10 @@ show_symbols_sysv (Ebl *ebl, GElf_Word strndx, const char *fullname,
   int digits = length_map[gelf_getclass (ebl->elf) - 1][radix];
 
   /* We always print this prolog.  */
-  printf (gettext ("\n\nSymbols from %s:\n\n"), fullname);
+  printf (_("\n\nSymbols from %s:\n\n"), fullname);
 
   /* The header line.  */
-  printf (gettext ("%*s%-*s %-*s Class  Type     %-*s %*s Section\n\n"),
+  printf (_("%*s%-*s %-*s Class  Type     %-*s %*s Section\n\n"),
 	  print_file_name ? (int) strlen (fullname) + 1: 0, "",
 	  longest_name, sgettext ("sysv|Name"),
 	  /* TRANS: the "sysv|" parts makes the string unique.  */
@@ -1236,7 +1236,7 @@ show_symbols (int fd, Ebl *ebl, GElf_Ehdr *ehdr,
   size_t shstrndx;
   if (elf_getshdrstrndx (ebl->elf, &shstrndx) < 0)
     error (EXIT_FAILURE, 0,
-	   gettext ("cannot get section header string table index"));
+	   _("cannot get section header string table index"));
 
   /* The section is that large.  */
   size_t size = shdr->sh_size;
@@ -1247,12 +1247,12 @@ show_symbols (int fd, Ebl *ebl, GElf_Ehdr *ehdr,
   if (entsize == 0
       || entsize != gelf_fsize (ebl->elf, ELF_T_SYM, 1, EV_CURRENT))
     error (0, 0,
-	   gettext ("%s: entry size in section %zd `%s' is not what we expect"),
+	   _("%s: entry size in section %zd `%s' is not what we expect"),
 	   fullname, elf_ndxscn (scn),
 	   elf_strptr (ebl->elf, shstrndx, shdr->sh_name));
   else if (size % entsize != 0)
     error (0, 0,
-	   gettext ("%s: size of section %zd `%s' is not multiple of entry size"),
+	   _("%s: size of section %zd `%s' is not multiple of entry size"),
 	   fullname, elf_ndxscn (scn),
 	   elf_strptr (ebl->elf, shstrndx, shdr->sh_name));
 
@@ -1331,7 +1331,7 @@ show_symbols (int fd, Ebl *ebl, GElf_Ehdr *ehdr,
      is a 64 bit file.  */
   if (nentries > SIZE_MAX / sizeof (GElf_SymX))
     error (EXIT_FAILURE, 0,
-          gettext ("%s: entries (%zd) in section %zd `%s' is too large"),
+          _("%s: entries (%zd) in section %zd `%s' is too large"),
           fullname, nentries, elf_ndxscn (scn),
           elf_strptr (ebl->elf, shstrndx, shdr->sh_name));
   GElf_SymX *sym_mem;
@@ -1567,7 +1567,7 @@ handle_elf (int fd, Elf *elf, const char *prefix, const char *fname,
       && ehdr->e_type != ET_EXEC && ehdr->e_type != ET_DYN)
     {
       /* XXX Add machine specific object file types.  */
-      error (0, 0, gettext ("%s%s%s%s: Invalid operation"),
+      error (0, 0, _("%s%s%s%s: Invalid operation"),
 	     prefix ?: "", prefix ? "(" : "", fname, prefix ? ")" : "");
       result = 1;
       goto out;
@@ -1617,7 +1617,7 @@ handle_elf (int fd, Elf *elf, const char *prefix, const char *fname,
 
   if (! any)
     {
-      error (0, 0, gettext ("%s%s%s: no symbols"),
+      error (0, 0, _("%s%s%s: no symbols"),
 	     prefix ?: "", prefix ? ":" : "", fname);
       result = 1;
     }
diff --git a/src/objdump.c b/src/objdump.c
index 82d7bcf6..3a93248c 100644
--- a/src/objdump.c
+++ b/src/objdump.c
@@ -100,7 +100,7 @@ static int handle_elf (Elf *elf, const char *prefix, const char *fname,
 
 
 #define INTERNAL_ERROR(fname) \
-  error (EXIT_FAILURE, 0, gettext ("%s: INTERNAL ERROR %d (%s): %s"),      \
+  error (EXIT_FAILURE, 0, _("%s: INTERNAL ERROR %d (%s): %s"),      \
 	 fname, __LINE__, PACKAGE_VERSION, elf_errmsg (-1))
 
 
@@ -215,7 +215,7 @@ parse_opt (int key, char *arg,
     case ARGP_KEY_FINI:
       if (! any_control_option)
 	{
-	  fputs (gettext ("No operation specified.\n"), stderr);
+	  fputs (_("No operation specified.\n"), stderr);
 	  argp_help (&argp, stderr, ARGP_HELP_SEE,
 		     program_invocation_short_name);
 	  exit (EXIT_FAILURE);
@@ -238,7 +238,7 @@ process_file (const char *fname, bool more_than_one)
   int fd = open (fname, O_RDONLY);
   if (fd == -1)
     {
-      error (0, errno, gettext ("cannot open %s"), fname);
+      error (0, errno, _("cannot open %s"), fname);
       return 1;
     }
 
@@ -255,7 +255,7 @@ process_file (const char *fname, bool more_than_one)
 	    INTERNAL_ERROR (fname);
 
 	  if (close (fd) != 0)
-	    error (EXIT_FAILURE, errno, gettext ("while close `%s'"), fname);
+	    error (EXIT_FAILURE, errno, _("while close `%s'"), fname);
 
 	  return result;
 	}
@@ -267,7 +267,7 @@ process_file (const char *fname, bool more_than_one)
 	    INTERNAL_ERROR (fname);
 
 	  if (close (fd) != 0)
-	    error (EXIT_FAILURE, errno, gettext ("while close `%s'"), fname);
+	    error (EXIT_FAILURE, errno, _("while close `%s'"), fname);
 
 	  return result;
 	}
@@ -277,7 +277,7 @@ process_file (const char *fname, bool more_than_one)
 	INTERNAL_ERROR (fname);
     }
 
-  error (0, 0, gettext ("%s: File format not recognized"), fname);
+  error (0, 0, _("%s: File format not recognized"), fname);
 
   return 1;
 }
@@ -325,7 +325,7 @@ handle_ar (int fd, Elf *elf, const char *prefix, const char *fname,
 				 new_suffix);
 	  else
 	    {
-	      error (0, 0, gettext ("%s%s%s: file format not recognized"),
+	      error (0, 0, _("%s%s%s: file format not recognized"),
 		     new_prefix, arhdr->ar_name, new_suffix);
 	      result = 1;
 	    }
@@ -360,7 +360,7 @@ show_relocs_x (Ebl *ebl, GElf_Shdr *shdr, Elf_Data *symdata,
 
   if (sym == NULL)
     printf ("<%s %ld>",
-	    gettext ("INVALID SYMBOL"), (long int) GELF_R_SYM (r_info));
+	    _("INVALID SYMBOL"), (long int) GELF_R_SYM (r_info));
   else if (GELF_ST_TYPE (sym->st_info) != STT_SECTION)
     printf ("%s",
 	    elf_strptr (ebl->elf, symstrndx, sym->st_name));
@@ -375,7 +375,7 @@ show_relocs_x (Ebl *ebl, GElf_Shdr *shdr, Elf_Data *symdata,
 
       if (shdr == NULL || destshdr == NULL)
 	printf ("<%s %ld>",
-		gettext ("INVALID SECTION"),
+		_("INVALID SECTION"),
 		(long int) (sym->st_shndx == SHN_XINDEX
 			    ? xndx : sym->st_shndx));
       else
@@ -495,10 +495,10 @@ show_relocs (Ebl *ebl, const char *fname, uint32_t shstrndx)
 	  if (unlikely (destshdr == NULL))
 	    continue;
 
-	  printf (gettext ("\nRELOCATION RECORDS FOR [%s]:\n"
+	  printf (_("\nRELOCATION RECORDS FOR [%s]:\n"
 			   "%-*s TYPE                 VALUE\n"),
 		  elf_strptr (ebl->elf, shstrndx, destshdr->sh_name),
-		  elfclass == ELFCLASS32 ? 8 : 16, gettext ("OFFSET"));
+		  elfclass == ELFCLASS32 ? 8 : 16, _("OFFSET"));
 
 	  /* Get the data of the section.  */
 	  Elf_Data *data = elf_getdata (scn, NULL);
@@ -563,7 +563,7 @@ show_full_content (Ebl *ebl, const char *fname, uint32_t shstrndx)
 	  if  (! section_match (ebl->elf, elf_ndxscn (scn), shdr, shstrndx))
 	    continue;
 
-	  printf (gettext ("Contents of section %s:\n"),
+	  printf (_("Contents of section %s:\n"),
 		  elf_strptr (ebl->elf, shstrndx, shdr->sh_name));
 
 	  /* Get the data of the section.  */
@@ -684,7 +684,7 @@ show_disasm (Ebl *ebl, const char *fname, uint32_t shstrndx)
 {
   DisasmCtx_t *ctx = disasm_begin (ebl, ebl->elf, NULL /* XXX TODO */);
   if (ctx == NULL)
-    error (EXIT_FAILURE, 0, gettext ("cannot disassemble"));
+    error (EXIT_FAILURE, 0, _("cannot disassemble"));
 
   Elf_Scn *scn = NULL;
   while ((scn = elf_nextscn (ebl->elf, scn)) != NULL)
@@ -757,7 +757,7 @@ handle_elf (Elf *elf, const char *prefix, const char *fname,
   Ebl *ebl = ebl_openbackend (elf);
   if (ebl == NULL)
     error (EXIT_FAILURE, 0,
-	   gettext ("cannot create backend for elf file"));
+	   _("cannot create backend for elf file"));
 
   printf ("%s: elf%d-%s\n\n",
 	  fname, gelf_getclass (elf) == ELFCLASS32 ? 32 : 64,
@@ -779,7 +779,7 @@ handle_elf (Elf *elf, const char *prefix, const char *fname,
   size_t shstrndx;
   if (elf_getshdrstrndx (ebl->elf, &shstrndx) < 0)
     error (EXIT_FAILURE, 0,
-	   gettext ("cannot get section header string table index"));
+	   _("cannot get section header string table index"));
 
   int result = 0;
   if (print_disasm)
diff --git a/src/ranlib.c b/src/ranlib.c
index 483a1b65..bd7e1d8a 100644
--- a/src/ranlib.c
+++ b/src/ranlib.c
@@ -99,7 +99,7 @@ main (int argc, char *argv[])
   /* There must at least be one more parameter specifying the archive.   */
   if (remaining == argc)
     {
-      error (0, 0, gettext ("Archive name required"));
+      error (0, 0, _("Archive name required"));
       argp_help (&argp, stderr, ARGP_HELP_SEE, "ranlib");
       exit (EXIT_FAILURE);
     }
@@ -138,14 +138,14 @@ handle_file (const char *fname)
   int fd = open (fname, O_RDONLY);
   if (fd == -1)
     {
-      error (0, errno, gettext ("cannot open '%s'"), fname);
+      error (0, errno, _("cannot open '%s'"), fname);
       return 1;
     }
 
   struct stat st;
   if (fstat (fd, &st) != 0)
     {
-      error (0, errno, gettext ("cannot stat '%s'"), fname);
+      error (0, errno, _("cannot stat '%s'"), fname);
       close (fd);
       return 1;
     }
@@ -155,7 +155,7 @@ handle_file (const char *fname)
   Elf *arelf = elf_begin (fd, ELF_C_READ_MMAP, NULL);
   if (arelf == NULL)
     {
-      error (0, 0, gettext ("cannot create ELF descriptor for '%s': %s"),
+      error (0, 0, _("cannot create ELF descriptor for '%s': %s"),
 	     fname, elf_errmsg (-1));
       close (fd);
       return 1;
@@ -163,7 +163,7 @@ handle_file (const char *fname)
 
   if (elf_kind (arelf) != ELF_K_AR)
     {
-      error (0, 0, gettext ("'%s' is no archive"), fname);
+      error (0, 0, _("'%s' is no archive"), fname);
       elf_end (arelf);
       close (fd);
       return 1;
@@ -198,7 +198,7 @@ handle_file (const char *fname)
       /* Get next archive element.  */
       cmd = elf_next (elf);
       if (elf_end (elf) != 0)
-	error (0, 0, gettext ("error while freeing sub-ELF descriptor: %s"),
+	error (0, 0, _("error while freeing sub-ELF descriptor: %s"),
 	       elf_errmsg (-1));
     }
 
@@ -219,7 +219,7 @@ handle_file (const char *fname)
       if (unlikely (newfd == -1))
 	{
 	nonew:
-	  error (0, errno, gettext ("cannot create new file"));
+	  error (0, errno, _("cannot create new file"));
 	  status = 1;
 	}
       else
diff --git a/src/readelf.c b/src/readelf.c
index f51b41d7..824ab31b 100644
--- a/src/readelf.c
+++ b/src/readelf.c
@@ -347,8 +347,8 @@ main (int argc, char *argv[])
   textdomain (PACKAGE_TARNAME);
 
   /* Look up once.  */
-  yes_str = gettext ("yes");
-  no_str = gettext ("no");
+  yes_str = _("yes");
+  no_str = _("no");
 
   /* Parse and process arguments.  */
   int remaining;
@@ -545,7 +545,7 @@ parse_opt (int key, char *arg,
 	print_debug_sections |= section_gdb_index;
       else
 	{
-	  fprintf (stderr, gettext ("Unknown DWARF debug section `%s'.\n"),
+	  fprintf (stderr, _("Unknown DWARF debug section `%s'.\n"),
 		   arg);
 	  argp_help (&argp, stderr, ARGP_HELP_SEE,
 		     program_invocation_short_name);
@@ -572,12 +572,12 @@ parse_opt (int key, char *arg,
       print_unresolved_addresses = true;
       break;
     case ARGP_KEY_NO_ARGS:
-      fputs (gettext ("Missing file name.\n"), stderr);
+      fputs (_("Missing file name.\n"), stderr);
       goto do_argp_help;
     case ARGP_KEY_FINI:
       if (! any_control_option && ! print_archive_index)
 	{
-	  fputs (gettext ("No operation specified.\n"), stderr);
+	  fputs (_("No operation specified.\n"), stderr);
 	do_argp_help:
 	  argp_help (&argp, stderr, ARGP_HELP_SEE,
 		     program_invocation_short_name);
@@ -616,14 +616,14 @@ open_input_section (int fd)
   Elf *elf = elf_begin (fd, ELF_C_READ_MMAP, NULL);
   if (elf == NULL)
     {
-      error (0, 0, gettext ("cannot generate Elf descriptor: %s"),
+      error (0, 0, _("cannot generate Elf descriptor: %s"),
 	     elf_errmsg (-1));
       return -1;
     }
 
   if (elf_getshdrnum (elf, &shnums) < 0)
     {
-      error (0, 0, gettext ("cannot determine number of sections: %s"),
+      error (0, 0, _("cannot determine number of sections: %s"),
 	     elf_errmsg (-1));
     open_error:
       elf_end (elf);
@@ -632,7 +632,7 @@ open_input_section (int fd)
 
   if (elf_getshdrstrndx (elf, &shstrndx) < 0)
     {
-      error (0, 0, gettext ("cannot get section header string table index"));
+      error (0, 0, _("cannot get section header string table index"));
       goto open_error;
     }
 
@@ -641,7 +641,7 @@ open_input_section (int fd)
       Elf_Scn *scn = elf_getscn (elf, cnt);
       if (scn == NULL)
 	{
-	  error (0, 0, gettext ("cannot get section: %s"),
+	  error (0, 0, _("cannot get section: %s"),
 		 elf_errmsg (-1));
 	  goto open_error;
 	}
@@ -650,7 +650,7 @@ open_input_section (int fd)
       GElf_Shdr *shdr = gelf_getshdr (scn, &shdr_mem);
       if (unlikely (shdr == NULL))
 	{
-	  error (0, 0, gettext ("cannot get section header: %s"),
+	  error (0, 0, _("cannot get section header: %s"),
 		 elf_errmsg (-1));
 	  goto open_error;
 	}
@@ -658,7 +658,7 @@ open_input_section (int fd)
       const char *sname = elf_strptr (elf, shstrndx, shdr->sh_name);
       if (sname == NULL)
 	{
-	  error (0, 0, gettext ("cannot get section name"));
+	  error (0, 0, _("cannot get section name"));
 	  goto open_error;
 	}
 
@@ -667,7 +667,7 @@ open_input_section (int fd)
 	  Elf_Data *data = elf_rawdata (scn, NULL);
 	  if (data == NULL)
 	    {
-	      error (0, 0, gettext ("cannot get %s content: %s"),
+	      error (0, 0, _("cannot get %s content: %s"),
 		     sname, elf_errmsg (-1));
 	      goto open_error;
 	    }
@@ -683,7 +683,7 @@ open_input_section (int fd)
 	  int sfd = mkstemp (tempname);
 	  if (sfd == -1)
 	    {
-	      error (0, 0, gettext ("cannot create temp file '%s'"),
+	      error (0, 0, _("cannot create temp file '%s'"),
 		     tempname);
 	      goto open_error;
 	    }
@@ -692,20 +692,20 @@ open_input_section (int fd)
 	  ssize_t size = data->d_size;
 	  if (write_retry (sfd, data->d_buf, size) != size)
 	    {
-	      error (0, 0, gettext ("cannot write section data"));
+	      error (0, 0, _("cannot write section data"));
 	      goto open_error;
 	    }
 
 	  if (elf_end (elf) != 0)
 	    {
-	      error (0, 0, gettext ("error while closing Elf descriptor: %s"),
+	      error (0, 0, _("error while closing Elf descriptor: %s"),
 		     elf_errmsg (-1));
 	      return -1;
 	    }
 
 	  if (lseek (sfd, 0, SEEK_SET) == -1)
 	    {
-	      error (0, 0, gettext ("error while rewinding file descriptor"));
+	      error (0, 0, _("error while rewinding file descriptor"));
 	      return -1;
 	    }
 
@@ -715,7 +715,7 @@ open_input_section (int fd)
 
   /* Named section not found.  */
   if (elf_end (elf) != 0)
-    error (0, 0, gettext ("error while closing Elf descriptor: %s"),
+    error (0, 0, _("error while closing Elf descriptor: %s"),
 	   elf_errmsg (-1));
   return -1;
 }
@@ -727,7 +727,7 @@ check_archive_index (int fd, const char *fname, bool only_one)
   /* Create an `Elf' descriptor.  */
   Elf *elf = elf_begin (fd, ELF_C_READ_MMAP, NULL);
   if (elf == NULL)
-    error (0, 0, gettext ("cannot generate Elf descriptor: %s"),
+    error (0, 0, _("cannot generate Elf descriptor: %s"),
 	   elf_errmsg (-1));
   else
     {
@@ -739,12 +739,12 @@ check_archive_index (int fd, const char *fname, bool only_one)
 	}
       else
 	error (0, 0,
-	       gettext ("'%s' is not an archive, cannot print archive index"),
+	       _("'%s' is not an archive, cannot print archive index"),
 	       fname);
 
       /* Now we can close the descriptor.  */
       if (elf_end (elf) != 0)
-	error (0, 0, gettext ("error while closing Elf descriptor: %s"),
+	error (0, 0, _("error while closing Elf descriptor: %s"),
 	       elf_errmsg (-1));
     }
 }
@@ -843,11 +843,11 @@ create_dwfl (int fd, const char *fname)
     {
       struct stat st;
       if (fstat (dwfl_fd, &st) != 0)
-	error (0, errno, gettext ("cannot stat input file"));
+	error (0, errno, _("cannot stat input file"));
       else if (unlikely (st.st_size == 0))
-	error (0, 0, gettext ("input file is empty"));
+	error (0, 0, _("input file is empty"));
       else
-	error (0, 0, gettext ("failed reading '%s': %s"),
+	error (0, 0, _("failed reading '%s': %s"),
 	       fname, dwfl_errmsg (-1));
       close (dwfl_fd);		/* Consumed on success, not on failure.  */
       dwfl = NULL;
@@ -876,7 +876,7 @@ process_file (int fd, const char *fname, bool only_one)
       fd = open_input_section (fd);
       if (fd == -1)
         {
-          error (0, 0, gettext ("No such section '%s' in '%s'"),
+          error (0, 0, _("No such section '%s' in '%s'"),
 		 elf_input_section, fname);
           return;
         }
@@ -935,7 +935,7 @@ process_elf_file (Dwfl_Module *dwflmod, int fd)
 
   if (ehdr == NULL)
     {
-      error (0, 0, gettext ("cannot read ELF header: %s"), elf_errmsg (-1));
+      error (0, 0, _("cannot read ELF header: %s"), elf_errmsg (-1));
       return;
     }
 
@@ -943,20 +943,20 @@ process_elf_file (Dwfl_Module *dwflmod, int fd)
   if (unlikely (ebl == NULL))
     {
     ebl_error:
-      error (0, errno, gettext ("cannot create EBL handle"));
+      error (0, errno, _("cannot create EBL handle"));
       return;
     }
 
   /* Determine the number of sections.  */
   if (unlikely (elf_getshdrnum (ebl->elf, &shnum) < 0))
     error (EXIT_FAILURE, 0,
-	   gettext ("cannot determine number of sections: %s"),
+	   _("cannot determine number of sections: %s"),
 	   elf_errmsg (-1));
 
   /* Determine the number of phdrs.  */
   if (unlikely (elf_getphdrnum (ebl->elf, &phnum) < 0))
     error (EXIT_FAILURE, 0,
-	   gettext ("cannot determine number of program headers: %s"),
+	   _("cannot determine number of program headers: %s"),
 	   elf_errmsg (-1));
 
   /* For an ET_REL file, libdwfl has adjusted the in-core shdrs and
@@ -988,7 +988,7 @@ process_elf_file (Dwfl_Module *dwflmod, int fd)
 	}
       if (pure_elf == NULL)
 	{
-	  error (0, 0, gettext ("cannot read ELF: %s"), elf_errmsg (-1));
+	  error (0, 0, _("cannot read ELF: %s"), elf_errmsg (-1));
 	  return;
 	}
       pure_ebl = ebl_openbackend (pure_elf);
@@ -1055,12 +1055,12 @@ print_file_type (unsigned short int e_type)
 	N_("DYN (Shared object file)"),
 	N_("CORE (Core file)")
       };
-      puts (gettext (knowntypes[e_type]));
+      puts (_(knowntypes[e_type]));
     }
   else if (e_type >= ET_LOOS && e_type <= ET_HIOS)
-    printf (gettext ("OS Specific: (%x)\n"),  e_type);
+    printf (_("OS Specific: (%x)\n"),  e_type);
   else if (e_type >= ET_LOPROC /* && e_type <= ET_HIPROC always true */)
-    printf (gettext ("Processor Specific: (%x)\n"),  e_type);
+    printf (_("Processor Specific: (%x)\n"),  e_type);
   else
     puts ("???");
 }
@@ -1070,93 +1070,93 @@ print_file_type (unsigned short int e_type)
 static void
 print_ehdr (Ebl *ebl, GElf_Ehdr *ehdr)
 {
-  fputs_unlocked (gettext ("ELF Header:\n  Magic:  "), stdout);
+  fputs_unlocked (_("ELF Header:\n  Magic:  "), stdout);
   for (size_t cnt = 0; cnt < EI_NIDENT; ++cnt)
     printf (" %02hhx", ehdr->e_ident[cnt]);
 
-  printf (gettext ("\n  Class:                             %s\n"),
+  printf (_("\n  Class:                             %s\n"),
 	  ehdr->e_ident[EI_CLASS] == ELFCLASS32 ? "ELF32"
 	  : ehdr->e_ident[EI_CLASS] == ELFCLASS64 ? "ELF64"
 	  : "\?\?\?");
 
-  printf (gettext ("  Data:                              %s\n"),
+  printf (_("  Data:                              %s\n"),
 	  ehdr->e_ident[EI_DATA] == ELFDATA2LSB
 	  ? "2's complement, little endian"
 	  : ehdr->e_ident[EI_DATA] == ELFDATA2MSB
 	  ? "2's complement, big endian" : "\?\?\?");
 
-  printf (gettext ("  Ident Version:                     %hhd %s\n"),
+  printf (_("  Ident Version:                     %hhd %s\n"),
 	  ehdr->e_ident[EI_VERSION],
-	  ehdr->e_ident[EI_VERSION] == EV_CURRENT ? gettext ("(current)")
+	  ehdr->e_ident[EI_VERSION] == EV_CURRENT ? _("(current)")
 	  : "(\?\?\?)");
 
   char buf[512];
-  printf (gettext ("  OS/ABI:                            %s\n"),
+  printf (_("  OS/ABI:                            %s\n"),
 	  ebl_osabi_name (ebl, ehdr->e_ident[EI_OSABI], buf, sizeof (buf)));
 
-  printf (gettext ("  ABI Version:                       %hhd\n"),
+  printf (_("  ABI Version:                       %hhd\n"),
 	  ehdr->e_ident[EI_ABIVERSION]);
 
-  fputs_unlocked (gettext ("  Type:                              "), stdout);
+  fputs_unlocked (_("  Type:                              "), stdout);
   print_file_type (ehdr->e_type);
 
   const char *machine = dwelf_elf_e_machine_string (ehdr->e_machine);
   if (machine != NULL)
-    printf (gettext ("  Machine:                           %s\n"), machine);
+    printf (_("  Machine:                           %s\n"), machine);
   else
-    printf (gettext ("  Machine:                           <unknown>: 0x%x\n"),
+    printf (_("  Machine:                           <unknown>: 0x%x\n"),
 	    ehdr->e_machine);
 
-  printf (gettext ("  Version:                           %d %s\n"),
+  printf (_("  Version:                           %d %s\n"),
 	  ehdr->e_version,
-	  ehdr->e_version  == EV_CURRENT ? gettext ("(current)") : "(\?\?\?)");
+	  ehdr->e_version  == EV_CURRENT ? _("(current)") : "(\?\?\?)");
 
-  printf (gettext ("  Entry point address:               %#" PRIx64 "\n"),
+  printf (_("  Entry point address:               %#" PRIx64 "\n"),
 	  ehdr->e_entry);
 
-  printf (gettext ("  Start of program headers:          %" PRId64 " %s\n"),
-	  ehdr->e_phoff, gettext ("(bytes into file)"));
+  printf (_("  Start of program headers:          %" PRId64 " %s\n"),
+	  ehdr->e_phoff, _("(bytes into file)"));
 
-  printf (gettext ("  Start of section headers:          %" PRId64 " %s\n"),
-	  ehdr->e_shoff, gettext ("(bytes into file)"));
+  printf (_("  Start of section headers:          %" PRId64 " %s\n"),
+	  ehdr->e_shoff, _("(bytes into file)"));
 
-  printf (gettext ("  Flags:                             %s\n"),
+  printf (_("  Flags:                             %s\n"),
 	  ebl_machine_flag_name (ebl, ehdr->e_flags, buf, sizeof (buf)));
 
-  printf (gettext ("  Size of this header:               %" PRId16 " %s\n"),
-	  ehdr->e_ehsize, gettext ("(bytes)"));
+  printf (_("  Size of this header:               %" PRId16 " %s\n"),
+	  ehdr->e_ehsize, _("(bytes)"));
 
-  printf (gettext ("  Size of program header entries:    %" PRId16 " %s\n"),
-	  ehdr->e_phentsize, gettext ("(bytes)"));
+  printf (_("  Size of program header entries:    %" PRId16 " %s\n"),
+	  ehdr->e_phentsize, _("(bytes)"));
 
-  printf (gettext ("  Number of program headers entries: %" PRId16),
+  printf (_("  Number of program headers entries: %" PRId16),
 	  ehdr->e_phnum);
   if (ehdr->e_phnum == PN_XNUM)
     {
       GElf_Shdr shdr_mem;
       GElf_Shdr *shdr = gelf_getshdr (elf_getscn (ebl->elf, 0), &shdr_mem);
       if (shdr != NULL)
-	printf (gettext (" (%" PRIu32 " in [0].sh_info)"),
+	printf (_(" (%" PRIu32 " in [0].sh_info)"),
 		(uint32_t) shdr->sh_info);
       else
-	fputs_unlocked (gettext (" ([0] not available)"), stdout);
+	fputs_unlocked (_(" ([0] not available)"), stdout);
     }
   fputc_unlocked ('\n', stdout);
 
-  printf (gettext ("  Size of section header entries:    %" PRId16 " %s\n"),
-	  ehdr->e_shentsize, gettext ("(bytes)"));
+  printf (_("  Size of section header entries:    %" PRId16 " %s\n"),
+	  ehdr->e_shentsize, _("(bytes)"));
 
-  printf (gettext ("  Number of section headers entries: %" PRId16),
+  printf (_("  Number of section headers entries: %" PRId16),
 	  ehdr->e_shnum);
   if (ehdr->e_shnum == 0)
     {
       GElf_Shdr shdr_mem;
       GElf_Shdr *shdr = gelf_getshdr (elf_getscn (ebl->elf, 0), &shdr_mem);
       if (shdr != NULL)
-	printf (gettext (" (%" PRIu32 " in [0].sh_size)"),
+	printf (_(" (%" PRIu32 " in [0].sh_size)"),
 		(uint32_t) shdr->sh_size);
       else
-	fputs_unlocked (gettext (" ([0] not available)"), stdout);
+	fputs_unlocked (_(" ([0] not available)"), stdout);
     }
   fputc_unlocked ('\n', stdout);
 
@@ -1166,19 +1166,19 @@ print_ehdr (Ebl *ebl, GElf_Ehdr *ehdr)
       GElf_Shdr *shdr = gelf_getshdr (elf_getscn (ebl->elf, 0), &shdr_mem);
       if (shdr != NULL)
 	/* We managed to get the zeroth section.  */
-	snprintf (buf, sizeof (buf), gettext (" (%" PRIu32 " in [0].sh_link)"),
+	snprintf (buf, sizeof (buf), _(" (%" PRIu32 " in [0].sh_link)"),
 		  (uint32_t) shdr->sh_link);
       else
 	{
-	  strncpy (buf, gettext (" ([0] not available)"), sizeof (buf));
+	  strncpy (buf, _(" ([0] not available)"), sizeof (buf));
 	  buf[sizeof (buf) - 1] = '\0';
 	}
 
-      printf (gettext ("  Section header string table index: XINDEX%s\n\n"),
+      printf (_("  Section header string table index: XINDEX%s\n\n"),
 	      buf);
     }
   else
-    printf (gettext ("  Section header string table index: %" PRId16 "\n\n"),
+    printf (_("  Section header string table index: %" PRId16 "\n\n"),
 	    ehdr->e_shstrndx);
 }
 
@@ -1225,10 +1225,10 @@ print_shdr (Ebl *ebl, GElf_Ehdr *ehdr)
       size_t sections;
       if (unlikely (elf_getshdrnum (ebl->elf, &sections) < 0))
 	error (EXIT_FAILURE, 0,
-	       gettext ("cannot get number of sections: %s"),
+	       _("cannot get number of sections: %s"),
 	       elf_errmsg (-1));
 
-      printf (gettext ("\
+      printf (_("\
 There are %zd section headers, starting at offset %#" PRIx64 ":\n\
 \n"),
 	      sections, ehdr->e_shoff);
@@ -1237,22 +1237,22 @@ There are %zd section headers, starting at offset %#" PRIx64 ":\n\
   /* Get the section header string table index.  */
   if (unlikely (elf_getshdrstrndx (ebl->elf, &shstrndx) < 0))
     error (EXIT_FAILURE, 0,
-	   gettext ("cannot get section header string table index: %s"),
+	   _("cannot get section header string table index: %s"),
 	   elf_errmsg (-1));
 
-  puts (gettext ("Section Headers:"));
+  puts (_("Section Headers:"));
 
   if (ehdr->e_ident[EI_CLASS] == ELFCLASS32)
-    puts (gettext ("[Nr] Name                 Type         Addr     Off    Size   ES Flags Lk Inf Al"));
+    puts (_("[Nr] Name                 Type         Addr     Off    Size   ES Flags Lk Inf Al"));
   else
-    puts (gettext ("[Nr] Name                 Type         Addr             Off      Size     ES Flags Lk Inf Al"));
+    puts (_("[Nr] Name                 Type         Addr             Off      Size     ES Flags Lk Inf Al"));
 
   if (print_decompress)
     {
       if (ehdr->e_ident[EI_CLASS] == ELFCLASS32)
-	puts (gettext ("     [Compression  Size   Al]"));
+	puts (_("     [Compression  Size   Al]"));
       else
-	puts (gettext ("     [Compression  Size     Al]"));
+	puts (_("     [Compression  Size     Al]"));
     }
 
   for (cnt = 0; cnt < shnum; ++cnt)
@@ -1260,14 +1260,14 @@ There are %zd section headers, starting at offset %#" PRIx64 ":\n\
       Elf_Scn *scn = elf_getscn (ebl->elf, cnt);
 
       if (unlikely (scn == NULL))
-	error (EXIT_FAILURE, 0, gettext ("cannot get section: %s"),
+	error (EXIT_FAILURE, 0, _("cannot get section: %s"),
 	       elf_errmsg (-1));
 
       /* Get the section header.  */
       GElf_Shdr shdr_mem;
       GElf_Shdr *shdr = gelf_getshdr (scn, &shdr_mem);
       if (unlikely (shdr == NULL))
-	error (EXIT_FAILURE, 0, gettext ("cannot get section header: %s"),
+	error (EXIT_FAILURE, 0, _("cannot get section header: %s"),
 	       elf_errmsg (-1));
 
       char flagbuf[20];
@@ -1328,7 +1328,7 @@ There are %zd section headers, starting at offset %#" PRIx64 ":\n\
 			chdr.ch_size, chdr.ch_addralign);
 	      else
 		error (0, 0,
-		       gettext ("bad compression header for section %zd: %s"),
+		       _("bad compression header for section %zd: %s"),
 		       elf_ndxscn (scn), elf_errmsg (-1));
 	    }
 	  else if (strncmp(".zdebug", sname, strlen (".zdebug")) == 0)
@@ -1339,7 +1339,7 @@ There are %zd section headers, starting at offset %#" PRIx64 ":\n\
 			ehdr->e_ident[EI_CLASS] == ELFCLASS32 ? 6 : 8, size);
 	      else
 		error (0, 0,
-		       gettext ("bad gnu compressed size for section %zd: %s"),
+		       _("bad gnu compressed size for section %zd: %s"),
 		       elf_ndxscn (scn), elf_errmsg (-1));
 	    }
 	}
@@ -1357,12 +1357,12 @@ print_phdr (Ebl *ebl, GElf_Ehdr *ehdr)
     /* No program header, this is OK in relocatable objects.  */
     return;
 
-  puts (gettext ("Program Headers:"));
+  puts (_("Program Headers:"));
   if (ehdr->e_ident[EI_CLASS] == ELFCLASS32)
-    puts (gettext ("\
+    puts (_("\
   Type           Offset   VirtAddr   PhysAddr   FileSiz  MemSiz   Flg Align"));
   else
-    puts (gettext ("\
+    puts (_("\
   Type           Offset   VirtAddr           PhysAddr           FileSiz  MemSiz   Flg Align"));
 
   /* Process all program headers.  */
@@ -1419,7 +1419,7 @@ print_phdr (Ebl *ebl, GElf_Ehdr *ehdr)
 	      && phdr->p_filesz <= maxsize - phdr->p_offset
 	      && memchr (filedata + phdr->p_offset, '\0',
 			 phdr->p_filesz) != NULL)
-	    printf (gettext ("\t[Requesting program interpreter: %s]\n"),
+	    printf (_("\t[Requesting program interpreter: %s]\n"),
 		    filedata + phdr->p_offset);
 	}
       else if (phdr->p_type == PT_GNU_RELRO)
@@ -1433,7 +1433,7 @@ print_phdr (Ebl *ebl, GElf_Ehdr *ehdr)
   size_t sections;
   if (unlikely (elf_getshdrnum (ebl->elf, &sections) < 0))
     error (EXIT_FAILURE, 0,
-           gettext ("cannot get number of sections: %s"),
+           _("cannot get number of sections: %s"),
            elf_errmsg (-1));
 
   if (sections == 0)
@@ -1444,9 +1444,9 @@ print_phdr (Ebl *ebl, GElf_Ehdr *ehdr)
   size_t shstrndx;
   if (unlikely (elf_getshdrstrndx (ebl->elf, &shstrndx) < 0))
     error (EXIT_FAILURE, 0,
-	   gettext ("cannot get section header string table index"));
+	   _("cannot get section header string table index"));
 
-  puts (gettext ("\n Section to Segment mapping:\n  Segment Sections..."));
+  puts (_("\n Section to Segment mapping:\n  Segment Sections..."));
 
   for (size_t cnt = 0; cnt < phnum; ++cnt)
     {
@@ -1457,7 +1457,7 @@ print_phdr (Ebl *ebl, GElf_Ehdr *ehdr)
       GElf_Phdr *phdr = gelf_getphdr (ebl->elf, cnt, &phdr_mem);
       /* This must not happen.  */
       if (unlikely (phdr == NULL))
-	error (EXIT_FAILURE, 0, gettext ("cannot get program header: %s"),
+	error (EXIT_FAILURE, 0, _("cannot get program header: %s"),
 	       elf_errmsg (-1));
 
       /* Iterate over the sections.  */
@@ -1468,7 +1468,7 @@ print_phdr (Ebl *ebl, GElf_Ehdr *ehdr)
 	  Elf_Scn *scn = elf_getscn (ebl->elf, inner);
 	  /* This should not happen.  */
 	  if (unlikely (scn == NULL))
-	    error (EXIT_FAILURE, 0, gettext ("cannot get section: %s"),
+	    error (EXIT_FAILURE, 0, _("cannot get section: %s"),
 		   elf_errmsg (-1));
 
 	  /* Get the section header.  */
@@ -1476,7 +1476,7 @@ print_phdr (Ebl *ebl, GElf_Ehdr *ehdr)
 	  GElf_Shdr *shdr = gelf_getshdr (scn, &shdr_mem);
 	  if (unlikely (shdr == NULL))
 	    error (EXIT_FAILURE, 0,
-		   gettext ("cannot get section header: %s"),
+		   _("cannot get section header: %s"),
 		   elf_errmsg (-1));
 
 	  if (shdr->sh_size > 0
@@ -1595,7 +1595,7 @@ handle_scngrp (Ebl *ebl, Elf_Scn *scn, GElf_Shdr *shdr)
   size_t shstrndx;
   if (unlikely (elf_getshdrstrndx (ebl->elf, &shstrndx) < 0))
     error (EXIT_FAILURE, 0,
-	   gettext ("cannot get section header string table index"));
+	   _("cannot get section header string table index"));
 
   Elf32_Word *grpref = (Elf32_Word *) data->d_buf;
 
@@ -1616,7 +1616,7 @@ handle_scngrp (Ebl *ebl, Elf_Scn *scn, GElf_Shdr *shdr)
 	  elf_strptr (ebl->elf, shstrndx, shdr->sh_name),
 	  (sym == NULL ? NULL
 	   : elf_strptr (ebl->elf, symshdr->sh_link, sym->st_name))
-	  ?: gettext ("<INVALID SYMBOL>"),
+	  ?: _("<INVALID SYMBOL>"),
 	  data->d_size / sizeof (Elf32_Word) - 1);
 
   for (size_t cnt = 1; cnt < data->d_size / sizeof (Elf32_Word); ++cnt)
@@ -1630,7 +1630,7 @@ handle_scngrp (Ebl *ebl, Elf_Scn *scn, GElf_Shdr *shdr)
 	      grpref[cnt],
 	      grpshdr != NULL
 	      && (str = elf_strptr (ebl->elf, shstrndx, grpshdr->sh_name))
-	      ? str : gettext ("<INVALID SECTION>"));
+	      ? str : _("<INVALID SECTION>"));
     }
 }
 
@@ -1653,12 +1653,12 @@ print_scngrp (Ebl *ebl)
 	    {
 	      if (elf_compress (scn, 0, 0) < 0)
 		printf ("WARNING: %s [%zd]\n",
-			gettext ("Couldn't uncompress section"),
+			_("Couldn't uncompress section"),
 			elf_ndxscn (scn));
 	      shdr = gelf_getshdr (scn, &shdr_mem);
 	      if (unlikely (shdr == NULL))
 		error (EXIT_FAILURE, 0,
-		       gettext ("cannot get section [%zd] header: %s"),
+		       _("cannot get section [%zd] header: %s"),
 		       elf_ndxscn (scn),
 		       elf_errmsg (-1));
 	    }
@@ -1796,13 +1796,13 @@ handle_dynamic (Ebl *ebl, Elf_Scn *scn, GElf_Shdr *shdr)
   /* Get the section header string table index.  */
   if (unlikely (elf_getshdrstrndx (ebl->elf, &shstrndx) < 0))
     error (EXIT_FAILURE, 0,
-	   gettext ("cannot get section header string table index"));
+	   _("cannot get section header string table index"));
 
   sh_entsize = gelf_fsize (ebl->elf, ELF_T_DYN, 1, EV_CURRENT);
 
   glink = gelf_getshdr (elf_getscn (ebl->elf, shdr->sh_link), &glink_mem);
   if (glink == NULL)
-    error (EXIT_FAILURE, 0, gettext ("invalid sh_link value in section %zu"),
+    error (EXIT_FAILURE, 0, _("invalid sh_link value in section %zu"),
 	   elf_ndxscn (scn));
 
   printf (ngettext ("\
@@ -1815,7 +1815,7 @@ handle_dynamic (Ebl *ebl, Elf_Scn *scn, GElf_Shdr *shdr)
 	  shdr->sh_offset,
 	  (int) shdr->sh_link,
 	  elf_strptr (ebl->elf, shstrndx, glink->sh_name));
-  fputs_unlocked (gettext ("  Type              Value\n"), stdout);
+  fputs_unlocked (_("  Type              Value\n"), stdout);
 
   for (cnt = 0; cnt < shdr->sh_size / sh_entsize; ++cnt)
     {
@@ -1839,22 +1839,22 @@ handle_dynamic (Ebl *ebl, Elf_Scn *scn, GElf_Shdr *shdr)
 	  break;
 
 	case DT_NEEDED:
-	  printf (gettext ("Shared library: [%s]\n"),
+	  printf (_("Shared library: [%s]\n"),
 		  elf_strptr (ebl->elf, shdr->sh_link, dyn->d_un.d_val));
 	  break;
 
 	case DT_SONAME:
-	  printf (gettext ("Library soname: [%s]\n"),
+	  printf (_("Library soname: [%s]\n"),
 		  elf_strptr (ebl->elf, shdr->sh_link, dyn->d_un.d_val));
 	  break;
 
 	case DT_RPATH:
-	  printf (gettext ("Library rpath: [%s]\n"),
+	  printf (_("Library rpath: [%s]\n"),
 		  elf_strptr (ebl->elf, shdr->sh_link, dyn->d_un.d_val));
 	  break;
 
 	case DT_RUNPATH:
-	  printf (gettext ("Library runpath: [%s]\n"),
+	  printf (_("Library runpath: [%s]\n"),
 		  elf_strptr (ebl->elf, shdr->sh_link, dyn->d_un.d_val));
 	  break;
 
@@ -1874,7 +1874,7 @@ handle_dynamic (Ebl *ebl, Elf_Scn *scn, GElf_Shdr *shdr)
 	case DT_SYMINENT:
 	case DT_GNU_CONFLICTSZ:
 	case DT_GNU_LIBLISTSZ:
-	  printf (gettext ("%" PRId64 " (bytes)\n"), dyn->d_un.d_val);
+	  printf (_("%" PRId64 " (bytes)\n"), dyn->d_un.d_val);
 	  break;
 
 	case DT_VERDEFNUM:
@@ -1987,7 +1987,7 @@ handle_relocs_rel (Ebl *ebl, GElf_Ehdr *ehdr, Elf_Scn *scn, GElf_Shdr *shdr)
 
   if (unlikely (symshdr == NULL || symdata == NULL || destshdr == NULL))
     {
-      printf (gettext ("\nInvalid symbol table at offset %#0" PRIx64 "\n"),
+      printf (_("\nInvalid symbol table at offset %#0" PRIx64 "\n"),
 	      shdr->sh_offset);
       return;
     }
@@ -2002,7 +2002,7 @@ handle_relocs_rel (Ebl *ebl, GElf_Ehdr *ehdr, Elf_Scn *scn, GElf_Shdr *shdr)
   size_t shstrndx;
   if (unlikely (elf_getshdrstrndx (ebl->elf, &shstrndx) < 0))
     error (EXIT_FAILURE, 0,
-	   gettext ("cannot get section header string table index"));
+	   _("cannot get section header string table index"));
 
   if (shdr->sh_info != 0)
     printf (ngettext ("\
@@ -2030,9 +2030,9 @@ handle_relocs_rel (Ebl *ebl, GElf_Ehdr *ehdr, Elf_Scn *scn, GElf_Shdr *shdr)
 	    shdr->sh_offset,
 	    nentries);
   fputs_unlocked (class == ELFCLASS32
-		  ? gettext ("\
+		  ? _("\
   Offset      Type                 Value       Name\n")
-		  : gettext ("\
+		  : _("\
   Offset              Type                 Value               Name\n"),
 	 stdout);
 
@@ -2085,7 +2085,7 @@ handle_relocs_rel (Ebl *ebl, GElf_Ehdr *ehdr, Elf_Scn *scn, GElf_Shdr *shdr)
 			   information.  */
 			? ebl_reloc_type_name (ebl, GELF_R_TYPE (rel->r_info),
 					       buf, sizeof (buf)) + 2
-			: gettext ("<INVALID RELOC>"),
+			: _("<INVALID RELOC>"),
 			class == ELFCLASS32 ? 10 : 18, "",
 			elf_strptr (ebl->elf, shstrndx, destshdr->sh_name));
 	      else
@@ -2096,8 +2096,8 @@ handle_relocs_rel (Ebl *ebl, GElf_Ehdr *ehdr, Elf_Scn *scn, GElf_Shdr *shdr)
 			   information.  */
 			? ebl_reloc_type_name (ebl, GELF_R_TYPE (rel->r_info),
 					       buf, sizeof (buf)) + 2
-			: gettext ("<INVALID RELOC>"),
-			gettext ("INVALID SYMBOL"),
+			: _("<INVALID RELOC>"),
+			_("INVALID SYMBOL"),
 			(long int) GELF_R_SYM (rel->r_info));
 	    }
 	  else if (GELF_ST_TYPE (sym->st_info) != STT_SECTION)
@@ -2109,7 +2109,7 @@ handle_relocs_rel (Ebl *ebl, GElf_Ehdr *ehdr, Elf_Scn *scn, GElf_Shdr *shdr)
 		       information.  */
 		    ? ebl_reloc_type_name (ebl, GELF_R_TYPE (rel->r_info),
 					   buf, sizeof (buf)) + 2
-		    : gettext ("<INVALID RELOC>"),
+		    : _("<INVALID RELOC>"),
 		    class == ELFCLASS32 ? 10 : 18, sym->st_value,
 		    elf_strptr (ebl->elf, symshdr->sh_link, sym->st_name));
 	  else
@@ -2130,8 +2130,8 @@ handle_relocs_rel (Ebl *ebl, GElf_Ehdr *ehdr, Elf_Scn *scn, GElf_Shdr *shdr)
 			   information.  */
 			? ebl_reloc_type_name (ebl, GELF_R_TYPE (rel->r_info),
 					       buf, sizeof (buf)) + 2
-			: gettext ("<INVALID RELOC>"),
-			gettext ("INVALID SECTION"),
+			: _("<INVALID RELOC>"),
+			_("INVALID SECTION"),
 			(long int) (sym->st_shndx == SHN_XINDEX
 				    ? xndx : sym->st_shndx));
 	      else
@@ -2142,7 +2142,7 @@ handle_relocs_rel (Ebl *ebl, GElf_Ehdr *ehdr, Elf_Scn *scn, GElf_Shdr *shdr)
 			   information.  */
 			? ebl_reloc_type_name (ebl, GELF_R_TYPE (rel->r_info),
 					       buf, sizeof (buf)) + 2
-			: gettext ("<INVALID RELOC>"),
+			: _("<INVALID RELOC>"),
 			class == ELFCLASS32 ? 10 : 18, sym->st_value,
 			elf_strptr (ebl->elf, shstrndx, secshdr->sh_name));
 	    }
@@ -2177,7 +2177,7 @@ handle_relocs_rela (Ebl *ebl, GElf_Ehdr *ehdr, Elf_Scn *scn, GElf_Shdr *shdr)
 
   if (unlikely (symshdr == NULL || symdata == NULL || destshdr == NULL))
     {
-      printf (gettext ("\nInvalid symbol table at offset %#0" PRIx64 "\n"),
+      printf (_("\nInvalid symbol table at offset %#0" PRIx64 "\n"),
 	      shdr->sh_offset);
       return;
     }
@@ -2192,7 +2192,7 @@ handle_relocs_rela (Ebl *ebl, GElf_Ehdr *ehdr, Elf_Scn *scn, GElf_Shdr *shdr)
   size_t shstrndx;
   if (unlikely (elf_getshdrstrndx (ebl->elf, &shstrndx) < 0))
     error (EXIT_FAILURE, 0,
-	   gettext ("cannot get section header string table index"));
+	   _("cannot get section header string table index"));
 
   if (shdr->sh_info != 0)
     printf (ngettext ("\
@@ -2220,9 +2220,9 @@ handle_relocs_rela (Ebl *ebl, GElf_Ehdr *ehdr, Elf_Scn *scn, GElf_Shdr *shdr)
 	    shdr->sh_offset,
 	    nentries);
   fputs_unlocked (class == ELFCLASS32
-		  ? gettext ("\
+		  ? _("\
   Offset      Type            Value       Addend Name\n")
-		  : gettext ("\
+		  : _("\
   Offset              Type            Value               Addend Name\n"),
 		  stdout);
 
@@ -2276,7 +2276,7 @@ handle_relocs_rela (Ebl *ebl, GElf_Ehdr *ehdr, Elf_Scn *scn, GElf_Shdr *shdr)
 			   information.  */
 			? ebl_reloc_type_name (ebl, GELF_R_TYPE (rel->r_info),
 					       buf, sizeof (buf)) + 2
-			: gettext ("<INVALID RELOC>"),
+			: _("<INVALID RELOC>"),
 			class == ELFCLASS32 ? 10 : 18, "",
 			rel->r_addend,
 			elf_strptr (ebl->elf, shstrndx, destshdr->sh_name));
@@ -2288,8 +2288,8 @@ handle_relocs_rela (Ebl *ebl, GElf_Ehdr *ehdr, Elf_Scn *scn, GElf_Shdr *shdr)
 			   information.  */
 			? ebl_reloc_type_name (ebl, GELF_R_TYPE (rel->r_info),
 					       buf, sizeof (buf)) + 2
-			: gettext ("<INVALID RELOC>"),
-			gettext ("INVALID SYMBOL"),
+			: _("<INVALID RELOC>"),
+			_("INVALID SYMBOL"),
 			(long int) GELF_R_SYM (rel->r_info));
 	    }
 	  else if (GELF_ST_TYPE (sym->st_info) != STT_SECTION)
@@ -2302,7 +2302,7 @@ handle_relocs_rela (Ebl *ebl, GElf_Ehdr *ehdr, Elf_Scn *scn, GElf_Shdr *shdr)
 		       information.  */
 		    ? ebl_reloc_type_name (ebl, GELF_R_TYPE (rel->r_info),
 					   buf, sizeof (buf)) + 2
-		    : gettext ("<INVALID RELOC>"),
+		    : _("<INVALID RELOC>"),
 		    class == ELFCLASS32 ? 10 : 18, sym->st_value,
 		    rel->r_addend,
 		    elf_strptr (ebl->elf, symshdr->sh_link, sym->st_name));
@@ -2324,8 +2324,8 @@ handle_relocs_rela (Ebl *ebl, GElf_Ehdr *ehdr, Elf_Scn *scn, GElf_Shdr *shdr)
 			   information.  */
 			? ebl_reloc_type_name (ebl, GELF_R_TYPE (rel->r_info),
 					       buf, sizeof (buf)) + 2
-			: gettext ("<INVALID RELOC>"),
-			gettext ("INVALID SECTION"),
+			: _("<INVALID RELOC>"),
+			_("INVALID SECTION"),
 			(long int) (sym->st_shndx == SHN_XINDEX
 				    ? xndx : sym->st_shndx));
 	      else
@@ -2337,7 +2337,7 @@ handle_relocs_rela (Ebl *ebl, GElf_Ehdr *ehdr, Elf_Scn *scn, GElf_Shdr *shdr)
 			   information.  */
 			? ebl_reloc_type_name (ebl, GELF_R_TYPE (rel->r_info),
 					       buf, sizeof (buf)) + 2
-			: gettext ("<INVALID RELOC>"),
+			: _("<INVALID RELOC>"),
 			class == ELFCLASS32 ? 10 : 18, sym->st_value,
 			rel->r_addend,
 			elf_strptr (ebl->elf, shstrndx, secshdr->sh_name));
@@ -2370,7 +2370,7 @@ print_symtab (Ebl *ebl, int type)
 	      const char *sname;
 	      if (unlikely (elf_getshdrstrndx (ebl->elf, &shstrndx) < 0))
 		error (EXIT_FAILURE, 0,
-		       gettext ("cannot get section header string table index"));
+		       _("cannot get section header string table index"));
 	      sname = elf_strptr (ebl->elf, shstrndx, shdr->sh_name);
 	      if (sname == NULL || strcmp (sname, symbol_table_section) != 0)
 		continue;
@@ -2380,12 +2380,12 @@ print_symtab (Ebl *ebl, int type)
 	    {
 	      if (elf_compress (scn, 0, 0) < 0)
 		printf ("WARNING: %s [%zd]\n",
-			gettext ("Couldn't uncompress section"),
+			_("Couldn't uncompress section"),
 			elf_ndxscn (scn));
 	      shdr = gelf_getshdr (scn, &shdr_mem);
 	      if (unlikely (shdr == NULL))
 		error (EXIT_FAILURE, 0,
-		       gettext ("cannot get section [%zd] header: %s"),
+		       _("cannot get section [%zd] header: %s"),
 		       elf_ndxscn (scn), elf_errmsg (-1));
 	    }
 	  handle_symtab (ebl, scn, shdr);
@@ -2446,13 +2446,13 @@ handle_symtab (Ebl *ebl, Elf_Scn *scn, GElf_Shdr *shdr)
   size_t shstrndx;
   if (unlikely (elf_getshdrstrndx (ebl->elf, &shstrndx) < 0))
     error (EXIT_FAILURE, 0,
-	   gettext ("cannot get section header string table index"));
+	   _("cannot get section header string table index"));
 
   GElf_Shdr glink_mem;
   GElf_Shdr *glink = gelf_getshdr (elf_getscn (ebl->elf, shdr->sh_link),
 				   &glink_mem);
   if (glink == NULL)
-    error (EXIT_FAILURE, 0, gettext ("invalid sh_link value in section %zu"),
+    error (EXIT_FAILURE, 0, _("invalid sh_link value in section %zu"),
 	   elf_ndxscn (scn));
 
   /* Now we can compute the number of entries in the section.  */
@@ -2473,9 +2473,9 @@ handle_symtab (Ebl *ebl, Elf_Scn *scn, GElf_Shdr *shdr)
 	  elf_strptr (ebl->elf, shstrndx, glink->sh_name));
 
   fputs_unlocked (class == ELFCLASS32
-		  ? gettext ("\
+		  ? _("\
   Num:    Value   Size Type    Bind   Vis          Ndx Name\n")
-		  : gettext ("\
+		  : _("\
   Num:            Value   Size Type    Bind   Vis          Ndx Name\n"),
 		  stdout);
 
@@ -2495,7 +2495,7 @@ handle_symtab (Ebl *ebl, Elf_Scn *scn, GElf_Shdr *shdr)
       if (likely (sym->st_shndx != SHN_XINDEX))
 	xndx = sym->st_shndx;
 
-      printf (gettext ("\
+      printf (_("\
 %5u: %0*" PRIx64 " %6" PRId64 " %-7s %-6s %-9s %6s %s"),
 	      cnt,
 	      class == ELFCLASS32 ? 8 : 16,
@@ -2583,7 +2583,7 @@ handle_symtab (Ebl *ebl, Elf_Scn *scn, GElf_Shdr *shdr)
 		      check_def = 0;
 		    }
 		  else if (unlikely (! is_nobits))
-		    error (0, 0, gettext ("bad dynamic symbol"));
+		    error (0, 0, _("bad dynamic symbol"));
 		  else
 		    check_def = 1;
 		}
@@ -2665,7 +2665,7 @@ get_ver_flags (unsigned int flags)
   char *endp;
 
   if (flags == 0)
-    return gettext ("none");
+    return _("none");
 
   if (flags & VER_FLG_BASE)
     endp = stpcpy (buf, "BASE ");
@@ -2682,7 +2682,7 @@ get_ver_flags (unsigned int flags)
 
   if (unlikely (flags & ~(VER_FLG_BASE | VER_FLG_WEAK)))
     {
-      strncpy (endp, gettext ("| <unknown>"), buf + sizeof (buf) - endp);
+      strncpy (endp, _("| <unknown>"), buf + sizeof (buf) - endp);
       buf[sizeof (buf) - 1] = '\0';
     }
 
@@ -2704,13 +2704,13 @@ handle_verneed (Ebl *ebl, Elf_Scn *scn, GElf_Shdr *shdr)
   size_t shstrndx;
   if (unlikely (elf_getshdrstrndx (ebl->elf, &shstrndx) < 0))
     error (EXIT_FAILURE, 0,
-	   gettext ("cannot get section header string table index"));
+	   _("cannot get section header string table index"));
 
   GElf_Shdr glink_mem;
   GElf_Shdr *glink = gelf_getshdr (elf_getscn (ebl->elf, shdr->sh_link),
 				   &glink_mem);
   if (glink == NULL)
-    error (EXIT_FAILURE, 0, gettext ("invalid sh_link value in section %zu"),
+    error (EXIT_FAILURE, 0, _("invalid sh_link value in section %zu"),
 	   elf_ndxscn (scn));
 
   printf (ngettext ("\
@@ -2734,7 +2734,7 @@ handle_verneed (Ebl *ebl, Elf_Scn *scn, GElf_Shdr *shdr)
       if (unlikely (need == NULL))
 	break;
 
-      printf (gettext ("  %#06x: Version: %hu  File: %s  Cnt: %hu\n"),
+      printf (_("  %#06x: Version: %hu  File: %s  Cnt: %hu\n"),
 	      offset, (unsigned short int) need->vn_version,
 	      elf_strptr (ebl->elf, shdr->sh_link, need->vn_file),
 	      (unsigned short int) need->vn_cnt);
@@ -2747,7 +2747,7 @@ handle_verneed (Ebl *ebl, Elf_Scn *scn, GElf_Shdr *shdr)
 	  if (unlikely (aux == NULL))
 	    break;
 
-	  printf (gettext ("  %#06x: Name: %s  Flags: %s  Version: %hu\n"),
+	  printf (_("  %#06x: Name: %s  Flags: %s  Version: %hu\n"),
 		  auxoffset,
 		  elf_strptr (ebl->elf, shdr->sh_link, aux->vna_name),
 		  get_ver_flags (aux->vna_flags),
@@ -2780,13 +2780,13 @@ handle_verdef (Ebl *ebl, Elf_Scn *scn, GElf_Shdr *shdr)
   size_t shstrndx;
   if (unlikely (elf_getshdrstrndx (ebl->elf, &shstrndx) < 0))
     error (EXIT_FAILURE, 0,
-	   gettext ("cannot get section header string table index"));
+	   _("cannot get section header string table index"));
 
   GElf_Shdr glink_mem;
   GElf_Shdr *glink = gelf_getshdr (elf_getscn (ebl->elf, shdr->sh_link),
 				   &glink_mem);
   if (glink == NULL)
-    error (EXIT_FAILURE, 0, gettext ("invalid sh_link value in section %zu"),
+    error (EXIT_FAILURE, 0, _("invalid sh_link value in section %zu"),
 	   elf_ndxscn (scn));
 
   int class = gelf_getclass (ebl->elf);
@@ -2818,7 +2818,7 @@ handle_verdef (Ebl *ebl, Elf_Scn *scn, GElf_Shdr *shdr)
       if (unlikely (aux == NULL))
 	break;
 
-      printf (gettext ("\
+      printf (_("\
   %#06x: Version: %hd  Flags: %s  Index: %hd  Cnt: %hd  Name: %s\n"),
 	      offset, def->vd_version,
 	      get_ver_flags (def->vd_flags),
@@ -2833,7 +2833,7 @@ handle_verdef (Ebl *ebl, Elf_Scn *scn, GElf_Shdr *shdr)
 	  if (unlikely (aux == NULL))
 	    break;
 
-	  printf (gettext ("  %#06x: Parent %d: %s\n"),
+	  printf (_("  %#06x: Parent %d: %s\n"),
 		  auxoffset, cnt2,
 		  elf_strptr (ebl->elf, shdr->sh_link, aux->vda_name));
 
@@ -2867,7 +2867,7 @@ handle_versym (Ebl *ebl, Elf_Scn *scn, GElf_Shdr *shdr)
   size_t shstrndx;
   if (unlikely (elf_getshdrstrndx (ebl->elf, &shstrndx) < 0))
     error (EXIT_FAILURE, 0,
-	   gettext ("cannot get section header string table index"));
+	   _("cannot get section header string table index"));
 
   /* We have to find the version definition section and extract the
      version names.  */
@@ -3090,7 +3090,7 @@ handle_versym (Ebl *ebl, Elf_Scn *scn, GElf_Shdr *shdr)
 				   &glink_mem);
   size_t sh_entsize = gelf_fsize (ebl->elf, ELF_T_HALF, 1, EV_CURRENT);
   if (glink == NULL)
-    error (EXIT_FAILURE, 0, gettext ("invalid sh_link value in section %zu"),
+    error (EXIT_FAILURE, 0, _("invalid sh_link value in section %zu"),
 	   elf_ndxscn (scn));
 
   /* Print the header.  */
@@ -3122,12 +3122,12 @@ handle_versym (Ebl *ebl, Elf_Scn *scn, GElf_Shdr *shdr)
 	{
 	  ssize_t n;
 	case 0:
-	  fputs_unlocked (gettext ("   0 *local*                     "),
+	  fputs_unlocked (_("   0 *local*                     "),
 			  stdout);
 	  break;
 
 	case 1:
-	  fputs_unlocked (gettext ("   1 *global*                    "),
+	  fputs_unlocked (_("   1 *global*                    "),
 			  stdout);
 	  break;
 
@@ -3164,7 +3164,7 @@ print_hash_info (Ebl *ebl, Elf_Scn *scn, GElf_Shdr *shdr, size_t shstrndx,
 				   &glink_mem);
   if (glink == NULL)
     {
-      error (0, 0, gettext ("invalid sh_link value in section %zu"),
+      error (0, 0, _("invalid sh_link value in section %zu"),
 	     elf_ndxscn (scn));
       return;
     }
@@ -3191,16 +3191,16 @@ print_hash_info (Ebl *ebl, Elf_Scn *scn, GElf_Shdr *shdr, size_t shstrndx,
       uint64_t success = 0;
 
       /* xgettext:no-c-format */
-      fputs_unlocked (gettext ("\
+      fputs_unlocked (_("\
  Length  Number  % of total  Coverage\n"), stdout);
-      printf (gettext ("      0  %6" PRIu32 "      %5.1f%%\n"),
+      printf (_("      0  %6" PRIu32 "      %5.1f%%\n"),
 	      counts[0], (counts[0] * 100.0) / nbucket);
 
       uint64_t nzero_counts = 0;
       for (Elf32_Word cnt = 1; cnt <= maxlength; ++cnt)
 	{
 	  nzero_counts += counts[cnt] * cnt;
-	  printf (gettext ("\
+	  printf (_("\
 %7d  %6" PRIu32 "      %5.1f%%    %5.1f%%\n"),
 		  (int) cnt, counts[cnt], (counts[cnt] * 100.0) / nbucket,
 		  (nzero_counts * 100.0) / nsyms);
@@ -3213,7 +3213,7 @@ print_hash_info (Ebl *ebl, Elf_Scn *scn, GElf_Shdr *shdr, size_t shstrndx,
 	  success += counts[cnt] * acc;
 	}
 
-      printf (gettext ("\
+      printf (_("\
  Average number of tests:   successful lookup: %f\n\
 			  unsuccessful lookup: %f\n"),
 	      (double) success / (double) nzero_counts,
@@ -3231,7 +3231,7 @@ handle_sysv_hash (Ebl *ebl, Elf_Scn *scn, GElf_Shdr *shdr, size_t shstrndx)
   Elf_Data *data = elf_getdata (scn, NULL);
   if (unlikely (data == NULL))
     {
-      error (0, 0, gettext ("cannot get data for section %d: %s"),
+      error (0, 0, _("cannot get data for section %d: %s"),
 	     (int) elf_ndxscn (scn), elf_errmsg (-1));
       return;
     }
@@ -3239,7 +3239,7 @@ handle_sysv_hash (Ebl *ebl, Elf_Scn *scn, GElf_Shdr *shdr, size_t shstrndx)
   if (unlikely (data->d_size < 2 * sizeof (Elf32_Word)))
     {
     invalid_data:
-      error (0, 0, gettext ("invalid data in sysv.hash section %d"),
+      error (0, 0, _("invalid data in sysv.hash section %d"),
 	     (int) elf_ndxscn (scn));
       return;
     }
@@ -3268,7 +3268,7 @@ handle_sysv_hash (Ebl *ebl, Elf_Scn *scn, GElf_Shdr *shdr, size_t shstrndx)
 	  ++chain_len;
 	  if (chain_len > nchain)
 	    {
-	      error (0, 0, gettext ("invalid chain in sysv.hash section %d"),
+	      error (0, 0, _("invalid chain in sysv.hash section %d"),
 		     (int) elf_ndxscn (scn));
 	      free (lengths);
 	      return;
@@ -3295,7 +3295,7 @@ handle_sysv_hash64 (Ebl *ebl, Elf_Scn *scn, GElf_Shdr *shdr, size_t shstrndx)
   Elf_Data *data = elf_getdata (scn, NULL);
   if (unlikely (data == NULL))
     {
-      error (0, 0, gettext ("cannot get data for section %d: %s"),
+      error (0, 0, _("cannot get data for section %d: %s"),
 	     (int) elf_ndxscn (scn), elf_errmsg (-1));
       return;
     }
@@ -3303,7 +3303,7 @@ handle_sysv_hash64 (Ebl *ebl, Elf_Scn *scn, GElf_Shdr *shdr, size_t shstrndx)
   if (unlikely (data->d_size < 2 * sizeof (Elf64_Xword)))
     {
     invalid_data:
-      error (0, 0, gettext ("invalid data in sysv.hash64 section %d"),
+      error (0, 0, _("invalid data in sysv.hash64 section %d"),
 	     (int) elf_ndxscn (scn));
       return;
     }
@@ -3334,7 +3334,7 @@ handle_sysv_hash64 (Ebl *ebl, Elf_Scn *scn, GElf_Shdr *shdr, size_t shstrndx)
 	  ++chain_len;
 	  if (chain_len > nchain)
 	    {
-	      error (0, 0, gettext ("invalid chain in sysv.hash64 section %d"),
+	      error (0, 0, _("invalid chain in sysv.hash64 section %d"),
 		     (int) elf_ndxscn (scn));
 	      free (lengths);
 	      return;
@@ -3361,7 +3361,7 @@ handle_gnu_hash (Ebl *ebl, Elf_Scn *scn, GElf_Shdr *shdr, size_t shstrndx)
   Elf_Data *data = elf_getdata (scn, NULL);
   if (unlikely (data == NULL))
     {
-      error (0, 0, gettext ("cannot get data for section %d: %s"),
+      error (0, 0, _("cannot get data for section %d: %s"),
 	     (int) elf_ndxscn (scn), elf_errmsg (-1));
       return;
     }
@@ -3370,7 +3370,7 @@ handle_gnu_hash (Ebl *ebl, Elf_Scn *scn, GElf_Shdr *shdr, size_t shstrndx)
     {
     invalid_data:
       free (lengths);
-      error (0, 0, gettext ("invalid data in gnu.hash section %d"),
+      error (0, 0, _("invalid data in gnu.hash section %d"),
 	     (int) elf_ndxscn (scn));
       return;
     }
@@ -3437,7 +3437,7 @@ handle_gnu_hash (Ebl *ebl, Elf_Scn *scn, GElf_Shdr *shdr, size_t shstrndx)
     }
 
   char *str;
-  if (unlikely (asprintf (&str, gettext ("\
+  if (unlikely (asprintf (&str, _("\
  Symbol Bias: %u\n\
  Bitmask Size: %zu bytes  %" PRIuFAST32 "%% bits set  2nd hash shift: %u\n"),
 			  (unsigned int) symbias,
@@ -3446,7 +3446,7 @@ handle_gnu_hash (Ebl *ebl, Elf_Scn *scn, GElf_Shdr *shdr, size_t shstrndx)
 			   / (uint_fast32_t) (bitmask_words
 					      * sizeof (Elf32_Word) * 8)),
 			  (unsigned int) shift) == -1))
-    error (EXIT_FAILURE, 0, gettext ("memory exhausted"));
+    error (EXIT_FAILURE, 0, _("memory exhausted"));
 
   print_hash_info (ebl, scn, shdr, shstrndx, maxlength, nbucket, nsyms,
 		   lengths, str);
@@ -3465,7 +3465,7 @@ handle_hash (Ebl *ebl)
   size_t shstrndx;
   if (unlikely (elf_getshdrstrndx (ebl->elf, &shstrndx) < 0))
     error (EXIT_FAILURE, 0,
-	   gettext ("cannot get section header string table index"));
+	   _("cannot get section header string table index"));
 
   Elf_Scn *scn = NULL;
   while ((scn = elf_nextscn (ebl->elf, scn)) != NULL)
@@ -3481,12 +3481,12 @@ handle_hash (Ebl *ebl)
 	    {
 	      if (elf_compress (scn, 0, 0) < 0)
 		printf ("WARNING: %s [%zd]\n",
-			gettext ("Couldn't uncompress section"),
+			_("Couldn't uncompress section"),
 			elf_ndxscn (scn));
 	      shdr = gelf_getshdr (scn, &shdr_mem);
 	      if (unlikely (shdr == NULL))
 		error (EXIT_FAILURE, 0,
-		       gettext ("cannot get section [%zd] header: %s"),
+		       _("cannot get section [%zd] header: %s"),
 		       elf_ndxscn (scn), elf_errmsg (-1));
 	    }
 
@@ -3515,7 +3515,7 @@ print_liblist (Ebl *ebl)
   size_t shstrndx;
   if (unlikely (elf_getshdrstrndx (ebl->elf, &shstrndx) < 0))
     error (EXIT_FAILURE, 0,
-	   gettext ("cannot get section header string table index"));
+	   _("cannot get section header string table index"));
 
   while ((scn = elf_nextscn (ebl->elf, scn)) != NULL)
     {
@@ -3540,7 +3540,7 @@ print_liblist (Ebl *ebl)
 	  if (data == NULL)
 	    return;
 
-	  puts (gettext ("\
+	  puts (_("\
        Library                       Time Stamp          Checksum Version Flags"));
 
 	  for (int cnt = 0; cnt < nentries; ++cnt)
@@ -3578,7 +3578,7 @@ print_attributes (Ebl *ebl, const GElf_Ehdr *ehdr)
   size_t shstrndx;
   if (unlikely (elf_getshdrstrndx (ebl->elf, &shstrndx) < 0))
     error (EXIT_FAILURE, 0,
-	   gettext ("cannot get section header string table index"));
+	   _("cannot get section header string table index"));
 
   while ((scn = elf_nextscn (ebl->elf, scn)) != NULL)
     {
@@ -3592,7 +3592,7 @@ print_attributes (Ebl *ebl, const GElf_Ehdr *ehdr)
 			       || ehdr->e_machine != EM_CSKY)))
 	continue;
 
-      printf (gettext ("\
+      printf (_("\
 \nObject attributes section [%2zu] '%s' of %" PRIu64
 		       " bytes at offset %#0" PRIx64 ":\n"),
 	      elf_ndxscn (scn),
@@ -3609,7 +3609,7 @@ print_attributes (Ebl *ebl, const GElf_Ehdr *ehdr)
       if (unlikely (*p++ != 'A'))
 	return;
 
-      fputs_unlocked (gettext ("  Owner          Size\n"), stdout);
+      fputs_unlocked (_("  Owner          Size\n"), stdout);
 
       inline size_t left (void)
       {
@@ -3638,7 +3638,7 @@ print_attributes (Ebl *ebl, const GElf_Ehdr *ehdr)
 	    break;
 	  ++q;
 
-	  printf (gettext ("  %-13s  %4" PRIu32 "\n"), name, len);
+	  printf (_("  %-13s  %4" PRIu32 "\n"), name, len);
 
 	  bool gnu_vendor = (q - name == sizeof "gnu"
 			     && !memcmp (name, "gnu", sizeof "gnu"));
@@ -3677,12 +3677,12 @@ print_attributes (Ebl *ebl, const GElf_Ehdr *ehdr)
 		  {
 		  default:
 		    /* Unknown subsection, print and skip.  */
-		    printf (gettext ("    %-4u %12" PRIu32 "\n"),
+		    printf (_("    %-4u %12" PRIu32 "\n"),
 			    subsection_tag, subsection_len);
 		    break;
 
 		  case 1:	/* Tag_File */
-		    printf (gettext ("    File: %11" PRIu32 "\n"),
+		    printf (_("    File: %11" PRIu32 "\n"),
 			    subsection_len);
 
 		    while (r < q)
@@ -3731,13 +3731,13 @@ print_attributes (Ebl *ebl, const GElf_Ehdr *ehdr)
 			if (tag_name != NULL)
 			  {
 			    if (tag == 32)
-			      printf (gettext ("      %s: %" PRId64 ", %s\n"),
+			      printf (_("      %s: %" PRId64 ", %s\n"),
 				      tag_name, value, string);
 			    else if (string == NULL && value_name == NULL)
-			      printf (gettext ("      %s: %" PRId64 "\n"),
+			      printf (_("      %s: %" PRId64 "\n"),
 				      tag_name, value);
 			    else
-			      printf (gettext ("      %s: %s\n"),
+			      printf (_("      %s: %s\n"),
 				      tag_name, string ?: value_name);
 			  }
 			else
@@ -3747,10 +3747,10 @@ print_attributes (Ebl *ebl, const GElf_Ehdr *ehdr)
 			    assert (tag != 32
 				    || strcmp ((const char *) name, "gnu"));
 			    if (string == NULL)
-			      printf (gettext ("      %u: %" PRId64 "\n"),
+			      printf (_("      %u: %" PRId64 "\n"),
 				      tag, value);
 			    else
-			      printf (gettext ("      %u: %s\n"),
+			      printf (_("      %u: %s\n"),
 				      tag, string);
 			  }
 		      }
@@ -4783,7 +4783,7 @@ print_ops (Dwfl_Module *dwflmod, Dwarf *dbg, int indent, int indentrest,
       continue;
 
     invalid:
-      printf (gettext ("%*s[%2" PRIuMAX "] %s  <TRUNCATED>\n"),
+      printf (_("%*s[%2" PRIuMAX "] %s  <TRUNCATED>\n"),
 	      indent, "", (uintmax_t) offset, op_name);
       break;
     }
@@ -4847,28 +4847,28 @@ compare_listptr (const void *a, const void *b, void *arg)
 	{
 	  p1->warned = p2->warned = true;
 	  error (0, 0,
-		 gettext ("%s %#" PRIx64 " used with different address sizes"),
+		 _("%s %#" PRIx64 " used with different address sizes"),
 		 name, (uint64_t) p1->offset);
 	}
       if (p1->dwarf64 != p2->dwarf64)
 	{
 	  p1->warned = p2->warned = true;
 	  error (0, 0,
-		 gettext ("%s %#" PRIx64 " used with different offset sizes"),
+		 _("%s %#" PRIx64 " used with different offset sizes"),
 		 name, (uint64_t) p1->offset);
 	}
       if (listptr_base (p1) != listptr_base (p2))
 	{
 	  p1->warned = p2->warned = true;
 	  error (0, 0,
-		 gettext ("%s %#" PRIx64 " used with different base addresses"),
+		 _("%s %#" PRIx64 " used with different base addresses"),
 		 name, (uint64_t) p1->offset);
 	}
       if (p1->attr != p2 ->attr)
 	{
 	  p1->warned = p2->warned = true;
 	  error (0, 0,
-		 gettext ("%s %#" PRIx64
+		 _("%s %#" PRIx64
 			  " used with different attribute %s and %s"),
 		 name, (uint64_t) p1->offset, dwarf_attr_name (p2->attr),
 		 dwarf_attr_name (p2->attr));
@@ -4965,7 +4965,7 @@ skip_listptr_hole (struct listptr_table *table, size_t *idxp,
       || p->offset >= (Dwarf_Off) (endp - *readp + offset))
     {
       *readp = endp;
-      printf (gettext (" [%6tx]  <UNUSED GARBAGE IN REST OF SECTION>\n"),
+      printf (_(" [%6tx]  <UNUSED GARBAGE IN REST OF SECTION>\n"),
 	      offset);
       return true;
     }
@@ -4973,7 +4973,7 @@ skip_listptr_hole (struct listptr_table *table, size_t *idxp,
   if (p->offset != (Dwarf_Off) offset)
     {
       *readp += p->offset - offset;
-      printf (gettext (" [%6tx]  <UNUSED GARBAGE> ... %" PRIu64 " bytes ...\n"),
+      printf (_(" [%6tx]  <UNUSED GARBAGE> ... %" PRIu64 " bytes ...\n"),
 	      offset, (Dwarf_Off) p->offset - offset);
       return true;
     }
@@ -5076,7 +5076,7 @@ print_debug_abbrev_section (Dwfl_Module *dwflmod __attribute__ ((unused)),
   const size_t sh_size = (dbg->sectiondata[IDX_debug_abbrev] ?
 			  dbg->sectiondata[IDX_debug_abbrev]->d_size : 0);
 
-  printf (gettext ("\nDWARF section [%2zu] '%s' at offset %#" PRIx64 ":\n"
+  printf (_("\nDWARF section [%2zu] '%s' at offset %#" PRIx64 ":\n"
 		   " [ Code]\n"),
 	  elf_ndxscn (scn), section_name (ebl, shdr),
 	  (uint64_t) shdr->sh_offset);
@@ -5084,7 +5084,7 @@ print_debug_abbrev_section (Dwfl_Module *dwflmod __attribute__ ((unused)),
   Dwarf_Off offset = 0;
   while (offset < sh_size)
     {
-      printf (gettext ("\nAbbreviation section at offset %" PRIu64 ":\n"),
+      printf (_("\nAbbreviation section at offset %" PRIu64 ":\n"),
 	      offset);
 
       while (1)
@@ -5097,7 +5097,7 @@ print_debug_abbrev_section (Dwfl_Module *dwflmod __attribute__ ((unused)),
 	    {
 	      if (unlikely (res < 0))
 		{
-		  printf (gettext ("\
+		  printf (_("\
  *** error while reading abbreviation: %s\n"),
 			  dwarf_errmsg (-1));
 		  return;
@@ -5113,7 +5113,7 @@ print_debug_abbrev_section (Dwfl_Module *dwflmod __attribute__ ((unused)),
 	  unsigned int tag = dwarf_getabbrevtag (&abbrev);
 	  int has_children = dwarf_abbrevhaschildren (&abbrev);
 
-	  printf (gettext (" [%5u] offset: %" PRId64
+	  printf (_(" [%5u] offset: %" PRId64
 			   ", children: %s, tag: %s\n"),
 		  code, (int64_t) offset,
 		  has_children ? yes_str : no_str,
@@ -5146,7 +5146,7 @@ print_debug_addr_section (Dwfl_Module *dwflmod __attribute__ ((unused)),
 			  Ebl *ebl, GElf_Ehdr *ehdr,
 			  Elf_Scn *scn, GElf_Shdr *shdr, Dwarf *dbg)
 {
-  printf (gettext ("\
+  printf (_("\
 \nDWARF section [%2zu] '%s' at offset %#" PRIx64 ":\n"),
 	  elf_ndxscn (scn), section_name (ebl, shdr),
 	  (uint64_t) shdr->sh_offset);
@@ -5159,7 +5159,7 @@ print_debug_addr_section (Dwfl_Module *dwflmod __attribute__ ((unused)),
 		    ?: elf_rawdata (scn, NULL));
   if (unlikely (data == NULL))
     {
-      error (0, 0, gettext ("cannot get .debug_addr section data: %s"),
+      error (0, 0, _("cannot get .debug_addr section data: %s"),
 	     elf_errmsg (-1));
       return;
     }
@@ -5259,12 +5259,12 @@ print_debug_addr_section (Dwfl_Module *dwflmod __attribute__ ((unused)),
 
 	      /* Pretend we have a header.  */
 	      printf ("\n");
-	      printf (gettext (" Length:         %8" PRIu64 "\n"),
+	      printf (_(" Length:         %8" PRIu64 "\n"),
 		      unit_length);
-	      printf (gettext (" DWARF version:  %8" PRIu16 "\n"), version);
-	      printf (gettext (" Address size:   %8" PRIu64 "\n"),
+	      printf (_(" DWARF version:  %8" PRIu16 "\n"), version);
+	      printf (_(" Address size:   %8" PRIu64 "\n"),
 		      (uint64_t) address_size);
-	      printf (gettext (" Segment size:   %8" PRIu64 "\n"),
+	      printf (_(" Segment size:   %8" PRIu64 "\n"),
 		      (uint64_t) segment_size);
 	      printf ("\n");
 	    }
@@ -5283,7 +5283,7 @@ print_debug_addr_section (Dwfl_Module *dwflmod __attribute__ ((unused)),
 		  unit_length = read_8ubyte_unaligned_inc (dbg, readp);
 		}
 	      printf ("\n");
-	      printf (gettext (" Length:         %8" PRIu64 "\n"),
+	      printf (_(" Length:         %8" PRIu64 "\n"),
 		      unit_length);
 
 	      /* We need at least 2-bytes (version) + 1-byte
@@ -5298,32 +5298,32 @@ print_debug_addr_section (Dwfl_Module *dwflmod __attribute__ ((unused)),
 	      next_unitp = readp + unit_length;
 
 	      version = read_2ubyte_unaligned_inc (dbg, readp);
-	      printf (gettext (" DWARF version:  %8" PRIu16 "\n"), version);
+	      printf (_(" DWARF version:  %8" PRIu16 "\n"), version);
 
 	      if (version != 5)
 		{
-		  error (0, 0, gettext ("Unknown version"));
+		  error (0, 0, _("Unknown version"));
 		  goto next_unit;
 		}
 
 	      address_size = *readp++;
-	      printf (gettext (" Address size:   %8" PRIu64 "\n"),
+	      printf (_(" Address size:   %8" PRIu64 "\n"),
 		      (uint64_t) address_size);
 
 	      if (address_size != 4 && address_size != 8)
 		{
-		  error (0, 0, gettext ("unsupported address size"));
+		  error (0, 0, _("unsupported address size"));
 		  goto next_unit;
 		}
 
 	      segment_size = *readp++;
-	      printf (gettext (" Segment size:   %8" PRIu64 "\n"),
+	      printf (_(" Segment size:   %8" PRIu64 "\n"),
 		      (uint64_t) segment_size);
 	      printf ("\n");
 
 	      if (segment_size != 0)
 		{
-		  error (0, 0, gettext ("unsupported segment size"));
+		  error (0, 0, _("unsupported segment size"));
 		  goto next_unit;
 		}
 
@@ -5376,7 +5376,7 @@ print_decoded_aranges_section (Ebl *ebl, GElf_Ehdr *ehdr, Elf_Scn *scn,
   size_t cnt;
   if (unlikely (dwarf_getaranges (dbg, &aranges, &cnt) != 0))
     {
-      error (0, 0, gettext ("cannot get .debug_aranges content: %s"),
+      error (0, 0, _("cannot get .debug_aranges content: %s"),
 	     dwarf_errmsg (-1));
       return;
     }
@@ -5386,7 +5386,7 @@ print_decoded_aranges_section (Ebl *ebl, GElf_Ehdr *ehdr, Elf_Scn *scn,
   glink = gelf_getshdr (elf_getscn (ebl->elf, shdr->sh_link), &glink_mem);
   if (glink == NULL)
     {
-      error (0, 0, gettext ("invalid sh_link value in section %zu"),
+      error (0, 0, _("invalid sh_link value in section %zu"),
 	     elf_ndxscn (scn));
       return;
     }
@@ -5422,9 +5422,9 @@ print_decoded_aranges_section (Ebl *ebl, GElf_Ehdr *ehdr, Elf_Scn *scn,
       Dwarf_Off offset;
 
       if (unlikely (dwarf_getarangeinfo (runp, &start, &length, &offset) != 0))
-	printf (gettext (" [%*zu] ???\n"), digits, n);
+	printf (_(" [%*zu] ???\n"), digits, n);
       else
-	printf (gettext (" [%*zu] start: %0#*" PRIx64
+	printf (_(" [%*zu] start: %0#*" PRIx64
 			 ", length: %5" PRIu64 ", CU DIE offset: %6"
 			 PRId64 "\n"),
 		digits, n, ehdr->e_ident[EI_CLASS] == ELFCLASS32 ? 10 : 18,
@@ -5450,12 +5450,12 @@ print_debug_aranges_section (Dwfl_Module *dwflmod __attribute__ ((unused)),
 
   if (unlikely (data == NULL))
     {
-      error (0, 0, gettext ("cannot get .debug_aranges content: %s"),
+      error (0, 0, _("cannot get .debug_aranges content: %s"),
 	     elf_errmsg (-1));
       return;
     }
 
-  printf (gettext ("\
+  printf (_("\
 \nDWARF section [%2zu] '%s' at offset %#" PRIx64 ":\n"),
 	  elf_ndxscn (scn), section_name (ebl, shdr),
 	  (uint64_t) shdr->sh_offset);
@@ -5468,11 +5468,11 @@ print_debug_aranges_section (Dwfl_Module *dwflmod __attribute__ ((unused)),
       const unsigned char *hdrstart = readp;
       size_t start_offset = hdrstart - (const unsigned char *) data->d_buf;
 
-      printf (gettext ("\nTable at offset %zu:\n"), start_offset);
+      printf (_("\nTable at offset %zu:\n"), start_offset);
       if (readp + 4 > readendp)
 	{
 	invalid_data:
-	  error (0, 0, gettext ("invalid data in section [%zu] '%s'"),
+	  error (0, 0, _("invalid data in section [%zu] '%s'"),
 		 elf_ndxscn (scn), section_name (ebl, shdr));
 	  return;
 	}
@@ -5488,7 +5488,7 @@ print_debug_aranges_section (Dwfl_Module *dwflmod __attribute__ ((unused)),
 	}
 
       const unsigned char *nexthdr = readp + length;
-      printf (gettext ("\n Length:        %6" PRIu64 "\n"),
+      printf (_("\n Length:        %6" PRIu64 "\n"),
 	      (uint64_t) length);
 
       if (unlikely (length > (size_t) (readendp - readp)))
@@ -5500,11 +5500,11 @@ print_debug_aranges_section (Dwfl_Module *dwflmod __attribute__ ((unused)),
       if (readp + 2 > readendp)
 	goto invalid_data;
       uint_fast16_t version = read_2ubyte_unaligned_inc (dbg, readp);
-      printf (gettext (" DWARF version: %6" PRIuFAST16 "\n"),
+      printf (_(" DWARF version: %6" PRIuFAST16 "\n"),
 	      version);
       if (version != 2)
 	{
-	  error (0, 0, gettext ("unsupported aranges version"));
+	  error (0, 0, _("unsupported aranges version"));
 	  goto next_table;
 	}
 
@@ -5515,28 +5515,28 @@ print_debug_aranges_section (Dwfl_Module *dwflmod __attribute__ ((unused)),
 	offset = read_8ubyte_unaligned_inc (dbg, readp);
       else
 	offset = read_4ubyte_unaligned_inc (dbg, readp);
-      printf (gettext (" CU offset:     %6" PRIx64 "\n"),
+      printf (_(" CU offset:     %6" PRIx64 "\n"),
 	      (uint64_t) offset);
 
       if (readp + 1 > readendp)
 	goto invalid_data;
       unsigned int address_size = *readp++;
-      printf (gettext (" Address size:  %6" PRIu64 "\n"),
+      printf (_(" Address size:  %6" PRIu64 "\n"),
 	      (uint64_t) address_size);
       if (address_size != 4 && address_size != 8)
 	{
-	  error (0, 0, gettext ("unsupported address size"));
+	  error (0, 0, _("unsupported address size"));
 	  goto next_table;
 	}
 
       if (readp + 1 > readendp)
 	goto invalid_data;
       unsigned int segment_size = *readp++;
-      printf (gettext (" Segment size:  %6" PRIu64 "\n\n"),
+      printf (_(" Segment size:  %6" PRIu64 "\n\n"),
 	      (uint64_t) segment_size);
       if (segment_size != 0 && segment_size != 4 && segment_size != 8)
 	{
-	  error (0, 0, gettext ("unsupported segment size"));
+	  error (0, 0, _("unsupported segment size"));
 	  goto next_table;
 	}
 
@@ -5587,7 +5587,7 @@ print_debug_aranges_section (Dwfl_Module *dwflmod __attribute__ ((unused)),
       if (readp != nexthdr)
 	{
 	  size_t padding = nexthdr - readp;
-	  printf (gettext ("   %zu padding bytes\n"), padding);
+	  printf (_("   %zu padding bytes\n"), padding);
 	  readp = nexthdr;
 	}
     }
@@ -5622,7 +5622,7 @@ print_debug_rnglists_section (Dwfl_Module *dwflmod,
 			      Elf_Scn *scn, GElf_Shdr *shdr,
 			      Dwarf *dbg __attribute__((unused)))
 {
-  printf (gettext ("\
+  printf (_("\
 \nDWARF section [%2zu] '%s' at offset %#" PRIx64 ":\n"),
 	  elf_ndxscn (scn), section_name (ebl, shdr),
 	  (uint64_t) shdr->sh_offset);
@@ -5631,7 +5631,7 @@ print_debug_rnglists_section (Dwfl_Module *dwflmod,
 		   ?: elf_rawdata (scn, NULL));
   if (unlikely (data == NULL))
     {
-      error (0, 0, gettext ("cannot get .debug_rnglists content: %s"),
+      error (0, 0, _("cannot get .debug_rnglists content: %s"),
 	     elf_errmsg (-1));
       return;
     }
@@ -5648,13 +5648,13 @@ print_debug_rnglists_section (Dwfl_Module *dwflmod,
       if (unlikely (readp > dataend - 4))
 	{
 	invalid_data:
-	  error (0, 0, gettext ("invalid data in section [%zu] '%s'"),
+	  error (0, 0, _("invalid data in section [%zu] '%s'"),
 		 elf_ndxscn (scn), section_name (ebl, shdr));
 	  return;
 	}
 
       ptrdiff_t offset = readp - (unsigned char *) data->d_buf;
-      printf (gettext ("Table at Offset 0x%" PRIx64 ":\n\n"),
+      printf (_("Table at Offset 0x%" PRIx64 ":\n\n"),
 	      (uint64_t) offset);
 
       uint64_t unit_length = read_4ubyte_unaligned_inc (dbg, readp);
@@ -5667,7 +5667,7 @@ print_debug_rnglists_section (Dwfl_Module *dwflmod,
 	  unit_length = read_8ubyte_unaligned_inc (dbg, readp);
 	  offset_size = 8;
 	}
-      printf (gettext (" Length:         %8" PRIu64 "\n"), unit_length);
+      printf (_(" Length:         %8" PRIu64 "\n"), unit_length);
 
       /* We need at least 2-bytes + 1-byte + 1-byte + 4-bytes = 8
 	 bytes to complete the header.  And this unit cannot go beyond
@@ -5680,36 +5680,36 @@ print_debug_rnglists_section (Dwfl_Module *dwflmod,
       const unsigned char *nexthdr = readp + unit_length;
 
       uint16_t version = read_2ubyte_unaligned_inc (dbg, readp);
-      printf (gettext (" DWARF version:  %8" PRIu16 "\n"), version);
+      printf (_(" DWARF version:  %8" PRIu16 "\n"), version);
 
       if (version != 5)
 	{
-	  error (0, 0, gettext ("Unknown version"));
+	  error (0, 0, _("Unknown version"));
 	  goto next_table;
 	}
 
       uint8_t address_size = *readp++;
-      printf (gettext (" Address size:   %8" PRIu64 "\n"),
+      printf (_(" Address size:   %8" PRIu64 "\n"),
 	      (uint64_t) address_size);
 
       if (address_size != 4 && address_size != 8)
 	{
-	  error (0, 0, gettext ("unsupported address size"));
+	  error (0, 0, _("unsupported address size"));
 	  goto next_table;
 	}
 
       uint8_t segment_size = *readp++;
-      printf (gettext (" Segment size:   %8" PRIu64 "\n"),
+      printf (_(" Segment size:   %8" PRIu64 "\n"),
 	      (uint64_t) segment_size);
 
       if (segment_size != 0 && segment_size != 4 && segment_size != 8)
         {
-          error (0, 0, gettext ("unsupported segment size"));
+          error (0, 0, _("unsupported segment size"));
           goto next_table;
         }
 
       uint32_t offset_entry_count = read_4ubyte_unaligned_inc (dbg, readp);
-      printf (gettext (" Offset entries: %8" PRIu64 "\n"),
+      printf (_(" Offset entries: %8" PRIu64 "\n"),
 	      (uint64_t) offset_entry_count);
 
       /* We need the CU that uses this unit to get the initial base address. */
@@ -5725,15 +5725,15 @@ print_debug_rnglists_section (Dwfl_Module *dwflmod,
 	  if (dwarf_cu_die (cu, &cudie,
 			    NULL, NULL, NULL, NULL,
 			    NULL, NULL) == NULL)
-	    printf (gettext (" Unknown CU base: "));
+	    printf (_(" Unknown CU base: "));
 	  else
-	    printf (gettext (" CU [%6" PRIx64 "] base: "),
+	    printf (_(" CU [%6" PRIx64 "] base: "),
 		    dwarf_dieoffset (&cudie));
 	  print_dwarf_addr (dwflmod, address_size, cu_base, cu_base);
 	  printf ("\n");
 	}
       else
-	printf (gettext (" Not associated with a CU.\n"));
+	printf (_(" Not associated with a CU.\n"));
 
       printf ("\n");
 
@@ -5744,11 +5744,11 @@ print_debug_rnglists_section (Dwfl_Module *dwflmod,
 	  if (offset_entry_count > max_entries)
 	    {
 	      error (0, 0,
-		     gettext ("too many offset entries for unit length"));
+		     _("too many offset entries for unit length"));
 	      offset_entry_count = max_entries;
 	    }
 
-	  printf (gettext ("  Offsets starting at 0x%" PRIx64 ":\n"),
+	  printf (_("  Offsets starting at 0x%" PRIx64 ":\n"),
 		  (uint64_t) (offset_array_start
 			      - (unsigned char *) data->d_buf));
 	  for (uint32_t idx = 0; idx < offset_entry_count; idx++)
@@ -5800,7 +5800,7 @@ print_debug_rnglists_section (Dwfl_Module *dwflmod,
 	      if ((uint64_t) (nexthdr - readp) < 1)
 		{
 		invalid_range:
-		  error (0, 0, gettext ("invalid range list data"));
+		  error (0, 0, _("invalid range list data"));
 		  goto next_table;
 		}
 	      get_uleb128 (op1, readp, nexthdr);
@@ -5985,7 +5985,7 @@ print_debug_rnglists_section (Dwfl_Module *dwflmod,
       if (readp != nexthdr)
 	{
           size_t padding = nexthdr - readp;
-          printf (gettext ("   %zu padding bytes\n\n"), padding);
+          printf (_("   %zu padding bytes\n\n"), padding);
 	  readp = nexthdr;
 	}
     }
@@ -6002,12 +6002,12 @@ print_debug_ranges_section (Dwfl_Module *dwflmod,
 		    ?: elf_rawdata (scn, NULL));
   if (unlikely (data == NULL))
     {
-      error (0, 0, gettext ("cannot get .debug_ranges content: %s"),
+      error (0, 0, _("cannot get .debug_ranges content: %s"),
 	     elf_errmsg (-1));
       return;
     }
 
-  printf (gettext ("\
+  printf (_("\
 \nDWARF section [%2zu] '%s' at offset %#" PRIx64 ":\n"),
 	  elf_ndxscn (scn), section_name (ebl, shdr),
 	  (uint64_t) shdr->sh_offset);
@@ -6038,9 +6038,9 @@ print_debug_ranges_section (Dwfl_Module *dwflmod,
 	  if (dwarf_cu_die (cu, &cudie,
 			    NULL, NULL, NULL, NULL,
 			    NULL, NULL) == NULL)
-	    printf (gettext ("\n Unknown CU base: "));
+	    printf (_("\n Unknown CU base: "));
 	  else
-	    printf (gettext ("\n CU [%6" PRIx64 "] base: "),
+	    printf (_("\n CU [%6" PRIx64 "] base: "),
 		    dwarf_dieoffset (&cudie));
 	  print_dwarf_addr (dwflmod, address_size, base, base);
 	  printf ("\n");
@@ -6049,7 +6049,7 @@ print_debug_ranges_section (Dwfl_Module *dwflmod,
 
       if (unlikely (data->d_size - offset < (size_t) address_size * 2))
 	{
-	  printf (gettext (" [%6tx]  <INVALID DATA>\n"), offset);
+	  printf (_(" [%6tx]  <INVALID DATA>\n"), offset);
 	  break;
 	}
 
@@ -6074,7 +6074,7 @@ print_debug_ranges_section (Dwfl_Module *dwflmod,
 	    printf (" [%6tx] ", offset);
 	  else
 	    printf ("          ");
-	  puts (gettext ("base address"));
+	  puts (_("base address"));
 	  printf ("          ");
 	  print_dwarf_addr (dwflmod, address_size, end, end);
 	  printf ("\n");
@@ -6084,7 +6084,7 @@ print_debug_ranges_section (Dwfl_Module *dwflmod,
       else if (begin == 0 && end == 0) /* End of list entry.  */
 	{
 	  if (first)
-	    printf (gettext (" [%6tx] empty list\n"), offset);
+	    printf (_(" [%6tx] empty list\n"), offset);
 	  first = true;
 	}
       else
@@ -6194,7 +6194,7 @@ read_encoded (unsigned int encoding, const unsigned char *readp,
     default:
     invalid:
       error (1, 0,
-	     gettext ("invalid encoding"));
+	     _("invalid encoding"));
     }
 
   return readp;
@@ -6339,7 +6339,7 @@ print_cfa_program (const unsigned char *readp, const unsigned char *const endp,
 	    if ((uint64_t) (endp - readp) < op1)
 	      {
 	    invalid:
-	        fputs (gettext ("         <INVALID DATA>\n"), stdout);
+	        fputs (_("         <INVALID DATA>\n"), stdout);
 		return;
 	      }
 	    print_ops (dwflmod, dbg, 10, 10, version, ptr_size, 0, NULL,
@@ -6595,7 +6595,7 @@ print_debug_frame_section (Dwfl_Module *dwflmod, Ebl *ebl, GElf_Ehdr *ehdr,
   GElf_Addr bias;
   if (dwfl_module_getelf (dwflmod, &bias) == NULL)
     {
-      error (0, 0, gettext ("cannot get ELF: %s"), dwfl_errmsg (-1));
+      error (0, 0, _("cannot get ELF: %s"), dwfl_errmsg (-1));
       return;
     }
 
@@ -6607,17 +6607,17 @@ print_debug_frame_section (Dwfl_Module *dwflmod, Ebl *ebl, GElf_Ehdr *ehdr,
 
   if (unlikely (data == NULL))
     {
-      error (0, 0, gettext ("cannot get %s content: %s"),
+      error (0, 0, _("cannot get %s content: %s"),
 	     scnname, elf_errmsg (-1));
       return;
     }
 
   if (is_eh_frame)
-    printf (gettext ("\
+    printf (_("\
 \nCall frame information section [%2zu] '%s' at offset %#" PRIx64 ":\n"),
 	    elf_ndxscn (scn), scnname, (uint64_t) shdr->sh_offset);
   else
-    printf (gettext ("\
+    printf (_("\
 \nDWARF section [%2zu] '%s' at offset %#" PRIx64 ":\n"),
 	    elf_ndxscn (scn), scnname, (uint64_t) shdr->sh_offset);
 
@@ -6641,7 +6641,7 @@ print_debug_frame_section (Dwfl_Module *dwflmod, Ebl *ebl, GElf_Ehdr *ehdr,
       if (unlikely (readp + 4 > dataend))
 	{
 	invalid_data:
-	  error (0, 0, gettext ("invalid data in section [%zu] '%s'"),
+	  error (0, 0, _("invalid data in section [%zu] '%s'"),
 		     elf_ndxscn (scn), scnname);
 	      return;
 	}
@@ -6663,7 +6663,7 @@ print_debug_frame_section (Dwfl_Module *dwflmod, Ebl *ebl, GElf_Ehdr *ehdr,
 
       if (unlikely (unit_length == 0))
 	{
-	  printf (gettext ("\n [%6tx] Zero terminator\n"), offset);
+	  printf (_("\n [%6tx] Zero terminator\n"), offset);
 	  continue;
 	}
 
@@ -6764,7 +6764,7 @@ print_debug_frame_section (Dwfl_Module *dwflmod, Ebl *ebl, GElf_Ehdr *ehdr,
 
 	      if (augmentationlen > (size_t) (cieend - readp))
 		{
-		  error (0, 0, gettext ("invalid augmentation length"));
+		  error (0, 0, _("invalid augmentation length"));
 		  readp = cieend;
 		  continue;
 		}
@@ -6779,13 +6779,13 @@ print_debug_frame_section (Dwfl_Module *dwflmod, Ebl *ebl, GElf_Ehdr *ehdr,
 		  if (*cp == 'R')
 		    {
 		      fde_encoding = *readp++;
-		      print_encoding_base (gettext ("FDE address encoding: "),
+		      print_encoding_base (_("FDE address encoding: "),
 					   fde_encoding);
 		    }
 		  else if (*cp == 'L')
 		    {
 		      lsda_encoding = *readp++;
-		      print_encoding_base (gettext ("LSDA pointer encoding: "),
+		      print_encoding_base (_("LSDA pointer encoding: "),
 					   lsda_encoding);
 		    }
 		  else if (*cp == 'P')
@@ -6895,14 +6895,14 @@ print_debug_frame_section (Dwfl_Module *dwflmod, Ebl *ebl, GElf_Ehdr *ehdr,
 			  & (ptr_size == 4
 			     ? UINT64_C (0xffffffff)
 			     : UINT64_C (0xffffffffffffffff)));
-	      printf (gettext (" (offset: %#" PRIx64 ")"),
+	      printf (_(" (offset: %#" PRIx64 ")"),
 		      (uint64_t) vma_base);
 	    }
 
 	  printf ("\n   address_range:            %#" PRIx64,
 		  (uint64_t) address_range);
 	  if ((fde_encoding & 0x70) == DW_EH_PE_pcrel)
-	    printf (gettext (" (end offset: %#" PRIx64 ")"),
+	    printf (_(" (end offset: %#" PRIx64 ")"),
 		    ((uint64_t) vma_base + (uint64_t) address_range)
 		    & (ptr_size == 4
 		       ? UINT64_C (0xffffffff)
@@ -6918,7 +6918,7 @@ print_debug_frame_section (Dwfl_Module *dwflmod, Ebl *ebl, GElf_Ehdr *ehdr,
 
 	      if (augmentationlen > (size_t) (cieend - readp))
 		{
-		  error (0, 0, gettext ("invalid augmentation length"));
+		  error (0, 0, _("invalid augmentation length"));
 		  readp = cieend;
 		  continue;
 		}
@@ -6939,7 +6939,7 @@ print_debug_frame_section (Dwfl_Module *dwflmod, Ebl *ebl, GElf_Ehdr *ehdr,
 					    &readp[augmentationlen],
 					    &lsda_pointer, dbg);
 			  u = p - readp;
-			  printf (gettext ("\
+			  printf (_("\
    %-26sLSDA pointer: %#" PRIx64 "\n"),
 				  hdr, lsda_pointer);
 			  hdr = "";
@@ -7024,7 +7024,7 @@ attr_callback (Dwarf_Attribute *attrp, void *arg)
   if (unlikely (attr == 0))
     {
       if (!cbargs->silent)
-	error (0, 0, gettext ("DIE [%" PRIx64 "] "
+	error (0, 0, _("DIE [%" PRIx64 "] "
 			      "cannot get attribute code: %s"),
 	       dwarf_dieoffset (die), dwarf_errmsg (-1));
       return DWARF_CB_ABORT;
@@ -7034,7 +7034,7 @@ attr_callback (Dwarf_Attribute *attrp, void *arg)
   if (unlikely (form == 0))
     {
       if (!cbargs->silent)
-	error (0, 0, gettext ("DIE [%" PRIx64 "] "
+	error (0, 0, _("DIE [%" PRIx64 "] "
 			      "cannot get attribute form: %s"),
 	       dwarf_dieoffset (die), dwarf_errmsg (-1));
       return DWARF_CB_ABORT;
@@ -7056,7 +7056,7 @@ attr_callback (Dwarf_Attribute *attrp, void *arg)
 	    {
 	    attrval_out:
 	      if (!cbargs->silent)
-		error (0, 0, gettext ("DIE [%" PRIx64 "] "
+		error (0, 0, _("DIE [%" PRIx64 "] "
 				      "cannot get attribute '%s' (%s) value: "
 				      "%s"),
 		       dwarf_dieoffset (die),
@@ -7386,15 +7386,15 @@ attr_callback (Dwarf_Attribute *attrp, void *arg)
 			  valuestr = filename + 1;
 		      }
 		    else
-		      error (0, 0, gettext ("invalid file (%" PRId64 "): %s"),
+		      error (0, 0, _("invalid file (%" PRId64 "): %s"),
 			     num, dwarf_errmsg (-1));
 		  }
 		else
-		  error (0, 0, gettext ("no srcfiles for CU [%" PRIx64 "]"),
+		  error (0, 0, _("no srcfiles for CU [%" PRIx64 "]"),
 			 dwarf_dieoffset (&cudie));
 	      }
 	    else
-	     error (0, 0, gettext ("couldn't get DWARF CU: %s"),
+	     error (0, 0, _("couldn't get DWARF CU: %s"),
 		    dwarf_errmsg (-1));
 	    if (valuestr == NULL)
 	      valuestr = "???";
@@ -7707,7 +7707,7 @@ print_debug_units (Dwfl_Module *dwflmod,
   const char *secname = section_name (ebl, shdr);
 
   if (!silent)
-    printf (gettext ("\
+    printf (_("\
 \nDWARF section [%2zu] '%s' at offset %#" PRIx64 ":\n [Offset]\n"),
 	    elf_ndxscn (scn), secname, (uint64_t) shdr->sh_offset);
 
@@ -7757,7 +7757,7 @@ print_debug_units (Dwfl_Module *dwflmod,
   if (unit_res == -1)
     {
       if (!silent)
-	error (0, 0, gettext ("cannot get next unit: %s"), dwarf_errmsg (-1));
+	error (0, 0, _("cannot get next unit: %s"), dwarf_errmsg (-1));
       goto do_return;
     }
 
@@ -7776,7 +7776,7 @@ print_debug_units (Dwfl_Module *dwflmod,
 	  Dwarf_Off dieoffset;
 	  dieoffset = dwarf_dieoffset (dwarf_offdie_types (dbg, subdie_off,
 							   &typedie));
-	  printf (gettext (" Type unit at offset %" PRIu64 ":\n"
+	  printf (_(" Type unit at offset %" PRIu64 ":\n"
 			   " Version: %" PRIu16
 			   ", Abbreviation section offset: %" PRIu64
 			   ", Address size: %" PRIu8
@@ -7788,7 +7788,7 @@ print_debug_units (Dwfl_Module *dwflmod,
 	}
       else
 	{
-	  printf (gettext (" Compilation unit at offset %" PRIu64 ":\n"
+	  printf (_(" Compilation unit at offset %" PRIu64 ":\n"
 			   " Version: %" PRIu16
 			   ", Abbreviation section offset: %" PRIu64
 			   ", Address size: %" PRIu8
@@ -7798,7 +7798,7 @@ print_debug_units (Dwfl_Module *dwflmod,
 	  if (version >= 5 || (unit_type != DW_UT_compile
 			       && unit_type != DW_UT_partial))
 	    {
-	      printf (gettext (" Unit type: %s (%" PRIu8 ")"),
+	      printf (_(" Unit type: %s (%" PRIu8 ")"),
 			       dwarf_unit_name (unit_type), unit_type);
 	      if (unit_type == DW_UT_type
 		  || unit_type == DW_UT_skeleton
@@ -7825,7 +7825,7 @@ print_debug_units (Dwfl_Module *dwflmod,
       || unit_type < DW_UT_compile || unit_type > DW_UT_split_type)
     {
       if (!silent)
-	error (0, 0, gettext ("unknown version (%d) or unit type (%d)"),
+	error (0, 0, _("unknown version (%d) or unit type (%d)"),
 	       version, unit_type);
       goto next_cu;
     }
@@ -7854,7 +7854,7 @@ print_debug_units (Dwfl_Module *dwflmod,
       if (unlikely (offset == (Dwarf_Off) -1))
 	{
 	  if (!silent)
-	    error (0, 0, gettext ("cannot get DIE offset: %s"),
+	    error (0, 0, _("cannot get DIE offset: %s"),
 		   dwarf_errmsg (-1));
 	  goto do_return;
 	}
@@ -7863,7 +7863,7 @@ print_debug_units (Dwfl_Module *dwflmod,
       if (unlikely (tag == DW_TAG_invalid))
 	{
 	  if (!silent)
-	    error (0, 0, gettext ("cannot get tag of DIE at offset [%" PRIx64
+	    error (0, 0, _("cannot get tag of DIE at offset [%" PRIx64
 				  "] in section '%s': %s"),
 		   (uint64_t) offset, secname, dwarf_errmsg (-1));
 	  goto do_return;
@@ -7901,7 +7901,7 @@ print_debug_units (Dwfl_Module *dwflmod,
 	  if (unlikely (res == -1))
 	    {
 	      if (!silent)
-		error (0, 0, gettext ("cannot get next DIE: %s\n"),
+		error (0, 0, _("cannot get next DIE: %s\n"),
 		       dwarf_errmsg (-1));
 	      goto do_return;
 	    }
@@ -7909,7 +7909,7 @@ print_debug_units (Dwfl_Module *dwflmod,
       else if (unlikely (res < 0))
 	{
 	  if (!silent)
-	    error (0, 0, gettext ("cannot get next DIE: %s"),
+	    error (0, 0, _("cannot get next DIE: %s"),
 		   dwarf_errmsg (-1));
 	  goto do_return;
 	}
@@ -7953,7 +7953,7 @@ print_debug_units (Dwfl_Module *dwflmod,
 
 	  if (!silent)
 	    {
-	      printf (gettext (" Split compilation unit at offset %"
+	      printf (_(" Split compilation unit at offset %"
 			       PRIu64 ":\n"
 			       " Version: %" PRIu16
 			       ", Abbreviation section offset: %" PRIu64
@@ -7961,7 +7961,7 @@ print_debug_units (Dwfl_Module *dwflmod,
 			       ", Offset size: %" PRIu8 "\n"),
 		      (uint64_t) offset, version, abbroffset,
 		      addrsize, offsize);
-	      printf (gettext (" Unit type: %s (%" PRIu8 ")"),
+	      printf (_(" Unit type: %s (%" PRIu8 ")"),
 		      dwarf_unit_name (unit_type), unit_type);
 	      printf (", Unit id: 0x%.16" PRIx64 "", unit_id);
 	      printf ("\n");
@@ -8005,7 +8005,7 @@ print_decoded_line_section (Dwfl_Module *dwflmod, Ebl *ebl,
 			    GElf_Ehdr *ehdr __attribute__ ((unused)),
 			    Elf_Scn *scn, GElf_Shdr *shdr, Dwarf *dbg)
 {
-  printf (gettext ("\
+  printf (_("\
 \nDWARF section [%2zu] '%s' at offset %#" PRIx64 ":\n\n"),
 	  elf_ndxscn (scn), section_name (ebl, shdr),
 	  (uint64_t) shdr->sh_offset);
@@ -8337,7 +8337,7 @@ print_form_data (Dwarf *dbg, int form, const unsigned char *readp,
       goto strx_val;
 
     default:
-      error (0, 0, gettext ("unknown form: %s"), dwarf_form_name (form));
+      error (0, 0, _("unknown form: %s"), dwarf_form_name (form));
       return readendp;
     }
 
@@ -8354,7 +8354,7 @@ print_debug_line_section (Dwfl_Module *dwflmod, Ebl *ebl, GElf_Ehdr *ehdr,
       return;
     }
 
-  printf (gettext ("\
+  printf (_("\
 \nDWARF section [%2zu] '%s' at offset %#" PRIx64 ":\n"),
 	  elf_ndxscn (scn), section_name (ebl, shdr),
 	  (uint64_t) shdr->sh_offset);
@@ -8368,7 +8368,7 @@ print_debug_line_section (Dwfl_Module *dwflmod, Ebl *ebl, GElf_Ehdr *ehdr,
 		    ?: elf_rawdata (scn, NULL));
   if (unlikely (data == NULL))
     {
-      error (0, 0, gettext ("cannot get line data section data: %s"),
+      error (0, 0, _("cannot get line data section data: %s"),
 	     elf_errmsg (-1));
       return;
     }
@@ -8381,7 +8381,7 @@ print_debug_line_section (Dwfl_Module *dwflmod, Ebl *ebl, GElf_Ehdr *ehdr,
     {
       size_t start_offset = linep - (const unsigned char *) data->d_buf;
 
-      printf (gettext ("\nTable at offset %zu:\n"), start_offset);
+      printf (_("\nTable at offset %zu:\n"), start_offset);
 
       if (unlikely (linep + 4 > lineendp))
 	goto invalid_data;
@@ -8392,7 +8392,7 @@ print_debug_line_section (Dwfl_Module *dwflmod, Ebl *ebl, GElf_Ehdr *ehdr,
 	  if (unlikely (linep + 8 > lineendp))
 	    {
 	    invalid_data:
-	      error (0, 0, gettext ("invalid data in section [%zu] '%s'"),
+	      error (0, 0, _("invalid data in section [%zu] '%s'"),
 		     elf_ndxscn (scn), section_name (ebl, shdr));
 	      return;
 	    }
@@ -8470,7 +8470,7 @@ print_debug_line_section (Dwfl_Module *dwflmod, Ebl *ebl, GElf_Ehdr *ehdr,
       uint_fast8_t opcode_base = *linep++;
 
       /* Print what we got so far.  */
-      printf (gettext ("\n"
+      printf (_("\n"
 		       " Length:                         %" PRIu64 "\n"
 		       " DWARF version:                  %" PRIuFAST16 "\n"
 		       " Prologue length:                %" PRIu64 "\n"
@@ -8492,7 +8492,7 @@ print_debug_line_section (Dwfl_Module *dwflmod, Ebl *ebl, GElf_Ehdr *ehdr,
 
       if (version < 2 || version > 5)
 	{
-	  error (0, 0, gettext ("cannot handle .debug_line version: %u\n"),
+	  error (0, 0, _("cannot handle .debug_line version: %u\n"),
 		 (unsigned int) version);
 	  linep = lineendp;
 	  continue;
@@ -8500,7 +8500,7 @@ print_debug_line_section (Dwfl_Module *dwflmod, Ebl *ebl, GElf_Ehdr *ehdr,
 
       if (address_size != 4 && address_size != 8)
 	{
-	  error (0, 0, gettext ("cannot handle address size: %u\n"),
+	  error (0, 0, _("cannot handle address size: %u\n"),
 		 (unsigned int) address_size);
 	  linep = lineendp;
 	  continue;
@@ -8508,7 +8508,7 @@ print_debug_line_section (Dwfl_Module *dwflmod, Ebl *ebl, GElf_Ehdr *ehdr,
 
       if (segment_selector_size != 0)
 	{
-	  error (0, 0, gettext ("cannot handle segment selector size: %u\n"),
+	  error (0, 0, _("cannot handle segment selector size: %u\n"),
 		 (unsigned int) segment_selector_size);
 	  linep = lineendp;
 	  continue;
@@ -8518,7 +8518,7 @@ print_debug_line_section (Dwfl_Module *dwflmod, Ebl *ebl, GElf_Ehdr *ehdr,
 	{
 	invalid_unit:
 	  error (0, 0,
-		 gettext ("invalid data at offset %tu in section [%zu] '%s'"),
+		 _("invalid data at offset %tu in section [%zu] '%s'"),
 		 linep - (const unsigned char *) data->d_buf,
 		 elf_ndxscn (scn), section_name (ebl, shdr));
 	  linep = lineendp;
@@ -8544,13 +8544,13 @@ print_debug_line_section (Dwfl_Module *dwflmod, Ebl *ebl, GElf_Ehdr *ehdr,
 
       Dwarf_Off str_offsets_base = str_offsets_base_off (dbg, NULL);
 
-      puts (gettext ("\nDirectory table:"));
+      puts (_("\nDirectory table:"));
       if (version > 4)
 	{
 	  struct encpair { uint16_t desc; uint16_t form; };
 	  struct encpair enc[256];
 
-	  printf (gettext ("      ["));
+	  printf (_("      ["));
 	  if ((size_t) (lineendp - linep) < 1)
 	    goto invalid_data;
 	  unsigned char directory_entry_format_count = *linep++;
@@ -8621,13 +8621,13 @@ print_debug_line_section (Dwfl_Module *dwflmod, Ebl *ebl, GElf_Ehdr *ehdr,
       if (unlikely (linep >= lineendp))
 	goto invalid_unit;
 
-      puts (gettext ("\nFile name table:"));
+      puts (_("\nFile name table:"));
       if (version > 4)
 	{
 	  struct encpair { uint16_t desc; uint16_t form; };
 	  struct encpair enc[256];
 
-	  printf (gettext ("      ["));
+	  printf (_("      ["));
 	  if ((size_t) (lineendp - linep) < 1)
 	    goto invalid_data;
 	  unsigned char file_name_format_count = *linep++;
@@ -8682,7 +8682,7 @@ print_debug_line_section (Dwfl_Module *dwflmod, Ebl *ebl, GElf_Ehdr *ehdr,
 	}
       else
 	{
-	  puts (gettext (" Entry Dir   Time      Size      Name"));
+	  puts (_(" Entry Dir   Time      Size      Name"));
 	  for (unsigned int cnt = 1; linep < lineendp && *linep != 0; ++cnt)
 	    {
 	      /* First comes the file name.  */
@@ -8721,11 +8721,11 @@ print_debug_line_section (Dwfl_Module *dwflmod, Ebl *ebl, GElf_Ehdr *ehdr,
 
       if (linep == lineendp)
 	{
-	  puts (gettext ("\nNo line number statements."));
+	  puts (_("\nNo line number statements."));
 	  return;
 	}
 
-      puts (gettext ("\nLine number statements:"));
+      puts (_("\nLine number statements:"));
       Dwarf_Word address = 0;
       unsigned int op_index = 0;
       size_t line = 1;
@@ -8748,7 +8748,7 @@ print_debug_line_section (Dwfl_Module *dwflmod, Ebl *ebl, GElf_Ehdr *ehdr,
       if (max_ops_per_instr == 0)
 	{
 	  error (0, 0,
-		 gettext ("invalid maximum operations per instruction is zero"));
+		 _("invalid maximum operations per instruction is zero"));
 	  linep = lineendp;
 	  continue;
 	}
@@ -8782,14 +8782,14 @@ print_debug_line_section (Dwfl_Module *dwflmod, Ebl *ebl, GElf_Ehdr *ehdr,
 	      line += line_increment;
 	      advance_pc ((opcode - opcode_base) / line_range);
 
-	      printf (gettext (" special opcode %u: address+%u = "),
+	      printf (_(" special opcode %u: address+%u = "),
 		      opcode, op_addr_advance);
 	      print_dwarf_addr (dwflmod, 0, address, address);
 	      if (show_op_index)
-		printf (gettext (", op_index = %u, line%+d = %zu\n"),
+		printf (_(", op_index = %u, line%+d = %zu\n"),
 			op_index, line_increment, line);
 	      else
-		printf (gettext (", line%+d = %zu\n"),
+		printf (_(", line%+d = %zu\n"),
 			line_increment, line);
 	    }
 	  else if (opcode == 0)
@@ -8807,12 +8807,12 @@ print_debug_line_section (Dwfl_Module *dwflmod, Ebl *ebl, GElf_Ehdr *ehdr,
 	      /* The sub-opcode.  */
 	      opcode = *linep++;
 
-	      printf (gettext (" extended opcode %u: "), opcode);
+	      printf (_(" extended opcode %u: "), opcode);
 
 	      switch (opcode)
 		{
 		case DW_LNE_end_sequence:
-		  puts (gettext (" end of sequence"));
+		  puts (_(" end of sequence"));
 
 		  /* Reset the registers we care about.  */
 		  address = 0;
@@ -8830,7 +8830,7 @@ print_debug_line_section (Dwfl_Module *dwflmod, Ebl *ebl, GElf_Ehdr *ehdr,
 		  else
 		    address = read_8ubyte_unaligned_inc (dbg, linep);
 		  {
-		    printf (gettext (" set address to "));
+		    printf (_(" set address to "));
 		    print_dwarf_addr (dwflmod, 0, address, address);
 		    printf ("\n");
 		  }
@@ -8858,7 +8858,7 @@ print_debug_line_section (Dwfl_Module *dwflmod, Ebl *ebl, GElf_Ehdr *ehdr,
 		      goto invalid_unit;
 		    get_uleb128 (filelength, linep, lineendp);
 
-		    printf (gettext ("\
+		    printf (_("\
  define new file: dir=%u, mtime=%" PRIu64 ", length=%" PRIu64 ", name=%s\n"),
 			    diridx, (uint64_t) mtime, (uint64_t) filelength,
 			    fname);
@@ -8872,12 +8872,12 @@ print_debug_line_section (Dwfl_Module *dwflmod, Ebl *ebl, GElf_Ehdr *ehdr,
 		    goto invalid_unit;
 
 		  get_uleb128 (u128, linep, lineendp);
-		  printf (gettext (" set discriminator to %u\n"), u128);
+		  printf (_(" set discriminator to %u\n"), u128);
 		  break;
 
 		default:
 		  /* Unknown, ignore it.  */
-		  puts (gettext (" unknown opcode"));
+		  puts (_(" unknown opcode"));
 		  linep += len - 1;
 		  break;
 		}
@@ -8889,7 +8889,7 @@ print_debug_line_section (Dwfl_Module *dwflmod, Ebl *ebl, GElf_Ehdr *ehdr,
 		{
 		case DW_LNS_copy:
 		  /* Takes no argument.  */
-		  puts (gettext (" copy"));
+		  puts (_(" copy"));
 		  break;
 
 		case DW_LNS_advance_pc:
@@ -8900,11 +8900,11 @@ print_debug_line_section (Dwfl_Module *dwflmod, Ebl *ebl, GElf_Ehdr *ehdr,
 		  get_uleb128 (u128, linep, lineendp);
 		  advance_pc (u128);
 		  {
-		    printf (gettext (" advance address by %u to "),
+		    printf (_(" advance address by %u to "),
 			    op_addr_advance);
 		    print_dwarf_addr (dwflmod, 0, address, address);
 		    if (show_op_index)
-		      printf (gettext (", op_index to %u"), op_index);
+		      printf (_(", op_index to %u"), op_index);
 		    printf ("\n");
 		  }
 		  break;
@@ -8916,7 +8916,7 @@ print_debug_line_section (Dwfl_Module *dwflmod, Ebl *ebl, GElf_Ehdr *ehdr,
 		    goto invalid_unit;
 		  get_sleb128 (s128, linep, lineendp);
 		  line += s128;
-		  printf (gettext ("\
+		  printf (_("\
  advance line by constant %d to %" PRId64 "\n"),
 			  s128, (int64_t) line);
 		  break;
@@ -8926,7 +8926,7 @@ print_debug_line_section (Dwfl_Module *dwflmod, Ebl *ebl, GElf_Ehdr *ehdr,
 		  if (lineendp - linep < 1)
 		    goto invalid_unit;
 		  get_uleb128 (u128, linep, lineendp);
-		  printf (gettext (" set file to %" PRIu64 "\n"),
+		  printf (_(" set file to %" PRIu64 "\n"),
 			  (uint64_t) u128);
 		  break;
 
@@ -8937,20 +8937,20 @@ print_debug_line_section (Dwfl_Module *dwflmod, Ebl *ebl, GElf_Ehdr *ehdr,
 		    goto invalid_unit;
 
 		  get_uleb128 (u128, linep, lineendp);
-		  printf (gettext (" set column to %" PRIu64 "\n"),
+		  printf (_(" set column to %" PRIu64 "\n"),
 			  (uint64_t) u128);
 		  break;
 
 		case DW_LNS_negate_stmt:
 		  /* Takes no argument.  */
 		  is_stmt = 1 - is_stmt;
-		  printf (gettext (" set '%s' to %" PRIuFAST8 "\n"),
+		  printf (_(" set '%s' to %" PRIuFAST8 "\n"),
 			  "is_stmt", is_stmt);
 		  break;
 
 		case DW_LNS_set_basic_block:
 		  /* Takes no argument.  */
-		  puts (gettext (" set basic block flag"));
+		  puts (_(" set basic block flag"));
 		  break;
 
 		case DW_LNS_const_add_pc:
@@ -8961,11 +8961,11 @@ print_debug_line_section (Dwfl_Module *dwflmod, Ebl *ebl, GElf_Ehdr *ehdr,
 
 		  advance_pc ((255 - opcode_base) / line_range);
 		  {
-		    printf (gettext (" advance address by constant %u to "),
+		    printf (_(" advance address by constant %u to "),
 			    op_addr_advance);
 		    print_dwarf_addr (dwflmod, 0, address, address);
 		    if (show_op_index)
-		      printf (gettext (", op_index to %u"), op_index);
+		      printf (_(", op_index to %u"), op_index);
 		    printf ("\n");
 		  }
 		  break;
@@ -8981,7 +8981,7 @@ print_debug_line_section (Dwfl_Module *dwflmod, Ebl *ebl, GElf_Ehdr *ehdr,
 		  address += u128;
 		  op_index = 0;
 		  {
-		    printf (gettext ("\
+		    printf (_("\
  advance address by fixed value %u to \n"),
 			    u128);
 		    print_dwarf_addr (dwflmod, 0, address, address);
@@ -8991,12 +8991,12 @@ print_debug_line_section (Dwfl_Module *dwflmod, Ebl *ebl, GElf_Ehdr *ehdr,
 
 		case DW_LNS_set_prologue_end:
 		  /* Takes no argument.  */
-		  puts (gettext (" set prologue end flag"));
+		  puts (_(" set prologue end flag"));
 		  break;
 
 		case DW_LNS_set_epilogue_begin:
 		  /* Takes no argument.  */
-		  puts (gettext (" set epilogue begin flag"));
+		  puts (_(" set epilogue begin flag"));
 		  break;
 
 		case DW_LNS_set_isa:
@@ -9006,7 +9006,7 @@ print_debug_line_section (Dwfl_Module *dwflmod, Ebl *ebl, GElf_Ehdr *ehdr,
 		    goto invalid_unit;
 
 		  get_uleb128 (u128, linep, lineendp);
-		  printf (gettext (" set isa to %u\n"), u128);
+		  printf (_(" set isa to %u\n"), u128);
 		  break;
 		}
 	    }
@@ -9046,7 +9046,7 @@ print_debug_loclists_section (Dwfl_Module *dwflmod,
 			      Elf_Scn *scn, GElf_Shdr *shdr,
 			      Dwarf *dbg)
 {
-  printf (gettext ("\
+  printf (_("\
 \nDWARF section [%2zu] '%s' at offset %#" PRIx64 ":\n"),
 	  elf_ndxscn (scn), section_name (ebl, shdr),
 	  (uint64_t) shdr->sh_offset);
@@ -9055,7 +9055,7 @@ print_debug_loclists_section (Dwfl_Module *dwflmod,
 		    ?: elf_rawdata (scn, NULL));
   if (unlikely (data == NULL))
     {
-      error (0, 0, gettext ("cannot get .debug_loclists content: %s"),
+      error (0, 0, _("cannot get .debug_loclists content: %s"),
 	     elf_errmsg (-1));
       return;
     }
@@ -9072,13 +9072,13 @@ print_debug_loclists_section (Dwfl_Module *dwflmod,
       if (unlikely (readp > dataend - 4))
 	{
 	invalid_data:
-	  error (0, 0, gettext ("invalid data in section [%zu] '%s'"),
+	  error (0, 0, _("invalid data in section [%zu] '%s'"),
 		 elf_ndxscn (scn), section_name (ebl, shdr));
 	  return;
 	}
 
       ptrdiff_t offset = readp - (unsigned char *) data->d_buf;
-      printf (gettext ("Table at Offset 0x%" PRIx64 ":\n\n"),
+      printf (_("Table at Offset 0x%" PRIx64 ":\n\n"),
 	      (uint64_t) offset);
 
       uint64_t unit_length = read_4ubyte_unaligned_inc (dbg, readp);
@@ -9091,7 +9091,7 @@ print_debug_loclists_section (Dwfl_Module *dwflmod,
 	  unit_length = read_8ubyte_unaligned_inc (dbg, readp);
 	  offset_size = 8;
 	}
-      printf (gettext (" Length:         %8" PRIu64 "\n"), unit_length);
+      printf (_(" Length:         %8" PRIu64 "\n"), unit_length);
 
       /* We need at least 2-bytes + 1-byte + 1-byte + 4-bytes = 8
 	 bytes to complete the header.  And this unit cannot go beyond
@@ -9104,36 +9104,36 @@ print_debug_loclists_section (Dwfl_Module *dwflmod,
       const unsigned char *nexthdr = readp + unit_length;
 
       uint16_t version = read_2ubyte_unaligned_inc (dbg, readp);
-      printf (gettext (" DWARF version:  %8" PRIu16 "\n"), version);
+      printf (_(" DWARF version:  %8" PRIu16 "\n"), version);
 
       if (version != 5)
 	{
-	  error (0, 0, gettext ("Unknown version"));
+	  error (0, 0, _("Unknown version"));
 	  goto next_table;
 	}
 
       uint8_t address_size = *readp++;
-      printf (gettext (" Address size:   %8" PRIu64 "\n"),
+      printf (_(" Address size:   %8" PRIu64 "\n"),
 	      (uint64_t) address_size);
 
       if (address_size != 4 && address_size != 8)
 	{
-	  error (0, 0, gettext ("unsupported address size"));
+	  error (0, 0, _("unsupported address size"));
 	  goto next_table;
 	}
 
       uint8_t segment_size = *readp++;
-      printf (gettext (" Segment size:   %8" PRIu64 "\n"),
+      printf (_(" Segment size:   %8" PRIu64 "\n"),
 	      (uint64_t) segment_size);
 
       if (segment_size != 0)
         {
-          error (0, 0, gettext ("unsupported segment size"));
+          error (0, 0, _("unsupported segment size"));
           goto next_table;
         }
 
       uint32_t offset_entry_count = read_4ubyte_unaligned_inc (dbg, readp);
-      printf (gettext (" Offset entries: %8" PRIu64 "\n"),
+      printf (_(" Offset entries: %8" PRIu64 "\n"),
 	      (uint64_t) offset_entry_count);
 
       /* We need the CU that uses this unit to get the initial base address. */
@@ -9149,15 +9149,15 @@ print_debug_loclists_section (Dwfl_Module *dwflmod,
 	  if (dwarf_cu_die (cu, &cudie,
 			    NULL, NULL, NULL, NULL,
 			    NULL, NULL) == NULL)
-	    printf (gettext (" Unknown CU base: "));
+	    printf (_(" Unknown CU base: "));
 	  else
-	    printf (gettext (" CU [%6" PRIx64 "] base: "),
+	    printf (_(" CU [%6" PRIx64 "] base: "),
 		    dwarf_dieoffset (&cudie));
 	  print_dwarf_addr (dwflmod, address_size, cu_base, cu_base);
 	  printf ("\n");
 	}
       else
-	printf (gettext (" Not associated with a CU.\n"));
+	printf (_(" Not associated with a CU.\n"));
 
       printf ("\n");
 
@@ -9168,11 +9168,11 @@ print_debug_loclists_section (Dwfl_Module *dwflmod,
 	  if (offset_entry_count > max_entries)
 	    {
 	      error (0, 0,
-		     gettext ("too many offset entries for unit length"));
+		     _("too many offset entries for unit length"));
 	      offset_entry_count = max_entries;
 	    }
 
-	  printf (gettext ("  Offsets starting at 0x%" PRIx64 ":\n"),
+	  printf (_("  Offsets starting at 0x%" PRIx64 ":\n"),
 		  (uint64_t) (offset_array_start
 			      - (unsigned char *) data->d_buf));
 	  for (uint32_t idx = 0; idx < offset_entry_count; idx++)
@@ -9221,7 +9221,7 @@ print_debug_loclists_section (Dwfl_Module *dwflmod,
 		  get_uleb128 (v1, locp, locendp);
 		  if (locp >= locendp)
 		    {
-		      printf (gettext ("    <INVALID DATA>\n"));
+		      printf (_("    <INVALID DATA>\n"));
 		      break;
 		    }
 		  get_uleb128 (v2, locp, locendp);
@@ -9261,7 +9261,7 @@ print_debug_loclists_section (Dwfl_Module *dwflmod,
 	      if ((uint64_t) (nexthdr - readp) < 1)
 		{
 		invalid_entry:
-		  error (0, 0, gettext ("invalid loclists data"));
+		  error (0, 0, _("invalid loclists data"));
 		  goto next_table;
 		}
 	      get_uleb128 (op1, readp, nexthdr);
@@ -9497,7 +9497,7 @@ print_debug_loclists_section (Dwfl_Module *dwflmod,
       if (readp != nexthdr)
 	{
           size_t padding = nexthdr - readp;
-          printf (gettext ("   %zu padding bytes\n\n"), padding);
+          printf (_("   %zu padding bytes\n\n"), padding);
 	  readp = nexthdr;
 	}
     }
@@ -9514,12 +9514,12 @@ print_debug_loc_section (Dwfl_Module *dwflmod,
 
   if (unlikely (data == NULL))
     {
-      error (0, 0, gettext ("cannot get .debug_loc content: %s"),
+      error (0, 0, _("cannot get .debug_loc content: %s"),
 	     elf_errmsg (-1));
       return;
     }
 
-  printf (gettext ("\
+  printf (_("\
 \nDWARF section [%2zu] '%s' at offset %#" PRIx64 ":\n"),
 	  elf_ndxscn (scn), section_name (ebl, shdr),
 	  (uint64_t) shdr->sh_offset);
@@ -9552,9 +9552,9 @@ print_debug_loc_section (Dwfl_Module *dwflmod,
 	if (dwarf_cu_die (cu, &cudie,
 			  NULL, NULL, NULL, NULL,
 			  NULL, NULL) == NULL)
-	  printf (gettext ("\n Unknown CU base: "));
+	  printf (_("\n Unknown CU base: "));
 	else
-	  printf (gettext ("\n CU [%6" PRIx64 "] base: "),
+	  printf (_("\n CU [%6" PRIx64 "] base: "),
 		  dwarf_dieoffset (&cudie));
 	print_dwarf_addr (dwflmod, address_size, base, base);
 	printf ("\n");
@@ -9580,7 +9580,7 @@ print_debug_loc_section (Dwfl_Module *dwflmod,
 	      get_uleb128 (v1, locp, locendp);
 	      if (locp >= locendp)
 		{
-		  printf (gettext (" [%6tx]  <INVALID DATA>\n"), offset);
+		  printf (_(" [%6tx]  <INVALID DATA>\n"), offset);
 		  break;
 		}
 	      get_uleb128 (v2, locp, locendp);
@@ -9606,7 +9606,7 @@ print_debug_loc_section (Dwfl_Module *dwflmod,
 	  && unlikely (data->d_size - offset < (size_t) address_size * 2))
         {
 	invalid_data:
-	  printf (gettext (" [%6tx]  <INVALID DATA>\n"), offset);
+	  printf (_(" [%6tx]  <INVALID DATA>\n"), offset);
 	  break;
 	}
 
@@ -9690,7 +9690,7 @@ print_debug_loc_section (Dwfl_Module *dwflmod,
 	    printf (" [%6tx] ", offset);
 	  else
 	    printf ("          ");
-	  puts (gettext ("base address"));
+	  puts (_("base address"));
 	  printf ("          ");
 	  print_dwarf_addr (dwflmod, address_size, end, end);
 	  printf ("\n");
@@ -9700,7 +9700,7 @@ print_debug_loc_section (Dwfl_Module *dwflmod,
       else if (begin == 0 && end == 0) /* End of list entry.  */
 	{
 	  if (first)
-	    printf (gettext (" [%6tx] empty list\n"), offset);
+	    printf (_(" [%6tx] empty list\n"), offset);
 	  first = true;
 	}
       else
@@ -9727,7 +9727,7 @@ print_debug_loc_section (Dwfl_Module *dwflmod,
 
 	  if (endp - readp <= (ptrdiff_t) len)
 	    {
-	      fputs (gettext ("   <INVALID DATA>\n"), stdout);
+	      fputs (_("   <INVALID DATA>\n"), stdout);
 	      break;
 	    }
 
@@ -9770,7 +9770,7 @@ print_debug_macinfo_section (Dwfl_Module *dwflmod __attribute__ ((unused)),
 			     GElf_Ehdr *ehdr __attribute__ ((unused)),
 			     Elf_Scn *scn, GElf_Shdr *shdr, Dwarf *dbg)
 {
-  printf (gettext ("\
+  printf (_("\
 \nDWARF section [%2zu] '%s' at offset %#" PRIx64 ":\n"),
 	  elf_ndxscn (scn), section_name (ebl, shdr),
 	  (uint64_t) shdr->sh_offset);
@@ -9782,7 +9782,7 @@ print_debug_macinfo_section (Dwfl_Module *dwflmod __attribute__ ((unused)),
 		    ?: elf_rawdata (scn, NULL));
   if (unlikely (data == NULL))
     {
-      error (0, 0, gettext ("cannot get macro information section data: %s"),
+      error (0, 0, _("cannot get macro information section data: %s"),
 	     elf_errmsg (-1));
       return;
     }
@@ -9862,7 +9862,7 @@ print_debug_macinfo_section (Dwfl_Module *dwflmod __attribute__ ((unused)),
 	  endp = memchr (readp, '\0', readendp - readp);
 	  if (unlikely (endp == NULL))
 	    {
-	      printf (gettext ("\
+	      printf (_("\
 %*s*** non-terminated string at end of section"),
 		      level, "");
 	      return;
@@ -9885,7 +9885,7 @@ print_debug_macinfo_section (Dwfl_Module *dwflmod __attribute__ ((unused)),
 	  get_uleb128 (u128, readp, readendp);
 	  if (readendp - readp < 1)
 	    {
-	      printf (gettext ("\
+	      printf (_("\
 %*s*** missing DW_MACINFO_start_file argument at end of section"),
 		      level, "");
 	      return;
@@ -9936,7 +9936,7 @@ print_debug_macro_section (Dwfl_Module *dwflmod __attribute__ ((unused)),
 			   GElf_Ehdr *ehdr __attribute__ ((unused)),
 			   Elf_Scn *scn, GElf_Shdr *shdr, Dwarf *dbg)
 {
-  printf (gettext ("\
+  printf (_("\
 \nDWARF section [%2zu] '%s' at offset %#" PRIx64 ":\n"),
 	  elf_ndxscn (scn), section_name (ebl, shdr),
 	  (uint64_t) shdr->sh_offset);
@@ -9945,7 +9945,7 @@ print_debug_macro_section (Dwfl_Module *dwflmod __attribute__ ((unused)),
   Elf_Data *data =  elf_getdata (scn, NULL);
   if (unlikely (data == NULL))
     {
-      error (0, 0, gettext ("cannot get macro information section data: %s"),
+      error (0, 0, _("cannot get macro information section data: %s"),
 	     elf_errmsg (-1));
       return;
     }
@@ -9986,7 +9986,7 @@ print_debug_macro_section (Dwfl_Module *dwflmod __attribute__ ((unused)),
 
   while (readp < readendp)
     {
-      printf (gettext (" Offset:             0x%" PRIx64 "\n"),
+      printf (_(" Offset:             0x%" PRIx64 "\n"),
 	      (uint64_t) (readp - (const unsigned char *) data->d_buf));
 
       // Header, 2 byte version, 1 byte flag, optional .debug_line offset,
@@ -9994,24 +9994,24 @@ print_debug_macro_section (Dwfl_Module *dwflmod __attribute__ ((unused)),
       if (readp + 2 > readendp)
 	{
 	invalid_data:
-	  error (0, 0, gettext ("invalid data"));
+	  error (0, 0, _("invalid data"));
 	  return;
 	}
       const uint16_t vers = read_2ubyte_unaligned_inc (dbg, readp);
-      printf (gettext (" Version:            %" PRIu16 "\n"), vers);
+      printf (_(" Version:            %" PRIu16 "\n"), vers);
 
       // Version 4 is the GNU extension for DWARF4.  DWARF5 will use version
       // 5 when it gets standardized.
       if (vers != 4 && vers != 5)
 	{
-	  printf (gettext ("  unknown version, cannot parse section\n"));
+	  printf (_("  unknown version, cannot parse section\n"));
 	  return;
 	}
 
       if (readp + 1 > readendp)
 	goto invalid_data;
       const unsigned char flag = *readp++;
-      printf (gettext (" Flag:               0x%" PRIx8), flag);
+      printf (_(" Flag:               0x%" PRIx8), flag);
       if (flag != 0)
 	{
 	  printf (" (");
@@ -10040,7 +10040,7 @@ print_debug_macro_section (Dwfl_Module *dwflmod __attribute__ ((unused)),
       printf ("\n");
 
       unsigned int offset_len = (flag & 0x01) ? 8 : 4;
-      printf (gettext (" Offset length:      %" PRIu8 "\n"), offset_len);
+      printf (_(" Offset length:      %" PRIu8 "\n"), offset_len);
       Dwarf_Off line_offset = -1;
       if (flag & 0x02)
 	{
@@ -10048,7 +10048,7 @@ print_debug_macro_section (Dwfl_Module *dwflmod __attribute__ ((unused)),
 	    line_offset = read_8ubyte_unaligned_inc (dbg, readp);
 	  else
 	    line_offset = read_4ubyte_unaligned_inc (dbg, readp);
-	  printf (gettext (" .debug_line offset: 0x%" PRIx64 "\n"),
+	  printf (_(" .debug_line offset: 0x%" PRIx64 "\n"),
 		  line_offset);
 	}
 
@@ -10073,14 +10073,14 @@ print_debug_macro_section (Dwfl_Module *dwflmod __attribute__ ((unused)),
 	  if (readp + 1 > readendp)
 	    goto invalid_data;
 	  unsigned int tlen = *readp++;
-	  printf (gettext ("  extension opcode table, %" PRIu8 " items:\n"),
+	  printf (_("  extension opcode table, %" PRIu8 " items:\n"),
 		  tlen);
 	  for (unsigned int i = 0; i < tlen; i++)
 	    {
 	      if (readp + 1 > readendp)
 		goto invalid_data;
 	      unsigned int opcode = *readp++;
-	      printf (gettext ("    [%" PRIx8 "]"), opcode);
+	      printf (_("    [%" PRIx8 "]"), opcode);
 	      if (opcode < DW_MACRO_lo_user
 		  || opcode > DW_MACRO_hi_user)
 		goto invalid_data;
@@ -10092,7 +10092,7 @@ print_debug_macro_section (Dwfl_Module *dwflmod __attribute__ ((unused)),
 	      unsigned int args = *readp++;
 	      if (args > 0)
 		{
-		  printf (gettext (" %" PRIu8 " arguments:"), args);
+		  printf (_(" %" PRIu8 " arguments:"), args);
 		  while (args > 0)
 		    {
 		      if (readp + 1 > readendp)
@@ -10107,7 +10107,7 @@ print_debug_macro_section (Dwfl_Module *dwflmod __attribute__ ((unused)),
 		    }
 		}
 	      else
-		printf (gettext (" no arguments."));
+		printf (_(" no arguments."));
 	      putchar_unlocked ('\n');
 	    }
 	}
@@ -10308,7 +10308,7 @@ print_pubnames (Dwarf *dbg __attribute__ ((unused)), Dwarf_Global *global,
 {
   int *np = (int *) arg;
 
-  printf (gettext (" [%5d] DIE offset: %6" PRId64
+  printf (_(" [%5d] DIE offset: %6" PRId64
 		   ", CU DIE offset: %6" PRId64 ", name: %s\n"),
 	  (*np)++, global->die_offset, global->cu_offset, global->name);
 
@@ -10323,7 +10323,7 @@ print_debug_pubnames_section (Dwfl_Module *dwflmod __attribute__ ((unused)),
 			      GElf_Ehdr *ehdr __attribute__ ((unused)),
 			      Elf_Scn *scn, GElf_Shdr *shdr, Dwarf *dbg)
 {
-  printf (gettext ("\nDWARF section [%2zu] '%s' at offset %#" PRIx64 ":\n"),
+  printf (_("\nDWARF section [%2zu] '%s' at offset %#" PRIx64 ":\n"),
 	  elf_ndxscn (scn), section_name (ebl, shdr),
 	  (uint64_t) shdr->sh_offset);
 
@@ -10352,7 +10352,7 @@ print_debug_str_section (Dwfl_Module *dwflmod __attribute__ ((unused)),
     }
   digits = MAX (4, digits);
 
-  printf (gettext ("\nDWARF section [%2zu] '%s' at offset %#" PRIx64 ":\n"
+  printf (_("\nDWARF section [%2zu] '%s' at offset %#" PRIx64 ":\n"
 		   " %*s  String\n"),
 	  elf_ndxscn (scn),
 	  section_name (ebl, shdr), (uint64_t) shdr->sh_offset,
@@ -10367,7 +10367,7 @@ print_debug_str_section (Dwfl_Module *dwflmod __attribute__ ((unused)),
       const char *endp = memchr (str, '\0', sh_size - offset);
       if (unlikely (endp == NULL))
 	{
-	  printf (gettext (" *** error, missing string terminator\n"));
+	  printf (_(" *** error, missing string terminator\n"));
 	  break;
 	}
 
@@ -10383,7 +10383,7 @@ print_debug_str_offsets_section (Dwfl_Module *dwflmod __attribute__ ((unused)),
 				 GElf_Ehdr *ehdr __attribute__ ((unused)),
 				 Elf_Scn *scn, GElf_Shdr *shdr, Dwarf *dbg)
 {
-  printf (gettext ("\
+  printf (_("\
 \nDWARF section [%2zu] '%s' at offset %#" PRIx64 ":\n"),
 	  elf_ndxscn (scn), section_name (ebl, shdr),
 	  (uint64_t) shdr->sh_offset);
@@ -10396,7 +10396,7 @@ print_debug_str_offsets_section (Dwfl_Module *dwflmod __attribute__ ((unused)),
 		    ?: elf_rawdata (scn, NULL));
   if (unlikely (data == NULL))
     {
-      error (0, 0, gettext ("cannot get .debug_str_offsets section data: %s"),
+      error (0, 0, _("cannot get .debug_str_offsets section data: %s"),
 	     elf_errmsg (-1));
       return;
     }
@@ -10495,9 +10495,9 @@ print_debug_str_offsets_section (Dwfl_Module *dwflmod __attribute__ ((unused)),
 	    offset_size = 4;
 
 	  printf ("\n");
-	  printf (gettext (" Length:        %8" PRIu64 "\n"),
+	  printf (_(" Length:        %8" PRIu64 "\n"),
 		  unit_length);
-	  printf (gettext (" Offset size:   %8" PRIu8 "\n"),
+	  printf (_(" Offset size:   %8" PRIu8 "\n"),
 		  offset_size);
 
 	  /* We need at least 2-bytes (version) + 2-bytes (padding) =
@@ -10511,16 +10511,16 @@ print_debug_str_offsets_section (Dwfl_Module *dwflmod __attribute__ ((unused)),
 	  next_unitp = readp + unit_length;
 
 	  version = read_2ubyte_unaligned_inc (dbg, readp);
-	  printf (gettext (" DWARF version: %8" PRIu16 "\n"), version);
+	  printf (_(" DWARF version: %8" PRIu16 "\n"), version);
 
 	  if (version != 5)
 	    {
-	      error (0, 0, gettext ("Unknown version"));
+	      error (0, 0, _("Unknown version"));
 	      goto next_unit;
 	    }
 
 	  padding = read_2ubyte_unaligned_inc (dbg, readp);
-	  printf (gettext (" Padding:       %8" PRIx16 "\n"), padding);
+	  printf (_(" Padding:       %8" PRIx16 "\n"), padding);
 
 	  if (listptr != NULL
 	      && listptr->offset != (Dwarf_Off) (readp - start))
@@ -10574,7 +10574,7 @@ print_debug_frame_hdr_section (Dwfl_Module *dwflmod __attribute__ ((unused)),
 			       GElf_Ehdr *ehdr __attribute__ ((unused)),
 			       Elf_Scn *scn, GElf_Shdr *shdr, Dwarf *dbg)
 {
-  printf (gettext ("\
+  printf (_("\
 \nCall frame search table section [%2zu] '.eh_frame_hdr':\n"),
 	  elf_ndxscn (scn));
 
@@ -10582,7 +10582,7 @@ print_debug_frame_hdr_section (Dwfl_Module *dwflmod __attribute__ ((unused)),
 
   if (unlikely (data == NULL))
     {
-      error (0, 0, gettext ("cannot get %s content: %s"),
+      error (0, 0, _("cannot get %s content: %s"),
 	     ".eh_frame_hdr", elf_errmsg (-1));
       return;
     }
@@ -10594,7 +10594,7 @@ print_debug_frame_hdr_section (Dwfl_Module *dwflmod __attribute__ ((unused)),
   if (unlikely (readp + 4 > dataend))
     {
     invalid_data:
-      error (0, 0, gettext ("invalid data"));
+      error (0, 0, _("invalid data"));
       return;
     }
 
@@ -10676,7 +10676,7 @@ print_debug_exception_table (Dwfl_Module *dwflmod __attribute__ ((unused)),
 			     GElf_Shdr *shdr __attribute__ ((unused)),
 			     Dwarf *dbg __attribute__ ((unused)))
 {
-  printf (gettext ("\
+  printf (_("\
 \nException handling table section [%2zu] '.gcc_except_table':\n"),
 	  elf_ndxscn (scn));
 
@@ -10684,7 +10684,7 @@ print_debug_exception_table (Dwfl_Module *dwflmod __attribute__ ((unused)),
 
   if (unlikely (data == NULL))
     {
-      error (0, 0, gettext ("cannot get %s content: %s"),
+      error (0, 0, _("cannot get %s content: %s"),
 	     ".gcc_except_table", elf_errmsg (-1));
       return;
     }
@@ -10695,11 +10695,11 @@ print_debug_exception_table (Dwfl_Module *dwflmod __attribute__ ((unused)),
   if (unlikely (readp + 1 > dataend))
     {
     invalid_data:
-      error (0, 0, gettext ("invalid data"));
+      error (0, 0, _("invalid data"));
       return;
     }
   unsigned int lpstart_encoding = *readp++;
-  printf (gettext (" LPStart encoding:    %#x "), lpstart_encoding);
+  printf (_(" LPStart encoding:    %#x "), lpstart_encoding);
   print_encoding_base ("", lpstart_encoding);
   if (lpstart_encoding != DW_EH_PE_omit)
     {
@@ -10711,7 +10711,7 @@ print_debug_exception_table (Dwfl_Module *dwflmod __attribute__ ((unused)),
   if (unlikely (readp + 1 > dataend))
     goto invalid_data;
   unsigned int ttype_encoding = *readp++;
-  printf (gettext (" TType encoding:      %#x "), ttype_encoding);
+  printf (_(" TType encoding:      %#x "), ttype_encoding);
   print_encoding_base ("", ttype_encoding);
   const unsigned char *ttype_base = NULL;
   if (ttype_encoding != DW_EH_PE_omit)
@@ -10726,7 +10726,7 @@ print_debug_exception_table (Dwfl_Module *dwflmod __attribute__ ((unused)),
   if (unlikely (readp + 1 > dataend))
     goto invalid_data;
   unsigned int call_site_encoding = *readp++;
-  printf (gettext (" Call site encoding:  %#x "), call_site_encoding);
+  printf (_(" Call site encoding:  %#x "), call_site_encoding);
   print_encoding_base ("", call_site_encoding);
   unsigned int call_site_table_len;
   get_uleb128 (call_site_table_len, readp, dataend);
@@ -10739,7 +10739,7 @@ print_debug_exception_table (Dwfl_Module *dwflmod __attribute__ ((unused)),
   while (readp < action_table)
     {
       if (u == 0)
-	puts (gettext ("\n Call site table:"));
+	puts (_("\n Call site table:"));
 
       uint64_t call_site_start;
       readp = read_encoded (call_site_encoding, readp, dataend,
@@ -10753,7 +10753,7 @@ print_debug_exception_table (Dwfl_Module *dwflmod __attribute__ ((unused)),
       unsigned int action;
       get_uleb128 (action, readp, dataend);
       max_action = MAX (action, max_action);
-      printf (gettext (" [%4u] Call site start:   %#" PRIx64 "\n"
+      printf (_(" [%4u] Call site start:   %#" PRIx64 "\n"
 		       "        Call site length:  %" PRIu64 "\n"
 		       "        Landing pad:       %#" PRIx64 "\n"
 		       "        Action:            %u\n"),
@@ -10771,7 +10771,7 @@ print_debug_exception_table (Dwfl_Module *dwflmod __attribute__ ((unused)),
       if (max_action > maxdata || maxdata - max_action < 1)
 	{
 	invalid_action_table:
-	  fputs (gettext ("   <INVALID DATA>\n"), stdout);
+	  fputs (_("   <INVALID DATA>\n"), stdout);
 	  return;
 	}
 
@@ -10826,7 +10826,7 @@ print_debug_exception_table (Dwfl_Module *dwflmod __attribute__ ((unused)),
 	  break;
 	default:
 	  dsize = 0;
-	  error (1, 0, gettext ("invalid TType encoding"));
+	  error (1, 0, _("invalid TType encoding"));
 	}
 
       if (max_ar_filter
@@ -10853,7 +10853,7 @@ print_gdb_index_section (Dwfl_Module *dwflmod, Ebl *ebl,
 			 GElf_Ehdr *ehdr __attribute__ ((unused)),
 			 Elf_Scn *scn, GElf_Shdr *shdr, Dwarf *dbg)
 {
-  printf (gettext ("\nGDB section [%2zu] '%s' at offset %#" PRIx64
+  printf (_("\nGDB section [%2zu] '%s' at offset %#" PRIx64
 		   " contains %" PRId64 " bytes :\n"),
 	  elf_ndxscn (scn), section_name (ebl, shdr),
 	  (uint64_t) shdr->sh_offset, (uint64_t) shdr->sh_size);
@@ -10862,7 +10862,7 @@ print_gdb_index_section (Dwfl_Module *dwflmod, Ebl *ebl,
 
   if (unlikely (data == NULL))
     {
-      error (0, 0, gettext ("cannot get %s content: %s"),
+      error (0, 0, _("cannot get %s content: %s"),
 	     ".gdb_index", elf_errmsg (-1));
       return;
     }
@@ -10877,12 +10877,12 @@ print_gdb_index_section (Dwfl_Module *dwflmod, Ebl *ebl,
   if (unlikely (readp + 4 > dataend))
     {
     invalid_data:
-      error (0, 0, gettext ("invalid data"));
+      error (0, 0, _("invalid data"));
       return;
     }
 
   int32_t vers = read_4ubyte_unaligned (dbg, readp);
-  printf (gettext (" Version:         %" PRId32 "\n"), vers);
+  printf (_(" Version:         %" PRId32 "\n"), vers);
 
   // The only difference between version 4 and version 5 is the
   // hash used for generating the table.  Version 6 contains symbols
@@ -10891,7 +10891,7 @@ print_gdb_index_section (Dwfl_Module *dwflmod, Ebl *ebl,
   // TUs for symbols.
   if (vers < 4 || vers > 8)
     {
-      printf (gettext ("  unknown version, cannot parse section\n"));
+      printf (_("  unknown version, cannot parse section\n"));
       return;
     }
 
@@ -10900,35 +10900,35 @@ print_gdb_index_section (Dwfl_Module *dwflmod, Ebl *ebl,
     goto invalid_data;
 
   uint32_t cu_off = read_4ubyte_unaligned (dbg, readp);
-  printf (gettext (" CU offset:       %#" PRIx32 "\n"), cu_off);
+  printf (_(" CU offset:       %#" PRIx32 "\n"), cu_off);
 
   readp += 4;
   if (unlikely (readp + 4 > dataend))
     goto invalid_data;
 
   uint32_t tu_off = read_4ubyte_unaligned (dbg, readp);
-  printf (gettext (" TU offset:       %#" PRIx32 "\n"), tu_off);
+  printf (_(" TU offset:       %#" PRIx32 "\n"), tu_off);
 
   readp += 4;
   if (unlikely (readp + 4 > dataend))
     goto invalid_data;
 
   uint32_t addr_off = read_4ubyte_unaligned (dbg, readp);
-  printf (gettext (" address offset:  %#" PRIx32 "\n"), addr_off);
+  printf (_(" address offset:  %#" PRIx32 "\n"), addr_off);
 
   readp += 4;
   if (unlikely (readp + 4 > dataend))
     goto invalid_data;
 
   uint32_t sym_off = read_4ubyte_unaligned (dbg, readp);
-  printf (gettext (" symbol offset:   %#" PRIx32 "\n"), sym_off);
+  printf (_(" symbol offset:   %#" PRIx32 "\n"), sym_off);
 
   readp += 4;
   if (unlikely (readp + 4 > dataend))
     goto invalid_data;
 
   uint32_t const_off = read_4ubyte_unaligned (dbg, readp);
-  printf (gettext (" constant offset: %#" PRIx32 "\n"), const_off);
+  printf (_(" constant offset: %#" PRIx32 "\n"), const_off);
 
   if (unlikely ((size_t) (dataend - (const unsigned char *) data->d_buf)
 		< const_off))
@@ -10942,7 +10942,7 @@ print_gdb_index_section (Dwfl_Module *dwflmod, Ebl *ebl,
 
   size_t cu_nr = (nextp - readp) / 16;
 
-  printf (gettext ("\n CU list at offset %#" PRIx32
+  printf (_("\n CU list at offset %#" PRIx32
 		   " contains %zu entries:\n"),
 	  cu_off, cu_nr);
 
@@ -10967,7 +10967,7 @@ print_gdb_index_section (Dwfl_Module *dwflmod, Ebl *ebl,
 
   size_t tu_nr = (nextp - readp) / 24;
 
-  printf (gettext ("\n TU list at offset %#" PRIx32
+  printf (_("\n TU list at offset %#" PRIx32
 		   " contains %zu entries:\n"),
 	  tu_off, tu_nr);
 
@@ -10996,7 +10996,7 @@ print_gdb_index_section (Dwfl_Module *dwflmod, Ebl *ebl,
 
   size_t addr_nr = (nextp - readp) / 20;
 
-  printf (gettext ("\n Address list at offset %#" PRIx32
+  printf (_("\n Address list at offset %#" PRIx32
 		   " contains %zu entries:\n"),
 	  addr_off, addr_nr);
 
@@ -11028,7 +11028,7 @@ print_gdb_index_section (Dwfl_Module *dwflmod, Ebl *ebl,
   nextp = const_start;
   size_t sym_nr = (nextp - readp) / 8;
 
-  printf (gettext ("\n Symbol table at offset %#" PRIx32
+  printf (_("\n Symbol table at offset %#" PRIx32
 		   " contains %zu slots:\n"),
 	  addr_off, sym_nr);
 
@@ -11166,7 +11166,7 @@ print_debug (Dwfl_Module *dwflmod, Ebl *ebl, GElf_Ehdr *ehdr)
   if (dbg == NULL)
     {
       if ((print_debug_sections & ~(section_exception|section_frame)) != 0)
-	error (0, 0, gettext ("cannot get debug context descriptor: %s"),
+	error (0, 0, _("cannot get debug context descriptor: %s"),
 	       dwfl_errmsg (-1));
       dbg = &dummy_dbg;
     }
@@ -11310,7 +11310,7 @@ print_debug (Dwfl_Module *dwflmod, Ebl *ebl, GElf_Ehdr *ehdr)
   size_t shstrndx;
   if (unlikely (elf_getshdrstrndx (ebl->elf, &shstrndx) < 0))
     error (EXIT_FAILURE, 0,
-	   gettext ("cannot get section header string table index"));
+	   _("cannot get section header string table index"));
 
   /* If the .debug_info section is listed as implicitly required then
      we must make sure to handle it before handling any other debug
@@ -11534,7 +11534,7 @@ convert (Elf *core, Elf_Type type, uint_fast16_t count,
     (&valuedata, &indata, elf_getident (core, NULL)[EI_DATA]);
   if (d == NULL)
     error (EXIT_FAILURE, 0,
-	   gettext ("cannot convert core note data: %s"), elf_errmsg (-1));
+	   _("cannot convert core note data: %s"), elf_errmsg (-1));
 
   return data + indata.d_size;
 }
@@ -11897,7 +11897,7 @@ handle_core_items (Elf *core, const void *desc, size_t descsz,
 	  descsz += eltsz;
 	}
       else if (reps > 1)
-	printf (gettext ("\n%*s... <repeats %u more times> ..."),
+	printf (_("\n%*s... <repeats %u more times> ..."),
 		ITEM_INDENT, "", reps);
 
       last = desc;
@@ -12156,7 +12156,7 @@ handle_auxv_note (Ebl *ebl, Elf *core, GElf_Word descsz, GElf_Off desc_pos)
   if (data == NULL)
   elf_error:
     error (EXIT_FAILURE, 0,
-	   gettext ("cannot convert core note data: %s"), elf_errmsg (-1));
+	   _("cannot convert core note data: %s"), elf_errmsg (-1));
 
   const size_t nauxv = descsz / gelf_fsize (core, ELF_T_AUXV, 1, EV_CURRENT);
   for (size_t i = 0; i < nauxv; ++i)
@@ -12267,7 +12267,7 @@ handle_siginfo_note (Elf *core, GElf_Word descsz, GElf_Off desc_pos)
   Elf_Data *data = elf_getdata_rawchunk (core, desc_pos, descsz, ELF_T_BYTE);
   if (data == NULL)
     error (EXIT_FAILURE, 0,
-	   gettext ("cannot convert core note data: %s"), elf_errmsg (-1));
+	   _("cannot convert core note data: %s"), elf_errmsg (-1));
 
   unsigned char const *ptr = data->d_buf;
   unsigned char const *const end = data->d_buf + data->d_size;
@@ -12325,7 +12325,7 @@ handle_file_note (Elf *core, GElf_Word descsz, GElf_Off desc_pos)
   Elf_Data *data = elf_getdata_rawchunk (core, desc_pos, descsz, ELF_T_BYTE);
   if (data == NULL)
     error (EXIT_FAILURE, 0,
-	   gettext ("cannot convert core note data: %s"), elf_errmsg (-1));
+	   _("cannot convert core note data: %s"), elf_errmsg (-1));
 
   unsigned char const *ptr = data->d_buf;
   unsigned char const *const end = data->d_buf + data->d_size;
@@ -12404,7 +12404,7 @@ static void
 handle_notes_data (Ebl *ebl, const GElf_Ehdr *ehdr,
 		   GElf_Off start, Elf_Data *data)
 {
-  fputs_unlocked (gettext ("  Owner          Data size  Type\n"), stdout);
+  fputs_unlocked (_("  Owner          Data size  Type\n"), stdout);
 
   if (data == NULL)
     goto bad_note;
@@ -12433,7 +12433,7 @@ handle_notes_data (Ebl *ebl, const GElf_Ehdr *ehdr,
 
       char buf[100];
       char buf2[100];
-      printf (gettext ("  %-13.*s  %9" PRId32 "  %s\n"),
+      printf (_("  %-13.*s  %9" PRId32 "  %s\n"),
 	      (int) print_namesz, print_name, nhdr.n_descsz,
 	      ehdr->e_type == ET_CORE
 	      ? ebl_core_note_type_name (ebl, nhdr.n_type,
@@ -12485,7 +12485,7 @@ handle_notes_data (Ebl *ebl, const GElf_Ehdr *ehdr,
 
  bad_note:
   error (0, 0,
-	 gettext ("cannot get content of note: %s"),
+	 _("cannot get content of note: %s"),
 	 data != NULL ? "garbage data" : elf_errmsg (-1));
 }
 
@@ -12500,7 +12500,7 @@ handle_notes (Ebl *ebl, GElf_Ehdr *ehdr)
       size_t shstrndx;
       if (elf_getshdrstrndx (ebl->elf, &shstrndx) < 0)
 	error (EXIT_FAILURE, 0,
-	       gettext ("cannot get section header string table index"));
+	       _("cannot get section header string table index"));
 
       Elf_Scn *scn = NULL;
       while ((scn = elf_nextscn (ebl->elf, scn)) != NULL)
@@ -12519,7 +12519,7 @@ handle_notes (Ebl *ebl, GElf_Ehdr *ehdr)
 		continue;
 	    }
 
-	  printf (gettext ("\
+	  printf (_("\
 \nNote section [%2zu] '%s' of %" PRIu64 " bytes at offset %#0" PRIx64 ":\n"),
 		  elf_ndxscn (scn),
 		  elf_strptr (ebl->elf, shstrndx, shdr->sh_name),
@@ -12542,7 +12542,7 @@ handle_notes (Ebl *ebl, GElf_Ehdr *ehdr)
 	/* Not what we are looking for.  */
 	continue;
 
-      printf (gettext ("\
+      printf (_("\
 \nNote segment of %" PRIu64 " bytes at offset %#0" PRIx64 ":\n"),
 	      phdr->p_filesz, phdr->p_offset);
 
@@ -12589,7 +12589,7 @@ static void
 dump_data_section (Elf_Scn *scn, const GElf_Shdr *shdr, const char *name)
 {
   if (shdr->sh_size == 0 || shdr->sh_type == SHT_NOBITS)
-    printf (gettext ("\nSection [%zu] '%s' has no data to dump.\n"),
+    printf (_("\nSection [%zu] '%s' has no data to dump.\n"),
 	    elf_ndxscn (scn), name);
   else
     {
@@ -12602,31 +12602,31 @@ dump_data_section (Elf_Scn *scn, const GElf_Shdr *shdr, const char *name)
 	    {
 	      if (elf_compress (scn, 0, 0) < 0)
 		printf ("WARNING: %s [%zd]\n",
-			gettext ("Couldn't uncompress section"),
+			_("Couldn't uncompress section"),
 			elf_ndxscn (scn));
 	    }
 	  else if (strncmp (name, ".zdebug", strlen (".zdebug")) == 0)
 	    {
 	      if (elf_compress_gnu (scn, 0, 0) < 0)
 		printf ("WARNING: %s [%zd]\n",
-			gettext ("Couldn't uncompress section"),
+			_("Couldn't uncompress section"),
 			elf_ndxscn (scn));
 	    }
 	}
 
       Elf_Data *data = elf_rawdata (scn, NULL);
       if (data == NULL)
-	error (0, 0, gettext ("cannot get data for section [%zu] '%s': %s"),
+	error (0, 0, _("cannot get data for section [%zu] '%s': %s"),
 	       elf_ndxscn (scn), name, elf_errmsg (-1));
       else
 	{
 	  if (data->d_size == shdr->sh_size)
-	    printf (gettext ("\nHex dump of section [%zu] '%s', %" PRIu64
+	    printf (_("\nHex dump of section [%zu] '%s', %" PRIu64
 			     " bytes at offset %#0" PRIx64 ":\n"),
 		    elf_ndxscn (scn), name,
 		    shdr->sh_size, shdr->sh_offset);
 	  else
-	    printf (gettext ("\nHex dump of section [%zu] '%s', %" PRIu64
+	    printf (_("\nHex dump of section [%zu] '%s', %" PRIu64
 			     " bytes (%zd uncompressed) at offset %#0"
 			     PRIx64 ":\n"),
 		    elf_ndxscn (scn), name,
@@ -12640,7 +12640,7 @@ static void
 print_string_section (Elf_Scn *scn, const GElf_Shdr *shdr, const char *name)
 {
   if (shdr->sh_size == 0 || shdr->sh_type == SHT_NOBITS)
-    printf (gettext ("\nSection [%zu] '%s' has no strings to dump.\n"),
+    printf (_("\nSection [%zu] '%s' has no strings to dump.\n"),
 	    elf_ndxscn (scn), name);
   else
     {
@@ -12653,31 +12653,31 @@ print_string_section (Elf_Scn *scn, const GElf_Shdr *shdr, const char *name)
 	    {
 	      if (elf_compress (scn, 0, 0) < 0)
 		printf ("WARNING: %s [%zd]\n",
-			gettext ("Couldn't uncompress section"),
+			_("Couldn't uncompress section"),
 			elf_ndxscn (scn));
 	    }
 	  else if (strncmp (name, ".zdebug", strlen (".zdebug")) == 0)
 	    {
 	      if (elf_compress_gnu (scn, 0, 0) < 0)
 		printf ("WARNING: %s [%zd]\n",
-			gettext ("Couldn't uncompress section"),
+			_("Couldn't uncompress section"),
 			elf_ndxscn (scn));
 	    }
 	}
 
       Elf_Data *data = elf_rawdata (scn, NULL);
       if (data == NULL)
-	error (0, 0, gettext ("cannot get data for section [%zu] '%s': %s"),
+	error (0, 0, _("cannot get data for section [%zu] '%s': %s"),
 	       elf_ndxscn (scn), name, elf_errmsg (-1));
       else
 	{
 	  if (data->d_size == shdr->sh_size)
-	    printf (gettext ("\nString section [%zu] '%s' contains %" PRIu64
+	    printf (_("\nString section [%zu] '%s' contains %" PRIu64
 			     " bytes at offset %#0" PRIx64 ":\n"),
 		    elf_ndxscn (scn), name,
 		    shdr->sh_size, shdr->sh_offset);
 	  else
-	    printf (gettext ("\nString section [%zu] '%s' contains %" PRIu64
+	    printf (_("\nString section [%zu] '%s' contains %" PRIu64
 			     " bytes (%zd uncompressed) at offset %#0"
 			     PRIx64 ":\n"),
 		    elf_ndxscn (scn), name,
@@ -12711,7 +12711,7 @@ for_each_section_argument (Elf *elf, const struct section_argument *list,
   size_t shstrndx;
   if (elf_getshdrstrndx (elf, &shstrndx) < 0)
     error (EXIT_FAILURE, 0,
-	   gettext ("cannot get section header string table index"));
+	   _("cannot get section header string table index"));
 
   for (const struct section_argument *a = list; a != NULL; a = a->next)
     {
@@ -12726,12 +12726,12 @@ for_each_section_argument (Elf *elf, const struct section_argument *list,
 	  scn = elf_getscn (elf, shndx);
 	  if (scn == NULL)
 	    {
-	      error (0, 0, gettext ("\nsection [%lu] does not exist"), shndx);
+	      error (0, 0, _("\nsection [%lu] does not exist"), shndx);
 	      continue;
 	    }
 
 	  if (gelf_getshdr (scn, &shdr_mem) == NULL)
-	    error (EXIT_FAILURE, 0, gettext ("cannot get section header: %s"),
+	    error (EXIT_FAILURE, 0, _("cannot get section header: %s"),
 		   elf_errmsg (-1));
 	  name = elf_strptr (elf, shstrndx, shdr_mem.sh_name);
 	  (*dump) (scn, &shdr_mem, name);
@@ -12756,7 +12756,7 @@ for_each_section_argument (Elf *elf, const struct section_argument *list,
 	    }
 
 	  if (unlikely (!found) && !a->implicit)
-	    error (0, 0, gettext ("\nsection '%s' does not exist"), a->arg);
+	    error (0, 0, _("\nsection '%s' does not exist"), a->arg);
 	}
     }
 }
@@ -12780,7 +12780,7 @@ print_strings (Ebl *ebl)
   size_t shstrndx;
   if (unlikely (elf_getshdrstrndx (ebl->elf, &shstrndx) < 0))
     error (EXIT_FAILURE, 0,
-	   gettext ("cannot get section header string table index"));
+	   _("cannot get section header string table index"));
 
   Elf_Scn *scn;
   GElf_Shdr shdr_mem;
@@ -12813,14 +12813,14 @@ dump_archive_index (Elf *elf, const char *fname)
       int result = elf_errno ();
       if (unlikely (result != ELF_E_NO_INDEX))
 	error (EXIT_FAILURE, 0,
-	       gettext ("cannot get symbol index of archive '%s': %s"),
+	       _("cannot get symbol index of archive '%s': %s"),
 	       fname, elf_errmsg (result));
       else
-	printf (gettext ("\nArchive '%s' has no symbol index\n"), fname);
+	printf (_("\nArchive '%s' has no symbol index\n"), fname);
       return;
     }
 
-  printf (gettext ("\nIndex of archive '%s' has %zu entries:\n"),
+  printf (_("\nIndex of archive '%s' has %zu entries:\n"),
 	  fname, narsym);
 
   size_t as_off = 0;
@@ -12838,12 +12838,12 @@ dump_archive_index (Elf *elf, const char *fname)
 	    while (1)
 #endif
 	      error (EXIT_FAILURE, 0,
-		     gettext ("cannot extract member at offset %zu in '%s': %s"),
+		     _("cannot extract member at offset %zu in '%s': %s"),
 		     as_off, fname, elf_errmsg (-1));
 
 	  const Elf_Arhdr *h = elf_getarhdr (subelf);
 
-	  printf (gettext ("Archive member '%s' contains:\n"), h->ar_name);
+	  printf (_("Archive member '%s' contains:\n"), h->ar_name);
 
 	  elf_end (subelf);
 	}
diff --git a/src/size.c b/src/size.c
index 9eeb83c1..322ff53e 100644
--- a/src/size.c
+++ b/src/size.c
@@ -102,7 +102,7 @@ static void handle_elf (Elf *elf, const char *fullname, const char *fname);
 static void show_bsd_totals (void);
 
 #define INTERNAL_ERROR(fname) \
-  error (EXIT_FAILURE, 0, gettext ("%s: INTERNAL ERROR %d (%s): %s"),      \
+  error (EXIT_FAILURE, 0, _("%s: INTERNAL ERROR %d (%s): %s"),      \
 	 fname, __LINE__, PACKAGE_VERSION, elf_errmsg (-1))
 
 
@@ -237,7 +237,7 @@ parse_opt (int key, char *arg,
       else if (likely (strcmp (arg, "sysv") == 0))
 	format = format_sysv;
       else
-	error (EXIT_FAILURE, 0, gettext ("Invalid format: %s"), arg);
+	error (EXIT_FAILURE, 0, _("Invalid format: %s"), arg);
       break;
 
     case OPT_RADIX:
@@ -248,7 +248,7 @@ parse_opt (int key, char *arg,
       else if (strcmp (arg, "o") == 0 || strcmp (arg, "8") == 0)
 	radix = radix_octal;
       else
-	error (EXIT_FAILURE, 0, gettext ("Invalid radix: %s"), arg);
+	error (EXIT_FAILURE, 0, _("Invalid radix: %s"), arg);
       break;
 
     case 't':
@@ -269,7 +269,7 @@ process_file (const char *fname)
   int fd = open (fname, O_RDONLY);
   if (unlikely (fd == -1))
     {
-      error (0, errno, gettext ("cannot open '%s'"), fname);
+      error (0, errno, _("cannot open '%s'"), fname);
       return 1;
     }
 
@@ -285,7 +285,7 @@ process_file (const char *fname)
 	    INTERNAL_ERROR (fname);
 
 	  if (unlikely (close (fd) != 0))
-	    error (EXIT_FAILURE, errno, gettext ("while closing '%s'"), fname);
+	    error (EXIT_FAILURE, errno, _("while closing '%s'"), fname);
 
 	  return 0;
 	}
@@ -294,7 +294,7 @@ process_file (const char *fname)
 	  int result = handle_ar (fd, elf, NULL, fname);
 
 	  if (unlikely  (close (fd) != 0))
-	    error (EXIT_FAILURE, errno, gettext ("while closing '%s'"), fname);
+	    error (EXIT_FAILURE, errno, _("while closing '%s'"), fname);
 
 	  return result;
 	}
@@ -305,9 +305,9 @@ process_file (const char *fname)
     }
 
   if (unlikely (close (fd) != 0))
-    error (EXIT_FAILURE, errno, gettext ("while closing '%s'"), fname);
+    error (EXIT_FAILURE, errno, _("while closing '%s'"), fname);
 
-  error (0, 0, gettext ("%s: file format not recognized"), fname);
+  error (0, 0, _("%s: file format not recognized"), fname);
 
   return 1;
 }
@@ -395,7 +395,7 @@ show_sysv (Elf *elf, const char *prefix, const char *fname,
   size_t shstrndx;
   if (unlikely (elf_getshdrstrndx (elf, &shstrndx) < 0))
     error (EXIT_FAILURE, 0,
-	   gettext ("cannot get section header string table index"));
+	   _("cannot get section header string table index"));
 
   /* First round over the sections: determine the longest section name.  */
   Elf_Scn *scn = NULL;
@@ -415,7 +415,7 @@ show_sysv (Elf *elf, const char *prefix, const char *fname,
 
   fputs_unlocked (fname, stdout);
   if (prefix != NULL)
-    printf (gettext (" (ex %s)"), prefix);
+    printf (_(" (ex %s)"), prefix);
   printf (":\n%-*s %*s %*s\n",
 	  maxlen, sgettext ("sysv|section"),
 	  digits - 2, sgettext ("sysv|size"),
@@ -467,7 +467,7 @@ show_sysv_one_line (Elf *elf)
   size_t shstrndx;
   if (unlikely (elf_getshdrstrndx (elf, &shstrndx) < 0))
     error (EXIT_FAILURE, 0,
-	   gettext ("cannot get section header string table index"));
+	   _("cannot get section header string table index"));
 
   /* Iterate over all sections.  */
   GElf_Off total = 0;
@@ -479,7 +479,7 @@ show_sysv_one_line (Elf *elf)
       GElf_Shdr *shdr = gelf_getshdr (scn, &shdr_mem);
 
       if (unlikely (shdr == NULL))
-	error (EXIT_FAILURE, 0, gettext ("cannot get section header"));
+	error (EXIT_FAILURE, 0, _("cannot get section header"));
 
       /* Ignore all sections which are not used at runtime.  */
       if ((shdr->sh_flags & SHF_ALLOC) == 0)
@@ -557,7 +557,7 @@ show_bsd (Elf *elf, const char *prefix, const char *fname,
 	  xdigits - 2, textsize + datasize + bsssize,
 	  fname);
   if (prefix != NULL)
-    printf (gettext (" (ex %s)"), prefix);
+    printf (_(" (ex %s)"), prefix);
   fputs_unlocked ("\n", stdout);
 
   total_textsize += textsize;
@@ -582,7 +582,7 @@ show_bsd_totals (void)
 	  ddigits - 2, total_bsssize,
 	  ddigits - 2, total_textsize + total_datasize + total_bsssize,
 	  xdigits - 2, total_textsize + total_datasize + total_bsssize,
-	  gettext ("(TOTALS)\n"));
+	  _("(TOTALS)\n"));
 }
 
 
diff --git a/src/strings.c b/src/strings.c
index f3d115c6..eb278f8e 100644
--- a/src/strings.c
+++ b/src/strings.c
@@ -182,7 +182,7 @@ main (int argc, char *argv[])
 		  ? STDIN_FILENO : open (argv[remaining], O_RDONLY));
 	if (unlikely (fd == -1))
 	  {
-	    error (0, errno, gettext ("cannot open '%s'"), argv[remaining]);
+	    error (0, errno, _("cannot open '%s'"), argv[remaining]);
 	    result = 1;
 	  }
 	else
@@ -253,7 +253,7 @@ parse_opt (int key, char *arg,
 	  break;
 
 	default:
-	  error (0, 0, gettext ("invalid value '%s' for %s parameter"),
+	  error (0, 0, _("invalid value '%s' for %s parameter"),
 		 arg, "-e");
 	  argp_help (&argp, stderr, ARGP_HELP_SEE, "strings");
 	  return ARGP_ERR_UNKNOWN;
@@ -288,7 +288,7 @@ parse_opt (int key, char *arg,
 	  break;
 
 	default:
-	  error (0, 0, gettext ("invalid value '%s' for %s parameter"),
+	  error (0, 0, _("invalid value '%s' for %s parameter"),
 		 arg, "-t");
 	  argp_help (&argp, stderr, ARGP_HELP_SEE, "strings");
 	  return ARGP_ERR_UNKNOWN;
@@ -299,7 +299,7 @@ parse_opt (int key, char *arg,
       /* Compute the length in bytes of any match.  */
       if (min_len <= 0 || min_len > INT_MAX / bytes_per_char)
 	error (EXIT_FAILURE, 0,
-	       gettext ("invalid minimum length of matched string size"));
+	       _("invalid minimum length of matched string size"));
       min_len_bytes = min_len * bytes_per_char;
       break;
 
@@ -582,7 +582,7 @@ read_block (int fd, const char *fname, off_t fdlen, off_t from, off_t to)
       // XXX Eventually add flag which avoids this if the position
       // XXX is known to match.
       if (from != 0 && lseek (fd, from, SEEK_SET) != from)
-	error (EXIT_FAILURE, errno, gettext ("lseek failed"));
+	error (EXIT_FAILURE, errno, _("lseek failed"));
 
       return read_block_no_mmap (fd, fname, from, to - from);
     }
@@ -599,7 +599,7 @@ read_block (int fd, const char *fname, off_t fdlen, off_t from, off_t to)
       if (mmap (elfmap, elfmap_size, PROT_READ,
 		MAP_PRIVATE | MAP_POPULATE | MAP_FIXED, fd, from)
 	  == MAP_FAILED)
-	error (EXIT_FAILURE, errno, gettext ("re-mmap failed"));
+	error (EXIT_FAILURE, errno, _("re-mmap failed"));
       elfmap_base = elfmap;
     }
 
@@ -636,7 +636,7 @@ read_block (int fd, const char *fname, off_t fdlen, off_t from, off_t to)
 	     and for this we have to make the data writable.  */
 	  if (unlikely (mprotect (elfmap, keep_area, PROT_READ | PROT_WRITE)
 			!= 0))
-	    error (EXIT_FAILURE, errno, gettext ("mprotect failed"));
+	    error (EXIT_FAILURE, errno, _("mprotect failed"));
 
 	  elfmap_base = elfmap + keep_area;
 	}
@@ -663,7 +663,7 @@ read_block (int fd, const char *fname, off_t fdlen, off_t from, off_t to)
 	  if (mmap (remap_base, read_now, PROT_READ,
 		    MAP_PRIVATE | MAP_POPULATE | MAP_FIXED, fd, handled_to)
 	      == MAP_FAILED)
-	    error (EXIT_FAILURE, errno, gettext ("re-mmap failed"));
+	    error (EXIT_FAILURE, errno, _("re-mmap failed"));
 	  elfmap_off = handled_to;
 
 	  process_chunk (fname, remap_base - to_keep,
@@ -725,7 +725,7 @@ read_elf (Elf *elf, int fd, const char *fname, off_t fdlen)
 	      else
 		sname = elf_strptr (elf, strndx, shdr->sh_name) ?: "<unknown>";
 	      error (0, 0,
-		     gettext ("Skipping section %zd '%s' data outside file"),
+		     _("Skipping section %zd '%s' data outside file"),
 		     elf_ndxscn (scn), sname);
 	      result = 1;
 	    }
diff --git a/src/strip.c b/src/strip.c
index d211cde6..7ce14ab8 100644
--- a/src/strip.c
+++ b/src/strip.c
@@ -130,7 +130,7 @@ static void cleanup_debug (void);
 #define INTERNAL_ERROR(fname) \
   do { \
     cleanup_debug (); \
-    error (EXIT_FAILURE, 0, gettext ("%s: INTERNAL ERROR %d (%s): %s"),      \
+    error (EXIT_FAILURE, 0, _("%s: INTERNAL ERROR %d (%s): %s"),      \
 	   fname, __LINE__, PACKAGE_VERSION, elf_errmsg (-1)); \
   } while (0)
 
@@ -244,13 +244,13 @@ main (int argc, char *argv[])
 
   if (reloc_debug && debug_fname == NULL)
     error (EXIT_FAILURE, 0,
-	   gettext ("--reloc-debug-sections used without -f"));
+	   _("--reloc-debug-sections used without -f"));
 
   if (reloc_debug_only &&
       (debug_fname != NULL || remove_secs != NULL
        || remove_comment == true || remove_debug == true))
     error (EXIT_FAILURE, 0,
-	   gettext ("--reloc-debug-sections-only incompatible with -f, -g, --remove-comment and --remove-section"));
+	   _("--reloc-debug-sections-only incompatible with -f, -g, --remove-comment and --remove-section"));
 
   /* Tell the library which version we are expecting.  */
   elf_version (EV_CURRENT);
@@ -264,7 +264,7 @@ main (int argc, char *argv[])
 	 input file.  */
       if ((output_fname != NULL || debug_fname != NULL)
 	  && remaining + 1 < argc)
-	error (EXIT_FAILURE, 0, gettext ("\
+	error (EXIT_FAILURE, 0, _("\
 Only one input file allowed together with '-o' and '-f'"));
 
       /* Process all the remaining files.  */
@@ -287,7 +287,7 @@ parse_opt (int key, char *arg, struct argp_state *state)
     case 'f':
       if (debug_fname != NULL)
 	{
-	  error (0, 0, gettext ("-f option specified twice"));
+	  error (0, 0, _("-f option specified twice"));
 	  return EINVAL;
 	}
       debug_fname = arg;
@@ -296,7 +296,7 @@ parse_opt (int key, char *arg, struct argp_state *state)
     case 'F':
       if (debug_fname_embed != NULL)
 	{
-	  error (0, 0, gettext ("-F option specified twice"));
+	  error (0, 0, _("-F option specified twice"));
 	  return EINVAL;
 	}
       debug_fname_embed = arg;
@@ -305,7 +305,7 @@ parse_opt (int key, char *arg, struct argp_state *state)
     case 'o':
       if (output_fname != NULL)
 	{
-	  error (0, 0, gettext ("-o option specified twice"));
+	  error (0, 0, _("-o option specified twice"));
 	  return EINVAL;
 	}
       output_fname = arg;
@@ -359,7 +359,7 @@ parse_opt (int key, char *arg, struct argp_state *state)
 	  && section_name_matches (keep_secs, ".comment"))
 	{
 	  argp_error (state,
-		      gettext ("cannot both keep and remove .comment section"));
+		      _("cannot both keep and remove .comment section"));
 	  return EINVAL;
 	}
       break;
@@ -571,7 +571,7 @@ remove_debug_relocations (Ebl *ebl, Elf *elf, GElf_Ehdr *ehdr,
 		    || tdata->d_size - offset < size)
 		  {
 		    cleanup_debug ();
-		    error (EXIT_FAILURE, 0, gettext ("bad relocation"));
+		    error (EXIT_FAILURE, 0, _("bad relocation"));
 		  }
 
 		/* When the symbol value is zero then for SHT_REL
@@ -723,7 +723,7 @@ process_file (const char *fname)
     {
       if (stat (fname, &pre_st) != 0)
 	{
-	  error (0, errno, gettext ("cannot stat input file '%s'"), fname);
+	  error (0, errno, _("cannot stat input file '%s'"), fname);
 	  return 1;
 	}
 
@@ -737,7 +737,7 @@ process_file (const char *fname)
   int fd = open (fname, output_fname == NULL ? O_RDWR : O_RDONLY);
   if (fd == -1)
     {
-      error (0, errno, gettext ("while opening '%s'"), fname);
+      error (0, errno, _("while opening '%s'"), fname);
       return 1;
     }
 
@@ -747,7 +747,7 @@ process_file (const char *fname)
   struct stat st;
   if (fstat (fd, &st) != 0)
     {
-      error (0, errno, gettext ("cannot stat input file '%s'"), fname);
+      error (0, errno, _("cannot stat input file '%s'"), fname);
       return 1;
     }
   /* Paranoid mode on.  */
@@ -775,7 +775,7 @@ process_file (const char *fname)
 	 the output to a specific file.  */
       if (unlikely (output_fname != NULL || debug_fname != NULL))
 	{
-	  error (0, 0, gettext ("%s: cannot use -o or -f when stripping archive"),
+	  error (0, 0, _("%s: cannot use -o or -f when stripping archive"),
 		 fname);
 	  result = 1;
 	}
@@ -787,14 +787,14 @@ process_file (const char *fname)
 	     result = handle_ar (fd, elf, NULL, fname,
 				 preserve_dates ? tv : NULL);
 	   */
-	  error (0, 0, gettext ("%s: no support for stripping archive"),
+	  error (0, 0, _("%s: no support for stripping archive"),
 		 fname);
 	  result = 1;
 	}
       break;
 
     default:
-      error (0, 0, gettext ("%s: File format not recognized"), fname);
+      error (0, 0, _("%s: File format not recognized"), fname);
       result = 1;
       break;
     }
@@ -981,7 +981,7 @@ handle_elf (int fd, Elf *elf, const char *prefix, const char *fname,
       fd = open (output_fname, O_RDWR | O_CREAT, mode);
       if (unlikely (fd == -1))
 	{
-	  error (0, errno, gettext ("cannot open '%s'"), output_fname);
+	  error (0, errno, _("cannot open '%s'"), output_fname);
 	  return 1;
 	}
     }
@@ -998,7 +998,7 @@ handle_elf (int fd, Elf *elf, const char *prefix, const char *fname,
       ebl = ebl_openbackend (elf);
       if (ebl == NULL)
 	{
-	  error (0, errno, gettext ("cannot open EBL backend"));
+	  error (0, errno, _("cannot open EBL backend"));
 	  result = 1;
 	  goto fail;
 	}
@@ -1018,7 +1018,7 @@ handle_elf (int fd, Elf *elf, const char *prefix, const char *fname,
       debug_fd = mkstemp (tmp_debug_fname);
       if (unlikely (debug_fd == -1))
 	{
-	  error (0, errno, gettext ("cannot open '%s'"), debug_fname);
+	  error (0, errno, _("cannot open '%s'"), debug_fname);
 	  result = 1;
 	  goto fail;
 	}
@@ -1035,7 +1035,7 @@ handle_elf (int fd, Elf *elf, const char *prefix, const char *fname,
     {
       cleanup_debug ();
       error (EXIT_FAILURE, 0,
-	     gettext ("cannot get section header string table index"));
+	     _("cannot get section header string table index"));
     }
 
   /* Get the number of phdrs in the old file.  */
@@ -1043,7 +1043,7 @@ handle_elf (int fd, Elf *elf, const char *prefix, const char *fname,
   if (elf_getphdrnum (elf, &phnum) != 0)
     {
       cleanup_debug ();
-      error (EXIT_FAILURE, 0, gettext ("cannot get number of phdrs"));
+      error (EXIT_FAILURE, 0, _("cannot get number of phdrs"));
     }
 
   /* We now create a new ELF descriptor for the same file.  We
@@ -1057,7 +1057,7 @@ handle_elf (int fd, Elf *elf, const char *prefix, const char *fname,
 
   if (unlikely (gelf_newehdr (newelf, gelf_getclass (elf)) == 0))
     {
-      error (0, 0, gettext ("cannot create new ehdr for file '%s': %s"),
+      error (0, 0, _("cannot create new ehdr for file '%s': %s"),
 	     output_fname ?: fname, elf_errmsg (-1));
       goto fail;
     }
@@ -1067,7 +1067,7 @@ handle_elf (int fd, Elf *elf, const char *prefix, const char *fname,
     {
       if (unlikely (gelf_newphdr (newelf, phnum) == 0))
 	{
-	  error (0, 0, gettext ("cannot create new phdr for file '%s': %s"),
+	  error (0, 0, _("cannot create new phdr for file '%s': %s"),
 		 output_fname ?: fname, elf_errmsg (-1));
 	  goto fail;
 	}
@@ -1100,7 +1100,7 @@ handle_elf (int fd, Elf *elf, const char *prefix, const char *fname,
       debugelf = elf_begin (debug_fd, ELF_C_WRITE, NULL);
       if (unlikely (gelf_newehdr (debugelf, gelf_getclass (elf)) == 0))
 	{
-	  error (0, 0, gettext ("cannot create new ehdr for file '%s': %s"),
+	  error (0, 0, _("cannot create new ehdr for file '%s': %s"),
 		 debug_fname, elf_errmsg (-1));
 	  goto fail_close;
 	}
@@ -1110,7 +1110,7 @@ handle_elf (int fd, Elf *elf, const char *prefix, const char *fname,
 	{
 	  if (unlikely (gelf_newphdr (debugelf, phnum) == 0))
 	    {
-	      error (0, 0, gettext ("cannot create new phdr for file '%s': %s"),
+	      error (0, 0, _("cannot create new phdr for file '%s': %s"),
 		     debug_fname, elf_errmsg (-1));
 	      goto fail_close;
 	    }
@@ -1130,7 +1130,7 @@ handle_elf (int fd, Elf *elf, const char *prefix, const char *fname,
   size_t shnum;
   if (unlikely (elf_getshdrnum (elf, &shnum) < 0))
     {
-      error (0, 0, gettext ("cannot determine number of sections: %s"),
+      error (0, 0, _("cannot determine number of sections: %s"),
 	     elf_errmsg (-1));
       goto fail_close;
     }
@@ -1191,7 +1191,7 @@ handle_elf (int fd, Elf *elf, const char *prefix, const char *fname,
       if (shdr_info[cnt].name == NULL)
 	{
 	illformed:
-	  error (0, 0, gettext ("illformed file '%s'"), fname);
+	  error (0, 0, _("illformed file '%s'"), fname);
 	  goto fail_close;
 	}
 
@@ -1201,7 +1201,7 @@ handle_elf (int fd, Elf *elf, const char *prefix, const char *fname,
 	  if ((shdr_info[cnt].shdr.sh_flags & SHF_ALLOC) != 0)
 	    {
 	      error (0, 0,
-		     gettext ("Cannot remove allocated section '%s'"),
+		     _("Cannot remove allocated section '%s'"),
 		     shdr_info[cnt].name);
 	      result = 1;
 	      goto fail_close;
@@ -1210,7 +1210,7 @@ handle_elf (int fd, Elf *elf, const char *prefix, const char *fname,
 	  if (section_name_matches (keep_secs, shdr_info[cnt].name))
 	    {
 	      error (0, 0,
-		     gettext ("Cannot both keep and remove section '%s'"),
+		     _("Cannot both keep and remove section '%s'"),
 		     shdr_info[cnt].name);
 	      result = 1;
 	      goto fail_close;
@@ -1570,7 +1570,7 @@ handle_elf (int fd, Elf *elf, const char *prefix, const char *fname,
 	    {
 	      cleanup_debug ();
 	      error (EXIT_FAILURE, 0,
-		     gettext ("while generating output file: %s"),
+		     _("while generating output file: %s"),
 		     elf_errmsg (-1));
 	    }
 
@@ -1634,7 +1634,7 @@ handle_elf (int fd, Elf *elf, const char *prefix, const char *fname,
 
       if (unlikely (gelf_update_ehdr (debugelf, debugehdr) == 0))
 	{
-	  error (0, 0, gettext ("%s: error while updating ELF header: %s"),
+	  error (0, 0, _("%s: error while updating ELF header: %s"),
 		 debug_fname, elf_errmsg (-1));
 	  result = 1;
 	  goto fail_close;
@@ -1643,7 +1643,7 @@ handle_elf (int fd, Elf *elf, const char *prefix, const char *fname,
       size_t shdrstrndx;
       if (elf_getshdrstrndx (elf, &shdrstrndx) < 0)
 	{
-	  error (0, 0, gettext ("%s: error while getting shdrstrndx: %s"),
+	  error (0, 0, _("%s: error while getting shdrstrndx: %s"),
 		 fname, elf_errmsg (-1));
 	  result = 1;
 	  goto fail_close;
@@ -1651,7 +1651,7 @@ handle_elf (int fd, Elf *elf, const char *prefix, const char *fname,
 
       if (update_shdrstrndx (debugelf, shdrstrndx) != 0)
 	{
-	  error (0, 0, gettext ("%s: error updating shdrstrndx: %s"),
+	  error (0, 0, _("%s: error updating shdrstrndx: %s"),
 		 debug_fname, elf_errmsg (-1));
 	  result = 1;
 	  goto fail_close;
@@ -1668,7 +1668,7 @@ handle_elf (int fd, Elf *elf, const char *prefix, const char *fname,
   if (shst == NULL)
     {
       cleanup_debug ();
-      error (EXIT_FAILURE, errno, gettext ("while preparing output for '%s'"),
+      error (EXIT_FAILURE, errno, _("while preparing output for '%s'"),
 	     output_fname ?: fname);
     }
 
@@ -1685,7 +1685,7 @@ handle_elf (int fd, Elf *elf, const char *prefix, const char *fname,
 	  {
 	    cleanup_debug ();
 	    error (EXIT_FAILURE, 0,
-		   gettext ("while generating output file: %s"),
+		   _("while generating output file: %s"),
 		   elf_errmsg (-1));
 	  }
 
@@ -1730,7 +1730,7 @@ handle_elf (int fd, Elf *elf, const char *prefix, const char *fname,
 	{
 	  cleanup_debug ();
 	  error (EXIT_FAILURE, 0,
-		 gettext ("while create section header section: %s"),
+		 _("while create section header section: %s"),
 		 elf_errmsg (-1));
 	}
       elf_assert (elf_ndxscn (shdr_info[cnt].newscn) == shdr_info[cnt].idx);
@@ -1739,7 +1739,7 @@ handle_elf (int fd, Elf *elf, const char *prefix, const char *fname,
       if (shdr_info[cnt].data == NULL)
 	{
 	  cleanup_debug ();
-	  error (EXIT_FAILURE, 0, gettext ("cannot allocate section data: %s"),
+	  error (EXIT_FAILURE, 0, _("cannot allocate section data: %s"),
 		 elf_errmsg (-1));
 	}
 
@@ -1793,7 +1793,7 @@ handle_elf (int fd, Elf *elf, const char *prefix, const char *fname,
     {
       cleanup_debug ();
       error (EXIT_FAILURE, 0,
-	     gettext ("while create section header section: %s"),
+	     _("while create section header section: %s"),
 	     elf_errmsg (-1));
     }
   elf_assert (elf_ndxscn (shdr_info[cnt].newscn) == idx);
@@ -1805,14 +1805,14 @@ handle_elf (int fd, Elf *elf, const char *prefix, const char *fname,
     {
       cleanup_debug ();
       error (EXIT_FAILURE, 0,
-	     gettext ("while create section header string table: %s"),
+	     _("while create section header string table: %s"),
 	     elf_errmsg (-1));
     }
   if (dwelf_strtab_finalize (shst, shstrtab_data) == NULL)
     {
       cleanup_debug ();
       error (EXIT_FAILURE, 0,
-	     gettext ("no memory to create section header string table"));
+	     _("no memory to create section header string table"));
     }
 
   /* We have to set the section size.  */
@@ -2025,7 +2025,7 @@ handle_elf (int fd, Elf *elf, const char *prefix, const char *fname,
 			   sections.  Just warn and set the symbol
 			   section to UNDEF.  */
 			error (0, 0,
-			       gettext ("Cannot remove symbol [%zd] from allocated symbol table [%zd]"), inner, cnt);
+			       _("Cannot remove symbol [%zd] from allocated symbol table [%zd]"), inner, cnt);
 			sym->st_shndx = SHN_UNDEF;
 			if (gelf_update_sym (shdr_info[cnt].data, destidx,
 					     sym) == 0)
@@ -2448,7 +2448,7 @@ handle_elf (int fd, Elf *elf, const char *prefix, const char *fname,
       /* Finally write the file.  */
       if (unlikely (elf_update (debugelf, ELF_C_WRITE) == -1))
 	{
-	  error (0, 0, gettext ("while writing '%s': %s"),
+	  error (0, 0, _("while writing '%s': %s"),
 		 tmp_debug_fname, elf_errmsg (-1));
 	  result = 1;
 	  goto fail_close;
@@ -2459,7 +2459,7 @@ handle_elf (int fd, Elf *elf, const char *prefix, const char *fname,
       if (rename (tmp_debug_fname, debug_fname) != 0
 	  || fchmod (debug_fd, mode) != 0)
 	{
-	  error (0, errno, gettext ("while creating '%s'"), debug_fname);
+	  error (0, errno, _("while creating '%s'"), debug_fname);
 	  result = 1;
 	  goto fail_close;
 	}
@@ -2482,7 +2482,7 @@ handle_elf (int fd, Elf *elf, const char *prefix, const char *fname,
 	  /* Compute the checksum which we will add to the executable.  */
 	  if (crc32_file (debug_fd, &debug_crc) != 0)
 	    {
-	      error (0, errno, gettext ("\
+	      error (0, errno, _("\
 while computing checksum for debug information"));
 	      unlink (debug_fname);
 	      result = 1;
@@ -2523,7 +2523,7 @@ while computing checksum for debug information"));
 
   if (gelf_update_ehdr (newelf, newehdr) == 0)
     {
-      error (0, 0, gettext ("%s: error while creating ELF header: %s"),
+      error (0, 0, _("%s: error while creating ELF header: %s"),
 	     output_fname ?: fname, elf_errmsg (-1));
       cleanup_debug ();
       return 1;
@@ -2532,7 +2532,7 @@ while computing checksum for debug information"));
   /* The new section header string table index.  */
   if (update_shdrstrndx (newelf, idx) != 0)
     {
-      error (0, 0, gettext ("%s: error updating shdrstrndx: %s"),
+      error (0, 0, _("%s: error updating shdrstrndx: %s"),
 	     output_fname ?: fname, elf_errmsg (-1));
       cleanup_debug ();
       return 1;
@@ -2541,7 +2541,7 @@ while computing checksum for debug information"));
   /* We have everything from the old file.  */
   if (elf_cntl (elf, ELF_C_FDDONE) != 0)
     {
-      error (0, 0, gettext ("%s: error while reading the file: %s"),
+      error (0, 0, _("%s: error while reading the file: %s"),
 	     fname, elf_errmsg (-1));
       cleanup_debug ();
       return 1;
@@ -2556,7 +2556,7 @@ while computing checksum for debug information"));
   /* Finally write the file.  */
   if (elf_update (newelf, ELF_C_WRITE) == -1)
     {
-      error (0, 0, gettext ("while writing '%s': %s"),
+      error (0, 0, _("while writing '%s': %s"),
 	     output_fname ?: fname, elf_errmsg (-1));
       result = 1;
     }
@@ -2581,7 +2581,7 @@ while computing checksum for debug information"));
 		  != sizeof zero)
 	      || ftruncate (fd, lastsec_offset) < 0)
 	    {
-	      error (0, errno, gettext ("while writing '%s'"),
+	      error (0, errno, _("while writing '%s'"),
 		     output_fname ?: fname);
 	      result = 1;
 	    }
@@ -2601,7 +2601,7 @@ while computing checksum for debug information"));
 		  != sizeof zero)
 	      || ftruncate (fd, lastsec_offset) < 0)
 	    {
-	      error (0, errno, gettext ("while writing '%s'"),
+	      error (0, errno, _("while writing '%s'"),
 		     output_fname ?: fname);
 	      result = 1;
 	    }
@@ -2638,14 +2638,14 @@ while computing checksum for debug information"));
   /* That was it.  Close the descriptors.  */
   if (elf_end (newelf) != 0)
     {
-      error (0, 0, gettext ("error while finishing '%s': %s"),
+      error (0, 0, _("error while finishing '%s': %s"),
 	     output_fname ?: fname, elf_errmsg (-1));
       result = 1;
     }
 
   if (debugelf != NULL && elf_end (debugelf) != 0)
     {
-      error (0, 0, gettext ("error while finishing '%s': %s"), debug_fname,
+      error (0, 0, _("error while finishing '%s': %s"), debug_fname,
 	     elf_errmsg (-1));
       result = 1;
     }
@@ -2662,7 +2662,7 @@ while computing checksum for debug information"));
     {
       if (futimens (fd, tvp) != 0)
 	{
-	  error (0, errno, gettext ("\
+	  error (0, errno, _("\
 cannot set access and modification date of '%s'"),
 		 output_fname ?: fname);
 	  result = 1;
@@ -2738,14 +2738,14 @@ handle_ar (int fd, Elf *elf, const char *prefix, const char *fname,
     {
       if (unlikely (futimens (fd, tvp) != 0))
 	{
-	  error (0, errno, gettext ("\
+	  error (0, errno, _("\
 cannot set access and modification date of '%s'"), fname);
 	  result = 1;
 	}
     }
 
   if (unlikely (close (fd) != 0))
-    error (EXIT_FAILURE, errno, gettext ("while closing '%s'"), fname);
+    error (EXIT_FAILURE, errno, _("while closing '%s'"), fname);
 
   return result;
 }
-- 
ldv


More information about the Elfutils-devel mailing list