1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-07-29 11:41:21 +03:00

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.
This commit is contained in:
H.J. Lu
2017-10-01 15:50:56 -07:00
parent 9635ce6962
commit 4587a421c5
6 changed files with 23 additions and 8 deletions

View File

@ -4,4 +4,5 @@
#include <sysdeps/posix/readdir.c>
libc_hidden_def (__readdir64)
weak_alias (__readdir64, readdir64)