diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2017-10-01 15:57:00 -0700 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2017-10-01 15:57:21 -0700 |
commit | b5648377d923d790dd7e995d79d480066b25e6bb (patch) | |
tree | 68a01fd0c6ee4ecf44f4a252f8385e410134311f /include/sys | |
parent | 0389a6aaae6d07f69de5b42345293ec578337de2 (diff) | |
download | glibc-b5648377d923d790dd7e995d79d480066b25e6bb.zip glibc-b5648377d923d790dd7e995d79d480066b25e6bb.tar.gz glibc-b5648377d923d790dd7e995d79d480066b25e6bb.tar.bz2 |
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.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/include/sys/sysinfo.h b/include/sys/sysinfo.h index c33eae2..7388356 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 */ |