public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] i386: Hide __old_readdir64 [BZ #18822]
@ 2017-08-20 17:31 H.J. Lu
  0 siblings, 0 replies; only message in thread
From: H.J. Lu @ 2017-08-20 17:31 UTC (permalink / raw)
  To: GNU C Library

Hide internal __old_readdir64 function to allow direct access within
libc.so and libc.a without using GOT nor PLT.

I will check it in after testing on i686.

H.J.
---
            [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.
---
 sysdeps/unix/sysv/linux/i386/olddirent.h | 1 +
 sysdeps/unix/sysv/linux/i386/readdir64.c | 2 ++
 2 files changed, 3 insertions(+)

diff --git a/sysdeps/unix/sysv/linux/i386/olddirent.h b/sysdeps/unix/sysv/linux/i386/olddirent.h
index 4875a1f2fa..a90883d131 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 0563c43d73..8c235f9831 100644
--- a/sysdeps/unix/sysv/linux/i386/readdir64.c
+++ b/sysdeps/unix/sysv/linux/i386/readdir64.c
@@ -40,5 +40,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
-- 
2.13.5

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2017-08-20 17:31 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-20 17:31 [PATCH] i386: Hide __old_readdir64 [BZ #18822] H.J. Lu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).