From: Sachin Monga Date: Mon, 12 Jan 2026 17:40:15 +0000 (-0500) Subject: ldbl-128ibm-compat: Add local aliases for printf family symbols X-Git-Tag: glibc-2.43~35 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f05ab7c4a99bc24764580d0d0c7f9b9c7ae2afa1;p=thirdparty%2Fglibc.git ldbl-128ibm-compat: Add local aliases for printf family symbols When the compiler selects IEEE-128 long double ABI(-mabi=ieeelongdouble), calls to printf, fprintf, sprintf and snprintf are redirected to the __printfieee128, __fprintfieee128, __sprintfieee128 and __snprintfieee128 symbols respectively. This causes "break printf" (and others) in GDB to fail because the original symbol names do not exist as global symbols in libc.so.6. Fix this by adding local symbol aliases in the ieee128 compatibility files so that the original symbol names are present in the symbol table again. This restores the expected GDB behavior ("break printf" works) without requiring dynamic symbols or versioned compatibility symbols. Suggested-by: Adhemerval Zanella --- diff --git a/sysdeps/ieee754/ldbl-128ibm-compat/ieee128-fprintf.c b/sysdeps/ieee754/ldbl-128ibm-compat/ieee128-fprintf.c index 1a2d6646b2..52260a2a54 100644 --- a/sysdeps/ieee754/ldbl-128ibm-compat/ieee128-fprintf.c +++ b/sysdeps/ieee754/ldbl-128ibm-compat/ieee128-fprintf.c @@ -33,3 +33,4 @@ ___ieee128_fprintf (FILE *fp, const char *format, ...) } strong_alias (___ieee128_fprintf, __fprintfieee128) hidden_def (___ieee128_fprintf) +asm (".local fprintf\n" ".set fprintf, __fprintfieee128"); diff --git a/sysdeps/ieee754/ldbl-128ibm-compat/ieee128-printf.c b/sysdeps/ieee754/ldbl-128ibm-compat/ieee128-printf.c index 4c5bbaf601..3e180ae2b9 100644 --- a/sysdeps/ieee754/ldbl-128ibm-compat/ieee128-printf.c +++ b/sysdeps/ieee754/ldbl-128ibm-compat/ieee128-printf.c @@ -33,3 +33,4 @@ ___ieee128_printf (const char *format, ...) return done; } strong_alias (___ieee128_printf, __printfieee128) +asm (".local printf\n" ".set printf, __printfieee128"); diff --git a/sysdeps/ieee754/ldbl-128ibm-compat/ieee128-snprintf.c b/sysdeps/ieee754/ldbl-128ibm-compat/ieee128-snprintf.c index 82d2bc1f1d..1aeaca86a7 100644 --- a/sysdeps/ieee754/ldbl-128ibm-compat/ieee128-snprintf.c +++ b/sysdeps/ieee754/ldbl-128ibm-compat/ieee128-snprintf.c @@ -37,3 +37,4 @@ ldbl_hidden_def (___ieee128_snprintf, ___ieee128_snprintf) #ifdef SHARED strong_alias (___ieee128_snprintf, __GI____ieee128___snprintf) #endif +asm (".local snprintf\n" ".set snprintf, __snprintfieee128"); diff --git a/sysdeps/ieee754/ldbl-128ibm-compat/ieee128-sprintf.c b/sysdeps/ieee754/ldbl-128ibm-compat/ieee128-sprintf.c index 4ac35134e9..7683d69352 100644 --- a/sysdeps/ieee754/ldbl-128ibm-compat/ieee128-sprintf.c +++ b/sysdeps/ieee754/ldbl-128ibm-compat/ieee128-sprintf.c @@ -34,3 +34,4 @@ ___ieee128_sprintf (char *s, const char *format, ...) } strong_alias (___ieee128_sprintf, __sprintfieee128) hidden_def (___ieee128_sprintf) +asm (".local sprintf\n" ".set sprintf, __sprintfieee128");