From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1791) id 5F71C3858415; Tue, 4 Oct 2022 13:04:20 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5F71C3858415 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1664888660; bh=5pxjXh1p6zIlIKuUhy4ewDxds7xV1zWI0Q3pgxqLTnE=; h=From:To:Subject:Date:From; b=eGzRr++y7UQua9SLj5/GCYbF79KPrk8i8bwlDPcsDzmdAcJZpI87aB6gRaK6arkUo Dpt0Zmfg2WyPgBx05S9ZBeK9zKFSTj1UBH+PA4h9VHPvny3C/xPgaBX041JS4RC7LQ xH9FSdtXZ123gnJwmd8254qELeDpY7oz//q/eets= 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: 14c66233a01b97bb650558b4ae6e268d136a25eb X-Git-Newrev: c693c7124b932ee210729aba21d2f58896d2cf33 Message-Id: <20221004130420.5F71C3858415@sourceware.org> Date: Tue, 4 Oct 2022 13:04:20 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=c693c7124b932ee210729aba21d2f58896d2cf33 commit c693c7124b932ee210729aba21d2f58896d2cf33 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 44c4049053..987afbd304 100644 --- a/include/string.h +++ b/include/string.h @@ -172,13 +172,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,