summaryrefslogtreecommitdiff
path: root/sysdeps/x86_64/multiarch/memrchr.c
diff options
context:
space:
mode:
authorZack Weinberg <zackw@panix.com>2018-03-18 17:01:06 -0400
committerZack Weinberg <zackw@panix.com>2018-03-26 09:05:19 -0400
commitf66704a937db50bbd78acc5c29f569b4c8e35d19 (patch)
tree92d261f99ff3346bffb3a61f6e788fe0daf6093e /sysdeps/x86_64/multiarch/memrchr.c
parent9ea49e16c79bd2acd0d0648ca0163f26dd1c3dae (diff)
downloadglibc-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/memrchr.c')
-rw-r--r--sysdeps/x86_64/multiarch/memrchr.c8
1 files changed, 5 insertions, 3 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