From 4587a421c54a8912b3e24913c7e1501293042b40 Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Sun, 1 Oct 2017 15:50:56 -0700 Subject: Mark internal dirent functions with attribute_hidden [BZ #18822] Mark internal dirent functions with attribute_hidden to allow direct access within libc.so and libc.a without using GOT nor PLT. __readdir64 is hidden with libc_hidden_proto and libc_hidden_def since the exported readdir64 is an alias of __readdir64. [BZ #18822] * include/dirent.h (__opendir): Always add attribute_hidden. (__fdopendir): Likewise. (__closedir): Likewise. (__readdir): Likewise. (__readdir64): Add libc_hidden_proto. * sysdeps/mach/hurd/readdir64.c (__readdir64): Add libc_hidden_def. * sysdeps/unix/sysv/linux/i386/readdir64.c (__readdir64): Likewise. * sysdeps/unix/sysv/linux/readdir64.c (__readdir64): Likewise. * sysdeps/unix/sysv/linux/wordsize-64/readdir.c (__GI___readdir64): New alias. --- sysdeps/unix/sysv/linux/wordsize-64/readdir.c | 1 + 1 file changed, 1 insertion(+) (limited to 'sysdeps/unix/sysv/linux/wordsize-64/readdir.c') diff --git a/sysdeps/unix/sysv/linux/wordsize-64/readdir.c b/sysdeps/unix/sysv/linux/wordsize-64/readdir.c index e197d93b00..0d5798849d 100644 --- a/sysdeps/unix/sysv/linux/wordsize-64/readdir.c +++ b/sysdeps/unix/sysv/linux/wordsize-64/readdir.c @@ -3,5 +3,6 @@ #include #undef __readdir64 strong_alias (__readdir, __readdir64) +strong_alias (__readdir, __GI___readdir64) #undef readdir64 weak_alias (__readdir, readdir64) -- cgit v1.2.3