[4/6,BZ,#18822] Mark __xstatXX_conv as hidden

Message ID 20150814121758.GD28610@gmail.com
State Committed
Headers

Commit Message

H.J. Lu Aug. 14, 2015, 12:17 p.m. UTC
  __xstat_conv, __xstat64_conv and __xstat32_conv are internal to glibc.
They should be marked as hidden so that they can't be called without
PLT.

OK for master?

	[BZ #18822]
	* sysdeps/unix/sysv/linux/xstatconv.h (__xstat_conv): Add
	attribute_hidden.
	(__xstat64_conv): Likewise.
	(__xstat32_conv): Likewise.
---
 sysdeps/unix/sysv/linux/xstatconv.h | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)
  

Comments

Ondrej Bilka Aug. 19, 2015, 6:01 a.m. UTC | #1
On Fri, Aug 14, 2015 at 05:17:58AM -0700, H.J. Lu wrote:
> __xstat_conv, __xstat64_conv and __xstat32_conv are internal to glibc.
> They should be marked as hidden so that they can't be called without
> PLT.
> 
looks ok.
  

Patch

diff --git a/sysdeps/unix/sysv/linux/xstatconv.h b/sysdeps/unix/sysv/linux/xstatconv.h
index 229e24c..d21d9a0 100644
--- a/sysdeps/unix/sysv/linux/xstatconv.h
+++ b/sysdeps/unix/sysv/linux/xstatconv.h
@@ -17,7 +17,10 @@ 
    <http://www.gnu.org/licenses/>.  */
 
 #ifndef STAT_IS_KERNEL_STAT
-extern int __xstat_conv (int vers, struct kernel_stat *kbuf, void *ubuf);
-extern int __xstat64_conv (int vers, struct kernel_stat *kbuf, void *ubuf);
+extern int __xstat_conv (int vers, struct kernel_stat *kbuf, void *ubuf)
+  attribute_hidden;
+extern int __xstat64_conv (int vers, struct kernel_stat *kbuf, void *ubuf)
+  attribute_hidden;
 #endif
-extern int __xstat32_conv (int vers, struct stat64 *kbuf, struct stat *buf);
+extern int __xstat32_conv (int vers, struct stat64 *kbuf, struct stat *buf)
+  attribute_hidden;