about summary refs log tree commit diff
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2017-08-20 10:45:58 -0700
committerH.J. Lu <hjl.tools@gmail.com>2017-08-20 10:46:11 -0700
commitc8dfa99c984e4bdc7b5363e23ff0d1e8b26da6e5 (patch)
treeea9cc761e866431d0eaa3d5945cfbdea0371a192
parent91695eb14cadbfbb2ab0f5dddd59fd4e077a04b5 (diff)
downloadglibc-c8dfa99c984e4bdc7b5363e23ff0d1e8b26da6e5.tar.gz
glibc-c8dfa99c984e4bdc7b5363e23ff0d1e8b26da6e5.tar.xz
glibc-c8dfa99c984e4bdc7b5363e23ff0d1e8b26da6e5.zip
i386: Hide __old_readdir64 [BZ #18822]
Hide internal __old_readdir64 function to allow direct access within
libc.so and libc.a without using GOT nor PLT.

	[BZ #18822]
	* sysdeps/unix/sysv/linux/i386/olddirent.h (__old_readdir64):
	Add libc_hidden_proto.
	* sysdeps/unix/sysv/linux/i386/readdir64.c (__old_readdir64):
	Add libc_hidden_def.
-rw-r--r--ChangeLog8
-rw-r--r--sysdeps/unix/sysv/linux/i386/olddirent.h1
-rw-r--r--sysdeps/unix/sysv/linux/i386/readdir64.c2
3 files changed, 11 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 2596c39f3e..5d16204f5c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
 2017-08-20  H.J. Lu  <hongjiu.lu@intel.com>
 
+	[BZ #18822]
+	* sysdeps/unix/sysv/linux/i386/olddirent.h (__old_readdir64):
+	Add libc_hidden_proto.
+	* sysdeps/unix/sysv/linux/i386/readdir64.c (__old_readdir64):
+	Add libc_hidden_def.
+
+2017-08-20  H.J. Lu  <hongjiu.lu@intel.com>
+
 	[BZ #21974]
 	* gmon/Makefile (routines): Remove bb_init_func and
 	bb_exit_func.
diff --git a/sysdeps/unix/sysv/linux/i386/olddirent.h b/sysdeps/unix/sysv/linux/i386/olddirent.h
index 413f78d108..8f2fcb7a9c 100644
--- a/sysdeps/unix/sysv/linux/i386/olddirent.h
+++ b/sysdeps/unix/sysv/linux/i386/olddirent.h
@@ -31,6 +31,7 @@ struct __old_dirent64
 
 /* Now define the internal interfaces.  */
 extern struct __old_dirent64 *__old_readdir64 (DIR *__dirp);
+libc_hidden_proto (__old_readdir64);
 extern int __old_readdir64_r (DIR *__dirp, struct __old_dirent64 *__entry,
 			  struct __old_dirent64 **__result);
 extern __ssize_t __old_getdents64 (int __fd, char *__buf, size_t __nbytes)
diff --git a/sysdeps/unix/sysv/linux/i386/readdir64.c b/sysdeps/unix/sysv/linux/i386/readdir64.c
index f80b6a7ba2..de8669feff 100644
--- a/sysdeps/unix/sysv/linux/i386/readdir64.c
+++ b/sysdeps/unix/sysv/linux/i386/readdir64.c
@@ -39,5 +39,7 @@ versioned_symbol (libc, __readdir64, readdir64, GLIBC_2_2);
 
 #include <sysdeps/posix/readdir.c>
 
+libc_hidden_def (__old_readdir64)
+
 compat_symbol (libc, __old_readdir64, readdir64, GLIBC_2_1);
 #endif