From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1791) id 18F8D385842A; Tue, 2 Apr 2024 15:58:35 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 18F8D385842A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1712073515; bh=s2i/HKgmM7fHR0xNl/tJL2Anmq58YMkw1xNAlJQkaxQ=; h=From:To:Subject:Date:From; b=NB6PIjm73OBdxsf3o/Hhv/vcxp+bpoBUIiS8e5MvVimYF+c1FjeP6MQ/tovoxOida 34uBtsmAg5BF6/4G4dCJRQozJ3WzwhB5cS+F/O1d5sGhURANmC2VzNd7mE1c3LEVoa 128pOFfw26C3lixFUAnU+CxVjnMozdpT4tOBET18= 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: 11ac998d06ec2d484f5d0d4766e910ee67a75b80 X-Git-Newrev: 91814e0435e3c9491fa71e9a3b823761a85f90d5 Message-Id: <20240402155835.18F8D385842A@sourceware.org> Date: Tue, 2 Apr 2024 15:58:34 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=91814e0435e3c9491fa71e9a3b823761a85f90d5 commit 91814e0435e3c9491fa71e9a3b823761a85f90d5 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 082865caad..2a4788e8c2 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,