From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1791) id 3EB9E3858422; Mon, 29 Jan 2024 18:02:27 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3EB9E3858422 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1706551347; bh=JfggCvXP30W6K6P7LADiGcaaEE4UUukQQvx/XbxnSAE=; h=From:To:Subject:Date:From; b=e9r3kiJH84u4mbfUHiyQ5JZ43aBMpwMn4yOJXyA6R6JYwFA9kB/k9ol2LFOEtk3i9 sKXVXgi+ht8fRLP3SwtkKlzE5CGmmfA9eyAHPcF1JIpvVGyI4EwTo//SprOcBVCYOn rVJyZhD9cnIJHrGndK8mIymwpDt6tTEqEgoJbPSM= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Adhemerval Zanella To: glibc-cvs@sourceware.org Subject: [glibc/azanella/clang] string: mempcy and stpcpy builtins internally X-Act-Checkin: glibc X-Git-Author: Adhemerval Zanella X-Git-Refname: refs/heads/azanella/clang X-Git-Oldrev: 3601da7517680e04153361abd5db443f437e0658 X-Git-Newrev: 0dd51b6b2369d2be36918fec5e58a8c45148baef Message-Id: <20240129180227.3EB9E3858422@sourceware.org> Date: Mon, 29 Jan 2024 18:02:27 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=0dd51b6b2369d2be36918fec5e58a8c45148baef commit 0dd51b6b2369d2be36918fec5e58a8c45148baef Author: Adhemerval Zanella Date: Thu Mar 31 15:18:02 2022 -0300 string: mempcy and stpcpy builtins internally Diff: --- include/string.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/include/string.h b/include/string.h index 27f4e6e563..df5742c116 100644 --- a/include/string.h +++ b/include/string.h @@ -175,13 +175,17 @@ extern __typeof (strnlen) strnlen attribute_hidden; extern __typeof (strsep) strsep attribute_hidden; #endif -#if (!IS_IN (libc) || !defined SHARED) \ - && !defined NO_MEMPCPY_STPCPY_REDIRECT +#if IS_IN (libc) && !defined NO_MEMPCPY_STPCPY_REDIRECT /* Redirect calls to __builtin_mempcpy and __builtin_stpcpy to call __mempcpy and __stpcpy if not inlined. */ +# ifdef SHARED +__asm__ ("mempcpy = __GI_mempcpy"); +__asm__ ("stpcpy = __GI_stpcpy"); +# else __asm__ ("mempcpy = __mempcpy"); __asm__ ("stpcpy = __stpcpy"); #endif +#endif extern void *__memcpy_chk (void *__restrict __dest, const void *__restrict __src, size_t __len,