public inbox for glibc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Adhemerval Zanella <azanella@sourceware.org>
To: glibc-cvs@sourceware.org
Subject: [glibc/azanella/clang] string: Use asm alias instead of symbol redirections for stpcpy and mempcpy
Date: Tue, 28 Oct 2025 17:08:53 +0000 (GMT)	[thread overview]
Message-ID: <20251028170853.2B63A385842F@sourceware.org> (raw)

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=340ad390eb56d88ca54ae56bc7362505197128b6

commit 340ad390eb56d88ca54ae56bc7362505197128b6
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Tue Mar 15 08:41:43 2022 -0300

    string: Use asm alias instead of symbol redirections for stpcpy and mempcpy
    
    Commit 939da411433 added symbols redirections to handle ISO C
    namespace, however clang do not support to redeclare the function
    prototype.
    
    This patch replaces the symbol redirections by direct asm aliases, as
    done to handle libcall generation done by compiler on some loop
    optimizations.
    
    Checked on all affected ABIs.

Diff:
---
 include/string.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/string.h b/include/string.h
index c26ca0927c..2ea212a401 100644
--- a/include/string.h
+++ b/include/string.h
@@ -188,8 +188,8 @@ extern __typeof (strsep) strsep attribute_hidden;
   && !defined NO_MEMPCPY_STPCPY_REDIRECT
 /* Redirect calls to __builtin_mempcpy and __builtin_stpcpy to call
    __mempcpy and __stpcpy if not inlined.  */
-extern __typeof (mempcpy) mempcpy __asm__ ("__mempcpy");
-extern __typeof (stpcpy) stpcpy __asm__ ("__stpcpy");
+__asm__ ("mempcpy = __mempcpy");
+__asm__ ("stpcpy = __stpcpy");
 #endif
 
 extern void *__memcpy_chk (void *__restrict __dest,

             reply	other threads:[~2025-10-28 17:08 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-28 17:08 Adhemerval Zanella [this message]
  -- strict thread matches above, loose matches on Subject: below --
2025-10-17 19:12 Adhemerval Zanella
2025-04-10 18:13 Adhemerval Zanella
2025-03-25 20:21 Adhemerval Zanella
2024-04-17 20:06 Adhemerval Zanella
2024-04-02 15:52 Adhemerval Zanella
2024-02-09 17:31 Adhemerval Zanella
2024-02-07 14:06 Adhemerval Zanella
2024-01-29 17:56 Adhemerval Zanella
2023-12-21 18:53 Adhemerval Zanella
2023-09-28 17:51 Adhemerval Zanella
2023-08-30 12:36 Adhemerval Zanella
2023-02-09 19:48 Adhemerval Zanella
2022-10-28 17:41 Adhemerval Zanella
2022-10-04 12:59 Adhemerval Zanella
2022-06-09 21:20 Adhemerval Zanella
2022-06-09 13:17 Adhemerval Zanella
2022-06-03 14:06 Adhemerval Zanella
2022-05-13 14:20 Adhemerval Zanella
2022-05-12 19:34 Adhemerval Zanella
2022-05-10 18:24 Adhemerval Zanella
2022-04-29 14:04 Adhemerval Zanella
2022-04-04 12:54 Adhemerval Zanella
2022-03-31 19:07 Adhemerval Zanella
2022-03-29 20:30 Adhemerval Zanella
2022-03-16 18:04 Adhemerval Zanella

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20251028170853.2B63A385842F@sourceware.org \
    --to=azanella@sourceware.org \
    --cc=glibc-cvs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).