mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-21 12:30:06 +00:00
Hide internal __setrlimit function [BZ #18822]
Hide internal __setrlimit function to allow direct access within libc.so and libc.a without using GOT nor PLT. [BZ #18822] * include/sys/resource.h (__setrlimit): Add libc_hidden_proto. * resource/setrlimit.c (__setrlimit): Add libc_hidden_def. * sysdeps/mach/hurd/setrlimit.c (__setrlimit): Likewise. * sysdeps/unix/sysv/linux/setrlimit.c (__setrlimit): Likewise. * sysdeps/unix/sysv/linux/setrlimit64.c (__GI___setrlimit): New.
This commit is contained in:
parent
047d1a81fd
commit
dd3121df08
@ -1,3 +1,12 @@
|
||||
2017-10-01 H.J. Lu <hongjiu.lu@intel.com>
|
||||
|
||||
[BZ #18822]
|
||||
* include/sys/resource.h (__setrlimit): Add libc_hidden_proto.
|
||||
* resource/setrlimit.c (__setrlimit): Add libc_hidden_def.
|
||||
* sysdeps/mach/hurd/setrlimit.c (__setrlimit): Likewise.
|
||||
* sysdeps/unix/sysv/linux/setrlimit.c (__setrlimit): Likewise.
|
||||
* sysdeps/unix/sysv/linux/setrlimit64.c (__GI___setrlimit): New.
|
||||
|
||||
2017-10-01 H.J. Lu <hongjiu.lu@intel.com>
|
||||
|
||||
[BZ #18822]
|
||||
|
@ -23,5 +23,6 @@ extern int __getrusage (enum __rusage_who __who, struct rusage *__usage)
|
||||
|
||||
extern int __setrlimit (enum __rlimit_resource __resource,
|
||||
const struct rlimit *__rlimits);
|
||||
libc_hidden_proto (__setrlimit);
|
||||
#endif
|
||||
#endif
|
||||
|
@ -29,6 +29,7 @@ __setrlimit (enum __rlimit_resource resource, const struct rlimit *rlimits)
|
||||
__set_errno (ENOSYS);
|
||||
return -1;
|
||||
}
|
||||
libc_hidden_def (__setrlimit)
|
||||
weak_alias (__setrlimit, setrlimit)
|
||||
|
||||
stub_warning (setrlimit)
|
||||
|
@ -53,4 +53,5 @@ __setrlimit (enum __rlimit_resource resource, const struct rlimit *rlimits)
|
||||
return 0;
|
||||
}
|
||||
|
||||
libc_hidden_def (__setrlimit)
|
||||
weak_alias (__setrlimit, setrlimit)
|
||||
|
@ -48,6 +48,7 @@ __setrlimit (enum __rlimit_resource resource, const struct rlimit *rlim)
|
||||
return INLINE_SYSCALL_CALL (prlimit64, 0, resource, &rlim64, NULL);
|
||||
}
|
||||
|
||||
libc_hidden_def (__setrlimit)
|
||||
# if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_2)
|
||||
strong_alias (__setrlimit, __setrlimit_1)
|
||||
compat_symbol (libc, __setrlimit, setrlimit, GLIBC_2_0);
|
||||
|
@ -43,4 +43,7 @@ weak_alias (__setrlimit64, setrlimit64)
|
||||
#if __RLIM_T_MATCHES_RLIM64_T
|
||||
strong_alias (__setrlimit64, __setrlimit)
|
||||
weak_alias (__setrlimit64, setrlimit)
|
||||
# ifdef SHARED
|
||||
__hidden_ver1 (__setrlimit64, __GI___setrlimit, __setrlimit64);
|
||||
# endif
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user