about summary refs log tree commit diff
path: root/include/sys
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2017-10-01 15:57:00 -0700
committerH.J. Lu <hjl.tools@gmail.com>2017-10-01 15:57:21 -0700
commitb5648377d923d790dd7e995d79d480066b25e6bb (patch)
tree68a01fd0c6ee4ecf44f4a252f8385e410134311f /include/sys
parent0389a6aaae6d07f69de5b42345293ec578337de2 (diff)
downloadglibc-b5648377d923d790dd7e995d79d480066b25e6bb.tar.gz
glibc-b5648377d923d790dd7e995d79d480066b25e6bb.tar.xz
glibc-b5648377d923d790dd7e995d79d480066b25e6bb.zip
Hide internal sysinfo functions [BZ #18822]
Hide internal sysinfo functions to allow direct access within libc.so
and libc.a without using GOT nor PLT.

	[BZ #18822]
	* include/sys/sysinfo.h (__get_nprocs_conf): Add
	libc_hidden_proto.
	(__get_nprocs): Likewise.
	(__get_phys_pages): Likewise.
	(__get_avphys_pages): Likewise.
	(__get_child_max): Add attribute_hidden.
	* misc/getsysstats.c (__get_nprocs_conf): Add libc_hidden_def.
	(__get_nprocs): Likewise.
	(__get_phys_pages): Likewise.
	(__get_avphys_pages): Likewise.
	* sysdeps/mach/getsysstats.c (__get_nprocs_conf): Add
	libc_hidden_def.
	(__get_nprocs): Likewise.
	(__get_phys_pages): Likewise.
	(__get_avphys_pages): Likewise.
	* sysdeps/unix/sysv/linux/getsysstats.c (__get_nprocs): Add
	libc_hidden_def.
	(__get_nprocs_conf): Likewise.
	(__get_phys_pages): Likewise.
	(__get_avphys_pages): Likewise.
Diffstat (limited to 'include/sys')
-rw-r--r--include/sys/sysinfo.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/include/sys/sysinfo.h b/include/sys/sysinfo.h
index c33eae2883..7388356a19 100644
--- a/include/sys/sysinfo.h
+++ b/include/sys/sysinfo.h
@@ -7,18 +7,22 @@
 
 /* Return number of configured processors.  */
 extern int __get_nprocs_conf (void);
+libc_hidden_proto (__get_nprocs_conf)
 
 /* Return number of available processors.  */
 extern int __get_nprocs (void);
+libc_hidden_proto (__get_nprocs)
 
 /* Return number of physical pages of memory in the system.  */
 extern long int __get_phys_pages (void);
+libc_hidden_proto (__get_phys_pages)
 
 /* Return number of available physical pages of memory in the system.  */
 extern long int __get_avphys_pages (void);
+libc_hidden_proto (__get_avphys_pages)
 
 /* Return maximum number of processes this real user ID can have.  */
-extern long int __get_child_max (void);
+extern long int __get_child_max (void) attribute_hidden;
 
 # endif /* !_ISOMAC */
 #endif /* sys/sysinfo.h */