From patchwork Mon Nov 10 17:53:23 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joseph Myers X-Patchwork-Id: 3639 Received: (qmail 13896 invoked by alias); 10 Nov 2014 17:54:45 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 13886 invoked by uid 89); 10 Nov 2014 17:54:44 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 X-HELO: relay1.mentorg.com Date: Mon, 10 Nov 2014 17:53:23 +0000 From: Joseph Myers To: Subject: Fix x86_64 rawmemchr namespace (bug 17572) Message-ID: User-Agent: Alpine 2.10 (DEB 1266 2009-07-14) MIME-Version: 1.0 rawmemchr is not an ISO C function, but __rawmemchr is called from ISO C functions, so rawmemchr should be a weak alias. On most architecture it is, but x86_64 defines the function as rawmemchr with __rawmemchr as a strong alias. This patch makes x86_64 follow the same arrangements as other architectures, fixing one of the bugs shown in the sample output of my proposed tests for such namespace issues . Tested for x86_64 (testsuite, and that disassembly of installed shared libraries is unchanged by the patch). 2014-11-10 Joseph Myers [BZ #17572] * sysdeps/x86_64/rawmemchr.S (rawmemchr): Rename to __rawmemchr and define as weak alias of __rawmemchr. (__rawmemchr): Do not define as strong alias of rawmemchr. diff --git a/sysdeps/x86_64/rawmemchr.S b/sysdeps/x86_64/rawmemchr.S index ed93d3f..1b392cb 100644 --- a/sysdeps/x86_64/rawmemchr.S +++ b/sysdeps/x86_64/rawmemchr.S @@ -21,7 +21,7 @@ #include .text -ENTRY (rawmemchr) +ENTRY (__rawmemchr) movd %rsi, %xmm1 mov %rdi, %rcx @@ -201,7 +201,7 @@ L(return_null): xor %rax, %rax ret -END (rawmemchr) +END (__rawmemchr) -strong_alias (rawmemchr, __rawmemchr) +weak_alias (__rawmemchr, rawmemchr) libc_hidden_builtin_def (__rawmemchr)