about summary refs log tree commit diff
path: root/include
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2006-10-29 22:03:29 +0000
committerJakub Jelinek <jakub@redhat.com>2006-10-29 22:03:29 +0000
commit8dd5fcaca8ce7e43ed49879235f08d45d2a4a2e5 (patch)
tree196eec145dc3a6fb925a5b07d831b21d761d7c20 /include
parent48b752c9f6499f0de89766c94b3b1bedbfd6476e (diff)
downloadglibc-8dd5fcaca8ce7e43ed49879235f08d45d2a4a2e5.tar.gz
glibc-8dd5fcaca8ce7e43ed49879235f08d45d2a4a2e5.tar.xz
glibc-8dd5fcaca8ce7e43ed49879235f08d45d2a4a2e5.zip
Updated to fedora-glibc-20061029T2155 cvs/fedora-glibc-2_5_90-3
Diffstat (limited to 'include')
-rw-r--r--include/dlfcn.h3
-rw-r--r--include/errno.h2
-rw-r--r--include/libc-symbols.h34
-rw-r--r--include/link.h10
-rw-r--r--include/stdio.h1
-rw-r--r--include/tls.h3
6 files changed, 22 insertions, 31 deletions
diff --git a/include/dlfcn.h b/include/dlfcn.h
index 9144dd2f3f..79c8f7d31b 100644
--- a/include/dlfcn.h
+++ b/include/dlfcn.h
@@ -47,6 +47,9 @@ libc_hidden_proto (_dl_addr)
 
 /* Close an object previously opened by _dl_open.  */
 extern void _dl_close (void *map) attribute_hidden;
+/* Same as above, but without locking and safety checks for user
+   provided map arguments.  */
+extern void _dl_close_worker (struct link_map *map) attribute_hidden;
 
 /* Look up NAME in shared object HANDLE (which may be RTLD_DEFAULT or
    RTLD_NEXT).  WHO is the calling function, for RTLD_NEXT.  Returns
diff --git a/include/errno.h b/include/errno.h
index fe8bca44c5..80c7b6ec13 100644
--- a/include/errno.h
+++ b/include/errno.h
@@ -19,7 +19,7 @@ extern int rtld_errno attribute_hidden;
 
 # else
 
-#  include <tls.h>		/* Defines USE_TLS.  */
+#  include <tls.h>
 
 #  if USE___THREAD
 #   undef  errno
