aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/unix/sysv/linux/glob-lstat-compat.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/unix/sysv/linux/glob-lstat-compat.c
parent9ea49e16c79bd2acd0d0648ca0163f26dd1c3dae (diff)
downloadglibc-zack/wip-check-localplt-2.tar
glibc-zack/wip-check-localplt-2.tar.gz
glibc-zack/wip-check-localplt-2.tar.bz2
glibc-zack/wip-check-localplt-2.zip
WIP finer-grained, more aggressive local PLT call checkzack/wip-check-localplt-2
Diffstat (limited to 'sysdeps/unix/sysv/linux/glob-lstat-compat.c')
-rw-r--r--sysdeps/unix/sysv/linux/glob-lstat-compat.c21
1 files changed, 15 insertions, 6 deletions
diff --git a/sysdeps/unix/sysv/linux/glob-lstat-compat.c b/sysdeps/unix/sysv/linux/glob-lstat-compat.c
index 64dab9af52..e5a534027f 100644
--- a/sysdeps/unix/sysv/linux/glob-lstat-compat.c
+++ b/sysdeps/unix/sysv/linux/glob-lstat-compat.c
@@ -21,9 +21,23 @@
#include <kernel_stat.h>
#include <shlib-compat.h>
+#ifndef GLOB_LSTAT_VERSION
+# define GLOB_LSTAT_VERSION GLIBC_2_0
+#endif
+
+#if SHLIB_COMPAT(libc, GLOB_LSTAT_VERSION, GLIBC_2_27)
+
+#if XSTAT_IS_XSTAT64
#define glob64 __no_glob64_decl
+#define __glob64 __no___glob64_decl
+#define __glob64_lstat_compat __no_glob64_lstat_compat_decl
+#endif
+
#include <glob.h>
+
#undef glob64
+#undef __glob64
+#undef __glob64_lstat_compat
#define __glob __glob_lstat_compat
@@ -33,12 +47,7 @@
#define GLOB_NO_LSTAT
#include <posix/glob.c>
-
-#ifndef GLOB_LSTAT_VERSION
-# define GLOB_LSTAT_VERSION GLIBC_2_0
-#endif
-
-#if SHLIB_COMPAT(libc, GLOB_LSTAT_VERSION, GLIBC_2_27)
+libc_hidden_def (__glob_lstat_compat)
compat_symbol (libc, __glob_lstat_compat, glob, GLOB_LSTAT_VERSION);
# if XSTAT_IS_XSTAT64
strong_alias (__glob_lstat_compat, __glob64_lstat_compat)