[RESEND PATCH 1/1] Mach-O: i18n enablement on some error messages

Tsukasa OI research_trasio@irq.a4lg.com
Sun Aug 7 07:40:42 GMT 2022


This commit now wraps two string literals with _() for i18n support
enablement.  They are used in the collect_16char_name function to form
localized error messages that contain "%s name".

gas/ChangeLog:

	* config/obj-macho.c (obj_mach_o_get_section_names): Wrap two
	string literals within with gettext macro.
---
 gas/config/obj-macho.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gas/config/obj-macho.c b/gas/config/obj-macho.c
index f055aeadafb..119f2fd1356 100644
--- a/gas/config/obj-macho.c
+++ b/gas/config/obj-macho.c
@@ -141,7 +141,7 @@ obj_mach_o_get_section_names (char *seg, char *sec,
   /* Zero-length segment and section names are allowed.  */
   /* Parse segment name.  */
   memset (seg, 0, segl);
-  if (collect_16char_name (seg, "segment", 1))
+  if (collect_16char_name (seg, _("segment"), 1))
     {
       ignore_rest_of_line ();
       return 0;
@@ -150,7 +150,7 @@ obj_mach_o_get_section_names (char *seg, char *sec,
 
   /* Parse section name, which can be empty.  */
   memset (sec, 0, secl);
-  collect_16char_name (sec, "section", 0);
+  collect_16char_name (sec, _("section"), 0);
   return 1;
 }
 
-- 
2.34.1



More information about the Binutils mailing list