[55/58] Hide internal __new_getrlimit function [BZ #18822]

Message ID 20170901180029.9527-56-hjl.tools@gmail.com
State Committed
Commit 0e7d5b6e241b3e367b806f65f6df1e7469af68fa
Headers

Commit Message

H.J. Lu Sept. 1, 2017, 6 p.m. UTC
  Hide internal __new_getrlimit function to allow direct access within
libc.so and libc.a without using GOT nor PLT.

	[BZ #18822]
	* sysdeps/unix/sysv/linux/getrlimit64.c (__new_getrlimit): Add
	attribute_hidden.
---
 sysdeps/unix/sysv/linux/getrlimit64.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
  

Comments

H.J. Lu Oct. 2, 2017, 12:59 a.m. UTC | #1
On 9/1/17, H.J. Lu <hjl.tools@gmail.com> wrote:
> Hide internal __new_getrlimit function to allow direct access within
> libc.so and libc.a without using GOT nor PLT.
>
> 	[BZ #18822]
> 	* sysdeps/unix/sysv/linux/getrlimit64.c (__new_getrlimit): Add
> 	attribute_hidden.
>

Tested with build-many-glibcs.py.  I am checking it in.
  

Patch

diff --git a/sysdeps/unix/sysv/linux/getrlimit64.c b/sysdeps/unix/sysv/linux/getrlimit64.c
index 56af3c0646..37827e5f42 100644
--- a/sysdeps/unix/sysv/linux/getrlimit64.c
+++ b/sysdeps/unix/sysv/linux/getrlimit64.c
@@ -53,7 +53,8 @@  weak_alias (__getrlimit64, getrlimit)
 
 #if SHLIB_COMPAT (libc, GLIBC_2_1, GLIBC_2_2)
 /* Back compatible 2GiB limited rlimit.  */
-extern int __new_getrlimit (enum __rlimit_resource, struct rlimit *);
+extern int __new_getrlimit (enum __rlimit_resource, struct rlimit *)
+  attribute_hidden;
 
 int
 attribute_compat_text_section