From 293d9a41805b1eeb440a2c59a717b332cd9c2384 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Wed, 12 Nov 2014 22:35:12 +0000 Subject: Fix x86_64 rawmemchr namespace (bug 17572). 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. Tested for x86_64 (testsuite, and that disassembly of installed shared libraries is unchanged by the patch). [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. --- sysdeps/x86_64/rawmemchr.S | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'sysdeps/x86_64/rawmemchr.S') diff --git a/sysdeps/x86_64/rawmemchr.S b/sysdeps/x86_64/rawmemchr.S index ed93d3f591..1b392cb60c 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) -- cgit v1.2.3