diff --git a/include/libc-symbols.h b/include/libc-symbols.h
index da46f5e804..9eabcbd354 100644
--- a/include/libc-symbols.h
+++ b/include/libc-symbols.h
@@ -114,6 +114,13 @@
 #  define _weak_alias(name, aliasname) \
   extern __typeof (name) aliasname __attribute__ ((weak, alias (#name)));
 
+/* Same as WEAK_ALIAS, but mark symbol as hidden.  */
+#  define weak_hidden_alias(name, aliasname) \
+  _weak_hidden_alias (name, aliasname)
+#  define _weak_hidden_alias(name, aliasname) \
+  extern __typeof (name) aliasname \
+    __attribute__ ((weak, alias (#name), __visibility__ ("hidden")));
+
 /* Declare SYMBOL as weak undefined symbol (resolved to 0 if not defined).  */
 #  define weak_extern(symbol) _weak_extern (weak symbol)
 #  define _weak_extern(expr) _Pragma (#expr)
@@ -121,6 +128,7 @@
 # else
 
 #  define weak_alias(name, aliasname) strong_alias(name, aliasname)
+#  define weak_hidden_alias(name, aliasname) strong_alias(name, aliasname)
 #  define weak_extern(symbol) /* Nothing. */
 
 # endif
@@ -431,8 +439,7 @@ for linking")
   strong_alias(real, name)
 #endif
 
-#if defined HAVE_VISIBILITY_ATTRIBUTE \
-    && (defined SHARED || defined LIBC_NONSHARED)
+#if defined SHARED || defined LIBC_NONSHARED
 # define attribute_hidden __attribute__ ((visibility ("hidden")))
 #else
 # define attribute_hidden
@@ -444,11 +451,7 @@ for linking")
 # define attribute_tls_model_ie
 #endif
 
-#ifdef HAVE_Z_RELRO
-# define attribute_relro __attribute__ ((section (".data.rel.ro")))
-#else
-# define attribute_relro
-#endif
+#define attribute_relro __attribute__ ((section (".data.rel.ro")))
 
 /* Handling on non-exported internal names.  We have to do this only
    for shared code.  */
@@ -457,14 +460,9 @@ for linking")
 # define INTDEF(name) strong_alias (name, name##_internal)
 # define INTVARDEF(name) \
   _INTVARDEF (name, name##_internal)
-# if defined HAVE_VISIBILITY_ATTRIBUTE
-#  define _INTVARDEF(name, aliasname) \
+# define _INTVARDEF(name, aliasname) \
   extern __typeof (name) aliasname __attribute__ ((alias (#name), \
 						   visibility ("hidden")));
-# else
-#  define _INTVARDEF(name, aliasname) \
-  extern __typeof (name) aliasname __attribute__ ((alias (#name)));
-# endif
 # define INTDEF2(name, newname) strong_alias (name, newname##_internal)
 # define INTVARDEF2(name, newname) _INTVARDEF (name, newname##_internal)
 #else
@@ -549,16 +547,10 @@ for linking")
    versioned_symbol (libc, __real_foo, foo, GLIBC_2_1);
    libc_hidden_ver (__real_foo, foo)  */
 
-#if defined SHARED && defined DO_VERSIONING \
-    && !defined HAVE_BROKEN_ALIAS_ATTRIBUTE && !defined NO_HIDDEN
+#if defined SHARED && defined DO_VERSIONING && !defined NO_HIDDEN
 # ifndef __ASSEMBLER__
-#  if !defined HAVE_VISIBILITY_ATTRIBUTE \
-      || defined HAVE_BROKEN_VISIBILITY_ATTRIBUTE
-#   define __hidden_proto_hiddenattr(attrs...)
-#  else
-#   define __hidden_proto_hiddenattr(attrs...) \
+#  define __hidden_proto_hiddenattr(attrs...) \
   __attribute__ ((visibility ("hidden"), ##attrs))
-#  endif
 #  define hidden_proto(name, attrs...) \
   __hidden_proto (name, __GI_##name, ##attrs)
 #  define __hidden_proto(name, internal, attrs...) \
diff --git a/include/link.h b/include/link.h
index 80eff3a677..b45deabf7f 100644
--- a/include/link.h
+++ b/include/link.h
@@ -42,7 +42,7 @@ extern unsigned int la_objopen (struct link_map *__map, Lmid_t __lmid,
 #include <stddef.h>
 #include <bits/linkmap.h>
 #include <dl-lookupcfg.h>
-#include <tls.h>		/* Defines USE_TLS.  */
+#include <tls.h>
 #include <bits/libc-lock.h>
 #include <rtld-lowlevel.h>
 
@@ -261,7 +261,6 @@ struct link_map
       const ElfW(Sym) *ret;
     } l_lookup_cache;
 
-#ifdef USE_TLS
     /* Thread-local storage related info.  */
 
     /* Start of the initialization image.  */
@@ -274,14 +273,13 @@ struct link_map
     size_t l_tls_align;
     /* Offset of first byte module alignment.  */
     size_t l_tls_firstbyte_offset;
-# ifndef NO_TLS_OFFSET
-#  define NO_TLS_OFFSET	0
-# endif
+#ifndef NO_TLS_OFFSET
+# define NO_TLS_OFFSET	0
+#endif
     /* For objects present at startup time: offset in the static TLS block.  */
     ptrdiff_t l_tls_offset;
     /* Index of the module in the dtv array.  */
     size_t l_tls_modid;
-#endif
 
     /* Information used to change permission after the relocations are
        done.  */
diff --git a/include/stdio.h b/include/stdio.h
index e040380d79..b293b8f1c7 100644
--- a/include/stdio.h
+++ b/include/stdio.h
@@ -131,7 +131,6 @@ libc_hidden_proto (__vsnprintf_chk)
 libc_hidden_proto (__vfprintf_chk)
 
 #  if !defined NOT_IN_libc && defined SHARED && defined DO_VERSIONING \
-  && defined HAVE_VISIBILITY_ATTRIBUTE && !defined HAVE_BROKEN_ALIAS_ATTRIBUTE\
   && !defined NO_HIDDEN
 /* Special gcc builtins.  */
 extern size_t __builtin_fwrite (const void *, size_t, size_t, void *)
diff --git a/include/tls.h b/include/tls.h
index ffd3e4e70c..1642456a73 100644
--- a/include/tls.h
+++ b/include/tls.h
@@ -5,8 +5,7 @@
 
 #include_next <tls.h>
 
-#if USE_TLS && HAVE___THREAD \
-    && (!defined NOT_IN_libc || defined IS_IN_libpthread)
+#if HAVE___THREAD && (!defined NOT_IN_libc || defined IS_IN_libpthread)
 
 # define USE___THREAD 1