about summary refs log tree commit diff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/libc-symbols.h16
-rw-r--r--include/unistd.h4
2 files changed, 18 insertions, 2 deletions
diff --git a/include/libc-symbols.h b/include/libc-symbols.h
index 22f7d854c1..bc1c24033f 100644
--- a/include/libc-symbols.h
+++ b/include/libc-symbols.h
@@ -349,15 +349,27 @@
   strong_alias(real, name)
 #endif
 
+#if defined HAVE_VISIBILITY_ATTRIBUTE && defined SHARED
+# define attribute_hidden __attribute__ ((visibility ("hidden")))
+#else
+# define attribute_hidden
+#endif
+
 /* Handling on non-exported internal names.  We have to do this only
    for shared code.  */
 #ifdef SHARED
 # define INTUSE(name) name##_internal
-# define INTDEF(name) strong_alias (name, name##_internal);
-# define INTDEF2(name, newname) strong_alias (name, newname##_internal);
+# define INTDEF(name) strong_alias (name, name##_internal)
+# define INTVARDEF(name) \
+  _INTVARDEF(name, name##_internal)
+# define _INTVARDEF(name, aliasname) \
+  extern __typeof (name) aliasname __attribute__ ((visibility ("hidden"))); \
+  strong_alias (name, name##_internal)
+# define INTDEF2(name, newname) strong_alias (name, newname##_internal)
 #else
 # define INTUSE(name) name
 # define INTDEF(name)
+# define INTVARDEF(name)
 # define INTDEF2(name, newname)
 #endif
 
diff --git a/include/unistd.h b/include/unistd.h
index b8bc8bbf72..8fd7088320 100644
--- a/include/unistd.h
+++ b/include/unistd.h
@@ -98,6 +98,10 @@ extern void *__sbrk (intptr_t __delta);
    and some functions contained in the C library ignore various
    environment variables that normally affect them.  */
 extern int __libc_enable_secure;
+#ifdef _RTLD_LOCAL
+/* XXX The #ifdef should go.  */
+extern int __libc_enable_secure_internal attribute_hidden;
+#endif
 
 
 /* Various internal function.  */