diff options
Diffstat (limited to 'io')
-rw-r--r-- | io/Makefile | 10 | ||||
-rw-r--r-- | io/fstat.c | 9 | ||||
-rw-r--r-- | io/fstat64.c | 8 | ||||
-rw-r--r-- | io/lstat.c | 9 | ||||
-rw-r--r-- | io/lstat64.c | 8 | ||||
-rw-r--r-- | io/stat.c | 9 | ||||
-rw-r--r-- | io/stat64.c | 8 |
7 files changed, 55 insertions, 6 deletions
diff --git a/io/Makefile b/io/Makefile index f68b12d..d102eec 100644 --- a/io/Makefile +++ b/io/Makefile @@ -66,6 +66,16 @@ CFLAGS-fts.c = -Wno-uninitialized CFLAGS-test-stat.c = -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE CFLAGS-test-lfs.c = -D_LARGEFILE64_SOURCE +ifeq (yes,$(have-protected)) +CFLAGS-stat.c = -DHAVE_DOT_HIDDEN +CFLAGS-fstat.c = -DHAVE_DOT_HIDDEN +CFLAGS-lstat.c = -DHAVE_DOT_HIDDEN +CFLAGS-mknod.c = -DHAVE_DOT_HIDDEN +CFLAGS-stat64.c = -DHAVE_DOT_HIDDEN +CFLAGS-fstat64.c = -DHAVE_DOT_HIDDEN +CFLAGS-lstat64.c = -DHAVE_DOT_HIDDEN +endif + test-stat2-ARGS = Makefile . $(objpfx)test-stat2 ifeq ($(cross-compiling),no) @@ -1,4 +1,4 @@ -/* Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc. +/* Copyright (C) 1996, 1997, 1998, 2001 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -45,3 +45,10 @@ __fstat (int fd, struct stat *buf) } weak_alias (__fstat, fstat) + +/* Hide the symbol so that no definition but the one locally in the + executable or DSO is used. */ +#ifdef HAVE_DOT_HIDDEN +asm (".hidden\tfstat"); +asm (".hidden\t__fstat"); +#endif diff --git a/io/fstat64.c b/io/fstat64.c index 2d677a1..45a8d5f 100644 --- a/io/fstat64.c +++ b/io/fstat64.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1996, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1996, 1997, 2001 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -42,3 +42,9 @@ fstat64 (int fd, struct stat64 *buf) { return __fxstat64 (_STAT_VER, fd, buf); } + +/* Hide the symbol so that no definition but the one locally in the + executable or DSO is used. */ +#ifdef HAVE_DOT_HIDDEN +asm (".hidden\tfstat64"); +#endif @@ -1,4 +1,4 @@ -/* Copyright (C) 1996, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1996, 1997, 2001 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -45,3 +45,10 @@ __lstat (const char *file, struct stat *buf) } weak_alias (__lstat, lstat) + +/* Hide the symbol so that no definition but the one locally in the + executable or DSO is used. */ +#ifdef HAVE_DOT_HIDDEN +asm (".hidden\tlstat"); +asm (".hidden\t__lstat"); +#endif diff --git a/io/lstat64.c b/io/lstat64.c index 079b3fa..f181ece 100644 --- a/io/lstat64.c +++ b/io/lstat64.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1996, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1996, 1997, 2001 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -42,3 +42,9 @@ lstat64 (const char *file, struct stat64 *buf) { return __lxstat64 (_STAT_VER, file, buf); } + +/* Hide the symbol so that no definition but the one locally in the + executable or DSO is used. */ +#ifdef HAVE_DOT_HIDDEN +asm (".hidden\tlstat64"); +#endif @@ -1,4 +1,4 @@ -/* Copyright (C) 1996, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1996, 1997, 2001 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -44,3 +44,10 @@ __stat (const char *file, struct stat *buf) } weak_alias (__stat, stat) + +/* Hide the symbol so that no definition but the one locally in the + executable or DSO is used. */ +#ifdef HAVE_DOT_HIDDEN +asm (".hidden\tstat"); +asm (".hidden\t__stat"); +#endif diff --git a/io/stat64.c b/io/stat64.c index 16b0b11..34eed20 100644 --- a/io/stat64.c +++ b/io/stat64.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1996, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1996, 1997, 2001 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -42,3 +42,9 @@ stat64 (const char *file, struct stat64 *buf) { return __xstat64 (_STAT_VER, file, buf); } + +/* Hide the symbol so that no definition but the one locally in the + executable or DSO is used. */ +#ifdef HAVE_DOT_HIDDEN +asm (".hidden\tstat64"); +#endif |