diff options
author | Liubov Dmitrieva <ldmitrie@sourceware.org> | 2013-08-30 18:37:28 +0400 |
---|---|---|
committer | Liubov Dmitrieva <ldmitrie@sourceware.org> | 2013-10-23 23:51:44 +0400 |
commit | 029183a4ca3f765f63e7b64bc260622f02b04539 (patch) | |
tree | c7f6912d9575e27f691f219ad9437e9af39e016e /sysdeps/x86_64/multiarch/memmove.c | |
parent | 01d5454d13d2c21b9a08b28441d37a7ddce089a6 (diff) | |
download | glibc-029183a4ca3f765f63e7b64bc260622f02b04539.tar.gz glibc-029183a4ca3f765f63e7b64bc260622f02b04539.tar.xz glibc-029183a4ca3f765f63e7b64bc260622f02b04539.zip |
Implemented bound check support for string/memory routines for x86_64. ldmitrie/intel_mpx
TODO: Fix bound check support in strcmp-sse2 and implement in strspn, strstr and strcspn.
Diffstat (limited to 'sysdeps/x86_64/multiarch/memmove.c')
-rw-r--r-- | sysdeps/x86_64/multiarch/memmove.c | 34 |
1 files changed, 18 insertions, 16 deletions
diff --git a/sysdeps/x86_64/multiarch/memmove.c b/sysdeps/x86_64/multiarch/memmove.c index 8149c487d5..0d2c6f0266 100644 --- a/sysdeps/x86_64/multiarch/memmove.c +++ b/sysdeps/x86_64/multiarch/memmove.c @@ -17,31 +17,32 @@ License along with the GNU C Library; if not, see <http://www.gnu.org/licenses/>. */ -#ifndef NOT_IN_libc -# define MEMMOVE __memmove_sse2 -# ifdef SHARED -# undef libc_hidden_builtin_def -# define libc_hidden_builtin_def(name) \ +#ifndef __CHKP__ +# ifndef NOT_IN_libc +# define MEMMOVE __memmove_sse2 +# ifdef SHARED +# undef libc_hidden_builtin_def +# define libc_hidden_builtin_def(name) \ __hidden_ver1 (__memmove_sse2, __GI_memmove, __memmove_sse2); -# endif +# endif /* Redefine memmove so that the compiler won't complain about the type mismatch with the IFUNC selector in strong_alias, below. */ -# undef memmove -# define memmove __redirect_memmove -# include <string.h> -# undef memmove +# undef memmove +# define memmove __redirect_memmove +# include <string.h> +# undef memmove extern __typeof (__redirect_memmove) __memmove_sse2 attribute_hidden; extern __typeof (__redirect_memmove) __memmove_ssse3 attribute_hidden; extern __typeof (__redirect_memmove) __memmove_ssse3_back attribute_hidden; -#endif +# endif -#include "string/memmove.c" +# include "string/memmove.c" -#ifndef NOT_IN_libc -# include <shlib-compat.h> -# include "init-arch.h" +# ifndef NOT_IN_libc +# include <shlib-compat.h> +# include "init-arch.h" /* Avoid DWARF definition DIE on ifunc symbol so that GDB can handle ifunc symbol properly. */ @@ -54,7 +55,8 @@ libc_ifunc (__libc_memmove, strong_alias (__libc_memmove, memmove) -# if SHLIB_COMPAT (libc, GLIBC_2_2_5, GLIBC_2_14) +# if SHLIB_COMPAT (libc, GLIBC_2_2_5, GLIBC_2_14) compat_symbol (libc, memmove, memcpy, GLIBC_2_2_5); +# endif # endif #endif |