diff options
author | Zack Weinberg <zackw@panix.com> | 2018-03-18 17:01:06 -0400 |
---|---|---|
committer | Zack Weinberg <zackw@panix.com> | 2018-03-26 09:05:19 -0400 |
commit | f66704a937db50bbd78acc5c29f569b4c8e35d19 (patch) | |
tree | 92d261f99ff3346bffb3a61f6e788fe0daf6093e /sysdeps/x86_64/multiarch | |
parent | 9ea49e16c79bd2acd0d0648ca0163f26dd1c3dae (diff) | |
download | glibc-zack/wip-check-localplt-2.tar.gz |
WIP finer-grained, more aggressive local PLT call checkzack/wip-check-localplt-2
Diffstat (limited to 'sysdeps/x86_64/multiarch')
-rw-r--r-- | sysdeps/x86_64/multiarch/memrchr.c | 8 | ||||
-rw-r--r-- | sysdeps/x86_64/multiarch/strchrnul.c | 10 | ||||
-rw-r--r-- | sysdeps/x86_64/multiarch/strncase.c | 12 | ||||
-rw-r--r-- | sysdeps/x86_64/multiarch/wcslen.c | 11 | ||||
-rw-r--r-- | sysdeps/x86_64/multiarch/wcsnlen.c | 10 |
5 files changed, 29 insertions, 22 deletions
diff --git a/sysdeps/x86_64/multiarch/memrchr.c b/sysdeps/x86_64/multiarch/memrchr.c index d227fe7819..82d585218f 100644 --- a/sysdeps/x86_64/multiarch/memrchr.c +++ b/sysdeps/x86_64/multiarch/memrchr.c @@ -17,15 +17,17 @@ License along with the GNU C Library; if not, see <http://www.gnu.org/licenses/>. */ +# include <string.h> + /* Define multiple versions only for the definition in libc. */ #if IS_IN (libc) -# define memrchr __redirect_memrchr -# include <string.h> -# undef memrchr + +extern typeof (__memrchr) __redirect_memrchr; # define SYMBOL_NAME memrchr # include "ifunc-avx2.h" libc_ifunc_redirected (__redirect_memrchr, __memrchr, IFUNC_SELECTOR ()); +libc_hidden_def (__memrchr) weak_alias (__memrchr, memrchr) #endif diff --git a/sysdeps/x86_64/multiarch/strchrnul.c b/sysdeps/x86_64/multiarch/strchrnul.c index 7514999341..a2c4155c64 100644 --- a/sysdeps/x86_64/multiarch/strchrnul.c +++ b/sysdeps/x86_64/multiarch/strchrnul.c @@ -17,18 +17,18 @@ License along with the GNU C Library; if not, see <http://www.gnu.org/licenses/>. */ +#include <string.h> + /* Define multiple versions only for the definition in libc. */ #if IS_IN (libc) -# define strchrnul __redirect_strchrnul -# define __strchrnul __redirect___strchrnul -# include <string.h> -# undef __strchrnul -# undef strchrnul + +extern typeof (__strchrnul) __redirect_strchrnul; # define SYMBOL_NAME strchrnul # include "ifunc-avx2.h" libc_ifunc_redirected (__redirect_strchrnul, __strchrnul, IFUNC_SELECTOR ()); +libc_hidden_def (__strchrnul) weak_alias (__strchrnul, strchrnul) #endif diff --git a/sysdeps/x86_64/multiarch/strncase.c b/sysdeps/x86_64/multiarch/strncase.c index 798966cf3e..fb31961267 100644 --- a/sysdeps/x86_64/multiarch/strncase.c +++ b/sysdeps/x86_64/multiarch/strncase.c @@ -17,19 +17,19 @@ License along with the GNU C Library; if not, see <http://www.gnu.org/licenses/>. */ +#include <string.h> + /* Define multiple versions only for the definition in libc. */ #if IS_IN (libc) -# define strncasecmp __redirect_strncasecmp -# define __strncasecmp __redirect___strncasecmp -# include <string.h> -# undef strncasecmp -# undef __strncasecmp + +extern typeof (__strncasecmp) __redirect_strncasecmp; # define SYMBOL_NAME strncasecmp # include "ifunc-strcasecmp.h" libc_ifunc_redirected (__redirect_strncasecmp, __strncasecmp, IFUNC_SELECTOR ()); - +libc_hidden_def (__strncasecmp) weak_alias (__strncasecmp, strncasecmp) + #endif diff --git a/sysdeps/x86_64/multiarch/wcslen.c b/sysdeps/x86_64/multiarch/wcslen.c index 6d06e47cbd..cdf9aecf0f 100644 --- a/sysdeps/x86_64/multiarch/wcslen.c +++ b/sysdeps/x86_64/multiarch/wcslen.c @@ -18,14 +18,17 @@ <http://www.gnu.org/licenses/>. */ /* Define multiple versions only for the definition in libc. */ + +#include <wchar.h> + #if IS_IN (libc) -# define __wcslen __redirect_wcslen -# include <wchar.h> -# undef __wcslen + +extern typeof (__wcslen) __redirect_wcslen; # define SYMBOL_NAME wcslen # include "ifunc-avx2.h" libc_ifunc_redirected (__redirect_wcslen, __wcslen, IFUNC_SELECTOR ()); -weak_alias (__wcslen, wcslen); +libc_hidden_def (__wcslen) +weak_alias (__wcslen, wcslen) #endif diff --git a/sysdeps/x86_64/multiarch/wcsnlen.c b/sysdeps/x86_64/multiarch/wcsnlen.c index bd376057e3..efe16e3c74 100644 --- a/sysdeps/x86_64/multiarch/wcsnlen.c +++ b/sysdeps/x86_64/multiarch/wcsnlen.c @@ -18,10 +18,11 @@ <http://www.gnu.org/licenses/>. */ /* Define multiple versions only for the definition in libc. */ +#include <wchar.h> + #if IS_IN (libc) -# define __wcsnlen __redirect_wcsnlen -# include <wchar.h> -# undef __wcsnlen + +extern typeof (__wcsnlen) __redirect_wcsnlen; # define SYMBOL_NAME wcsnlen # include <init-arch.h> @@ -47,5 +48,6 @@ IFUNC_SELECTOR (void) } libc_ifunc_redirected (__redirect_wcsnlen, __wcsnlen, IFUNC_SELECTOR ()); -weak_alias (__wcsnlen, wcsnlen); +libc_hidden_def (__wcsnlen) +weak_alias (__wcsnlen, wcsnlen) #endif |