]> git.ipfire.org Git - thirdparty/glibc.git/blame - sysdeps/x86_64/multiarch/strstr.c
Update copyright dates with scripts/update-copyrights.
[thirdparty/glibc.git] / sysdeps / x86_64 / multiarch / strstr.c
CommitLineData
584b18eb
OB
1/* Multiple versions of strstr.
2 All versions must be listed in ifunc-impl-list.c.
b168057a 3 Copyright (C) 2012-2015 Free Software Foundation, Inc.
2b7a8664
L
4 This file is part of the GNU C Library.
5
6 The GNU C Library is free software; you can redistribute it and/or
7 modify it under the terms of the GNU Lesser General Public
8 License as published by the Free Software Foundation; either
9 version 2.1 of the License, or (at your option) any later version.
10
11 The GNU C Library is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 Lesser General Public License for more details.
15
16 You should have received a copy of the GNU Lesser General Public
59ba27a6
PE
17 License along with the GNU C Library; if not, see
18 <http://www.gnu.org/licenses/>. */
2b7a8664 19
584b18eb
OB
20/* Redefine strstr so that the compiler won't complain about the type
21 mismatch with the IFUNC selector in strong_alias, below. */
22#undef strstr
23#define strstr __redirect_strstr
24#include <string.h>
25#undef strstr
26
27#define STRSTR __strstr_sse2
28#ifdef SHARED
29# undef libc_hidden_builtin_def
30# define libc_hidden_builtin_def(name) \
31 __hidden_ver1 (__strstr_sse2, __GI_strstr, __strstr_sse2);
2b7a8664
L
32#endif
33
584b18eb 34#include "string/strstr.c"
2b7a8664 35
584b18eb
OB
36extern __typeof (__redirect_strstr) __strstr_sse2_unaligned attribute_hidden;
37extern __typeof (__redirect_strstr) __strstr_sse2 attribute_hidden;
2b7a8664 38
584b18eb 39#include "init-arch.h"
ae612b04 40
584b18eb
OB
41/* Avoid DWARF definition DIE on ifunc symbol so that GDB can handle
42 ifunc symbol properly. */
43extern __typeof (__redirect_strstr) __libc_strstr;
44libc_ifunc (__libc_strstr, HAS_FAST_UNALIGNED_LOAD ? __strstr_sse2_unaligned : __strstr_sse2)
2b7a8664 45
584b18eb
OB
46#undef strstr
47strong_alias (__libc_strstr, strstr)