]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
* configure.in: Require assembler support for visibility, compiler
authorUlrich Drepper <drepper@redhat.com>
Sat, 28 Oct 2006 06:44:41 +0000 (06:44 +0000)
committerUlrich Drepper <drepper@redhat.com>
Sat, 28 Oct 2006 06:44:41 +0000 (06:44 +0000)
support for visibility and aliases, linker support for various -z
options.
* Makeconfig: Remove conditional code which now is unnecessary.
* config.h.in: Likewise.
* config.make.in: Likewise.
* dlfcn/Makefile: Likewise.
* elf/Makefile: Likewise.
* elf/dl-load.c: Likewise.
* elf/rtld.c: Likewise.
* include/libc-symbols.h: Likewise.
* include/stdio.h: Likewise.
* io/Makefile: Likewise.
* io/fstat.c: Likewise.
* io/fstat64.c: Likewise.
* io/fstatat.c: Likewise.
* io/fstatat64.c: Likewise.
* io/lstat.c: Likewise.
* io/lstat64.c: Likewise.
* io/mknod.c: Likewise.
* io/mknodat.c: Likewise.
* io/stat.c: Likewise.
* io/stat64.c: Likewise.
* libio/stdio.c: Likewise.
* nscd/Makefile: Likewise.
* stdlib/Makefile: Likewise.
* stdlib/atexit.c: Likewise.
* sysdeps/generic/ldsodefs.h: Likewise.
* sysdeps/i386/dl-machine.h: Likewise.
* sysdeps/i386/sysdep.h: Likewise.
* sysdeps/i386/i686/memcmp.S: Likewise.
* sysdeps/powerpc/powerpc32/sysdep.h: Likewise.
* sysdeps/unix/sysv/linux/i386/sigaction.c: Likewise.
* sysdeps/unix/sysv/linux/x86_64/sigaction.c: Likewise.

35 files changed:
ChangeLog
Makeconfig
config.h.in
config.make.in
configure
configure.in
dlfcn/Makefile
elf/Makefile
elf/dl-load.c
elf/rtld.c
include/libc-symbols.h
include/stdio.h
io/Makefile
io/fstat.c
io/fstat64.c
io/fstatat.c
io/fstatat64.c
io/lstat.c
io/lstat64.c
io/mknod.c
io/mknodat.c
io/stat.c
io/stat64.c
libio/stdio.c
nscd/Makefile
stdlib/Makefile
stdlib/atexit.c
sysdeps/generic/ldsodefs.h
sysdeps/i386/dl-machine.h
sysdeps/i386/i686/memcmp.S
sysdeps/i386/sysdep.h
sysdeps/powerpc/powerpc32/sysdep.h
sysdeps/unix/sysv/linux/configure
sysdeps/unix/sysv/linux/i386/sigaction.c
sysdeps/unix/sysv/linux/x86_64/sigaction.c

index 554d8776e75ccf9376d82af16f3d74073ebfb93c..8159aa42462bc40ccfca88ed1d9498a848182eff 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,40 @@
 2006-10-27  Ulrich Drepper  <drepper@redhat.com>
 
+       * configure.in: Require assembler support for visibility, compiler
+       support for visibility and aliases, linker support for various -z
+       options.
+       * Makeconfig: Remove conditional code which now is unnecessary.
+       * config.h.in: Likewise.
+       * config.make.in: Likewise.
+       * dlfcn/Makefile: Likewise.
+       * elf/Makefile: Likewise.
+       * elf/dl-load.c: Likewise.
+       * elf/rtld.c: Likewise.
+       * include/libc-symbols.h: Likewise.
+       * include/stdio.h: Likewise.
+       * io/Makefile: Likewise.
+       * io/fstat.c: Likewise.
+       * io/fstat64.c: Likewise.
+       * io/fstatat.c: Likewise.
+       * io/fstatat64.c: Likewise.
+       * io/lstat.c: Likewise.
+       * io/lstat64.c: Likewise.
+       * io/mknod.c: Likewise.
+       * io/mknodat.c: Likewise.
+       * io/stat.c: Likewise.
+       * io/stat64.c: Likewise.
+       * libio/stdio.c: Likewise.
+       * nscd/Makefile: Likewise.
+       * stdlib/Makefile: Likewise.
+       * stdlib/atexit.c: Likewise.
+       * sysdeps/generic/ldsodefs.h: Likewise.
+       * sysdeps/i386/dl-machine.h: Likewise.
+       * sysdeps/i386/sysdep.h: Likewise.
+       * sysdeps/i386/i686/memcmp.S: Likewise.
+       * sysdeps/powerpc/powerpc32/sysdep.h: Likewise.
+       * sysdeps/unix/sysv/linux/i386/sigaction.c: Likewise.
+       * sysdeps/unix/sysv/linux/x86_64/sigaction.c: Likewise.
+
        * Makerules: USE_TLS support is now default.
        * tls.make.c: Likewise.
        * csu/Versions: Likewise.
index 5a1aebccffaa3dbadea92e6ab92c9a3d33c0bf99..349f94d9ac043f09a31c4b298f6bf78a3e7ea196 100644 (file)
@@ -407,11 +407,9 @@ LDFLAGS.so += $(combreloc-LDFLAGS)
 LDFLAGS-rtld += $(combreloc-LDFLAGS)
 endif
 
-ifeq (yes,$(have-z-relro))
 relro-LDFLAGS = -Wl,-z,relro
 LDFLAGS.so += $(relro-LDFLAGS)
 LDFLAGS-rtld += $(relro-LDFLAGS)
-endif
 
 ifeq (yes,$(have-hash-style))
 # For the time being we unconditionally use 'both'.  At some time we
index da973f6a5d897fd7ee4814cee0493e8a213979ae..a46e405269b168f57b3d6f41b6cfa8550bc99407 100644 (file)
 /* Define if the linker supports the -z combreloc option.  */
 #undef HAVE_Z_COMBRELOC
 
-/* Define if the assembler supported .protected.  */
-#undef HAVE_PROTECTED
-
-/* Define if the assembler supported .hidden.  */
-#undef HAVE_HIDDEN
-
-/* Define if the compiler supports __attribute__ ((visibility (...))).  */
-#undef HAVE_VISIBILITY_ATTRIBUTE
-
-/* Define if the compiler doesn't support __attribute__ ((visibility (...)))
-   together with __asm__ redirection properly.  */
-#undef HAVE_BROKEN_VISIBILITY_ATTRIBUTE
-
-/* Define if the compiler doesn't support __attribute__ ((alias (...)))
-   together with __asm__ redirection properly.  */
-#undef HAVE_BROKEN_ALIAS_ATTRIBUTE
-
 /* Define if _rtld_local structure should be forced into .sdata section.  */
 #undef HAVE_SDATA_SECTION
 
 /* Defined if forced unwind support is available.  */
 #undef HAVE_FORCED_UNWIND
 
-/* Defined if the linker supports the -z relro option.  */
-#undef HAVE_Z_RELRO
-
 /* Defined of libidn is available.  */
 #undef HAVE_LIBIDN
 
index 677da3a891764d73f3c86dd7ea060faf9e5b7740..7aa9c1c12dadd8c17b0d5d0988d671ede3e3aee8 100644 (file)
@@ -38,14 +38,9 @@ c++-sysincludes = @CXX_SYSINCLUDES@
 all-warnings = @all_warnings@
 
 elf = @elf@
-have-protected = @libc_cv_asm_protected_directive@
-have-z-nodelete = @libc_cv_z_nodelete@
-have-z-nodlopen = @libc_cv_z_nodlopen@
-have-z-initfirst = @libc_cv_z_initfirst@
 have-z-combreloc = @libc_cv_z_combreloc@
 have-z-execstack = @libc_cv_z_execstack@
 have-initfini = @libc_cv_have_initfini@
-have-z-relro = @libc_cv_z_relro@
 have-Bgroup = @libc_cv_Bgroup@
 have-as-needed = @libc_cv_as_needed@
 libgcc_s_suffix = @libc_cv_libgcc_s_suffix@
index 8bd2144a8bf60b2e7f2f66d893ed907a0f480982..b04bf8b71d765e493ce9726132eb554e968ab65f 100755 (executable)
--- a/configure
+++ b/configure
@@ -313,7 +313,7 @@ ac_includes_default="\
 # include <unistd.h>
 #endif"
 
-ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS with_fp with_cvs enable_check_abi oldest_abi bindnow force_install all_warnings build build_cpu build_vendor build_os host host_cpu host_vendor host_os subdirs add_ons add_on_subdirs base_machine submachine sysnames sysdeps_add_ons INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA LN_S CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC OBJEXT BUILD_CC cross_compiling CPP CXX CXXFLAGS ac_ct_CXX AR OBJDUMP RANLIB ac_ct_RANLIB MIG AS LD PWD_P MAKE MSGFMT MAKEINFO SED AUTOCONF SYSINCLUDES CXX_SYSINCLUDES libc_cv_gcc_static_libgcc BASH libc_cv_have_bash2 KSH libc_cv_have_ksh AWK PERL INSTALL_INFO BISON VERSIONING libc_cv_asm_protected_directive libc_cv_cc_with_libunwind libc_cv_z_nodelete libc_cv_z_nodlopen libc_cv_z_initfirst libc_cv_z_relro libc_cv_Bgroup libc_cv_libgcc_s_suffix libc_cv_as_needed ASFLAGS_config libc_cv_z_combreloc libc_cv_z_execstack libc_cv_fpie libc_cv_hashstyle fno_unit_at_a_time libc_cv_ssp libc_cv_have_initfini no_whole_archive exceptions LIBGD have_libaudit have_libcap have_selinux EGREP sizeof_long_double libc_cv_gcc_unwind_find_fde uname_sysname uname_release uname_version old_glibc_headers libc_cv_slibdir libc_cv_localedir libc_cv_sysconfdir libc_cv_rootsbindir libc_cv_forced_unwind use_ldconfig ldd_rewrite_script elf xcoff static shared pic_default profile omitfp bounded static_nss nopic_initfini DEFINES mach_interface_list VERSION RELEASE LIBOBJS LTLIBOBJS'
+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS with_fp with_cvs enable_check_abi oldest_abi bindnow force_install all_warnings build build_cpu build_vendor build_os host host_cpu host_vendor host_os subdirs add_ons add_on_subdirs base_machine submachine sysnames sysdeps_add_ons INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA LN_S CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC OBJEXT BUILD_CC cross_compiling CPP CXX CXXFLAGS ac_ct_CXX AR OBJDUMP RANLIB ac_ct_RANLIB MIG AS LD PWD_P MAKE MSGFMT MAKEINFO SED AUTOCONF SYSINCLUDES CXX_SYSINCLUDES libc_cv_gcc_static_libgcc BASH libc_cv_have_bash2 KSH libc_cv_have_ksh AWK PERL INSTALL_INFO BISON VERSIONING libc_cv_cc_with_libunwind libc_cv_Bgroup libc_cv_libgcc_s_suffix libc_cv_as_needed ASFLAGS_config libc_cv_z_combreloc libc_cv_z_execstack libc_cv_fpie libc_cv_hashstyle fno_unit_at_a_time libc_cv_ssp libc_cv_have_initfini no_whole_archive exceptions LIBGD have_libaudit have_libcap have_selinux EGREP sizeof_long_double libc_cv_gcc_unwind_find_fde uname_sysname uname_release uname_version old_glibc_headers libc_cv_slibdir libc_cv_localedir libc_cv_sysconfdir libc_cv_rootsbindir libc_cv_forced_unwind use_ldconfig ldd_rewrite_script elf xcoff static shared pic_default profile omitfp bounded static_nss nopic_initfini DEFINES mach_interface_list VERSION RELEASE LIBOBJS LTLIBOBJS'
 ac_subst_files=''
 
 # Initialize some variables set by options.
@@ -5339,22 +5339,15 @@ EOF
   (exit $ac_status); }; }; then
     libc_cv_asm_protected_directive=yes
   else
-    libc_cv_asm_protected_directive=no
+    { { echo "$as_me:$LINENO: error: assembler support for symbol visibility is required" >&5
+echo "$as_me: error: assembler support for symbol visibility is required" >&2;}
+   { (exit 1); exit 1; }; }
   fi
   rm -f conftest*
 fi
 echo "$as_me:$LINENO: result: $libc_cv_asm_protected_directive" >&5
 echo "${ECHO_T}$libc_cv_asm_protected_directive" >&6
 
-  cat >>confdefs.h <<\_ACEOF
-#define HAVE_PROTECTED 1
-_ACEOF
-
-  cat >>confdefs.h <<\_ACEOF
-#define HAVE_HIDDEN 1
-_ACEOF
-
-
   if test $libc_cv_asm_protected_directive = yes; then
     echo "$as_me:$LINENO: checking whether __attribute__((visibility())) is supported" >&5
 echo $ECHO_N "checking whether __attribute__((visibility())) is supported... $ECHO_C" >&6
@@ -5383,11 +5376,10 @@ EOF
 fi
 echo "$as_me:$LINENO: result: $libc_cv_visibility_attribute" >&5
 echo "${ECHO_T}$libc_cv_visibility_attribute" >&6
-    if test $libc_cv_visibility_attribute = yes; then
-      cat >>confdefs.h <<\_ACEOF
-#define HAVE_VISIBILITY_ATTRIBUTE 1
-_ACEOF
-
+    if test $libc_cv_visibility_attribute != yes; then
+      { { echo "$as_me:$LINENO: error: compiler support for visibility attribute is required" >&5
+echo "$as_me: error: compiler support for visibility attribute is required" >&2;}
+   { (exit 1); exit 1; }; }
     fi
   fi
 
@@ -5419,10 +5411,9 @@ fi
 echo "$as_me:$LINENO: result: $libc_cv_broken_visibility_attribute" >&5
 echo "${ECHO_T}$libc_cv_broken_visibility_attribute" >&6
     if test $libc_cv_broken_visibility_attribute = yes; then
-      cat >>confdefs.h <<\_ACEOF
-#define HAVE_BROKEN_VISIBILITY_ATTRIBUTE 1
-_ACEOF
-
+      { { echo "$as_me:$LINENO: error: working compiler support for visibility attribute is required" >&5
+echo "$as_me: error: working compiler support for visibility attribute is required" >&2;}
+   { (exit 1); exit 1; }; }
     fi
   fi
 
@@ -5457,10 +5448,9 @@ fi
 echo "$as_me:$LINENO: result: $libc_cv_broken_alias_attribute" >&5
 echo "${ECHO_T}$libc_cv_broken_alias_attribute" >&6
   if test $libc_cv_broken_alias_attribute = yes; then
-    cat >>confdefs.h <<\_ACEOF
-#define HAVE_BROKEN_ALIAS_ATTRIBUTE 1
-_ACEOF
-
+    { { echo "$as_me:$LINENO: error: working alias attribute support required" >&5
+echo "$as_me: error: working alias attribute support required" >&2;}
+   { (exit 1); exit 1; }; }
   fi
 
   if test $libc_cv_visibility_attribute = yes; then
@@ -5572,14 +5562,15 @@ EOF
   then
     libc_cv_z_nodelete=yes
   else
-    libc_cv_z_nodelete=no
+    { { echo "$as_me:$LINENO: error: linker with -z nodelete support required" >&5
+echo "$as_me: error: linker with -z nodelete support required" >&2;}
+   { (exit 1); exit 1; }; }
   fi
   rm -f conftest*
 fi
 echo "$as_me:$LINENO: result: $libc_cv_z_nodelete" >&5
 echo "${ECHO_T}$libc_cv_z_nodelete" >&6
 
-
   echo "$as_me:$LINENO: checking for -z nodlopen option" >&5
 echo $ECHO_N "checking for -z nodlopen option... $ECHO_C" >&6
 if test "${libc_cv_z_nodlopen+set}" = set; then
@@ -5600,14 +5591,15 @@ EOF
   then
     libc_cv_z_nodlopen=yes
   else
-    libc_cv_z_nodlopen=no
+    { { echo "$as_me:$LINENO: error: linker with -z nodlopen support required" >&5
+echo "$as_me: error: linker with -z nodlopen support required" >&2;}
+   { (exit 1); exit 1; }; }
   fi
   rm -f conftest*
 fi
 echo "$as_me:$LINENO: result: $libc_cv_z_nodlopen" >&5
 echo "${ECHO_T}$libc_cv_z_nodlopen" >&6
 
-
   echo "$as_me:$LINENO: checking for -z initfirst option" >&5
 echo $ECHO_N "checking for -z initfirst option... $ECHO_C" >&6
 if test "${libc_cv_z_initfirst+set}" = set; then
@@ -5628,14 +5620,15 @@ EOF
   then
     libc_cv_z_initfirst=yes
   else
-    libc_cv_z_initfirst=no
+    { { echo "$as_me:$LINENO: error: linker with -z initfirst support required" >&5
+echo "$as_me: error: linker with -z initfirst support required" >&2;}
+   { (exit 1); exit 1; }; }
   fi
   rm -f conftest*
 fi
 echo "$as_me:$LINENO: result: $libc_cv_z_initfirst" >&5
 echo "${ECHO_T}$libc_cv_z_initfirst" >&6
 
-
   echo "$as_me:$LINENO: checking for -z relro option" >&5
 echo $ECHO_N "checking for -z relro option... $ECHO_C" >&6
 if test "${libc_cv_z_relro+set}" = set; then
@@ -5662,12 +5655,10 @@ else
 fi
 echo "$as_me:$LINENO: result: $libc_cv_z_relro" >&5
 echo "${ECHO_T}$libc_cv_z_relro" >&6
-
-  if test $libc_cv_z_relro = yes; then
-    cat >>confdefs.h <<\_ACEOF
-#define HAVE_Z_RELRO 1
-_ACEOF
-
+  if test $libc_cv_z_relro != yes; then
+    { { echo "$as_me:$LINENO: error: linker with -z relro support required" >&5
+echo "$as_me: error: linker with -z relro support required" >&2;}
+   { (exit 1); exit 1; }; }
   fi
 
   echo "$as_me:$LINENO: checking for -Bgroup option" >&5
@@ -8510,12 +8501,7 @@ s,@PERL@,$PERL,;t t
 s,@INSTALL_INFO@,$INSTALL_INFO,;t t
 s,@BISON@,$BISON,;t t
 s,@VERSIONING@,$VERSIONING,;t t
-s,@libc_cv_asm_protected_directive@,$libc_cv_asm_protected_directive,;t t
 s,@libc_cv_cc_with_libunwind@,$libc_cv_cc_with_libunwind,;t t
-s,@libc_cv_z_nodelete@,$libc_cv_z_nodelete,;t t
-s,@libc_cv_z_nodlopen@,$libc_cv_z_nodlopen,;t t
-s,@libc_cv_z_initfirst@,$libc_cv_z_initfirst,;t t
-s,@libc_cv_z_relro@,$libc_cv_z_relro,;t t
 s,@libc_cv_Bgroup@,$libc_cv_Bgroup,;t t
 s,@libc_cv_libgcc_s_suffix@,$libc_cv_libgcc_s_suffix,;t t
 s,@libc_cv_as_needed@,$libc_cv_as_needed,;t t
index 6a7e51d853ae81c76c1375f26ccca8b55e2237e5..fb43804b1f6f3519da2e31a70bac7e060fbfc79e 100644 (file)
@@ -1259,12 +1259,9 @@ EOF
   if AC_TRY_COMMAND(${CC-cc} -c $ASFLAGS conftest.s 1>&AS_MESSAGE_LOG_FD); then
     libc_cv_asm_protected_directive=yes
   else
-    libc_cv_asm_protected_directive=no
+    AC_MSG_ERROR(assembler support for symbol visibility is required)
   fi
   rm -f conftest*])
-  AC_SUBST(libc_cv_asm_protected_directive)
-  AC_DEFINE(HAVE_PROTECTED)
-  AC_DEFINE(HAVE_HIDDEN)
 
   if test $libc_cv_asm_protected_directive = yes; then
     AC_CACHE_CHECK(whether __attribute__((visibility())) is supported,
@@ -1283,8 +1280,8 @@ EOF
                  fi
                  rm -f conftest.[cs]
                 ])
-    if test $libc_cv_visibility_attribute = yes; then
-      AC_DEFINE(HAVE_VISIBILITY_ATTRIBUTE)
+    if test $libc_cv_visibility_attribute != yes; then
+      AC_MSG_ERROR(compiler support for visibility attribute is required)
     fi
   fi
 
@@ -1307,7 +1304,7 @@ changequote([,])dnl
                  rm -f conftest.c conftest.s
                 ])
     if test $libc_cv_broken_visibility_attribute = yes; then
-      AC_DEFINE(HAVE_BROKEN_VISIBILITY_ATTRIBUTE)
+      AC_MSG_ERROR(working compiler support for visibility attribute is required)
     fi
   fi
 
@@ -1331,7 +1328,7 @@ EOF
                  rm -f conftest.c conftest.s
                 ])
   if test $libc_cv_broken_alias_attribute = yes; then
-    AC_DEFINE(HAVE_BROKEN_ALIAS_ATTRIBUTE)
+    AC_MSG_ERROR(working alias attribute support required)
   fi
 
   if test $libc_cv_visibility_attribute = yes; then
@@ -1403,10 +1400,9 @@ EOF
   then
     libc_cv_z_nodelete=yes
   else
-    libc_cv_z_nodelete=no
+    AC_MSG_ERROR(linker with -z nodelete support required)
   fi
   rm -f conftest*])
-  AC_SUBST(libc_cv_z_nodelete)
 
   AC_CACHE_CHECK(for -z nodlopen option,
                 libc_cv_z_nodlopen, [dnl
@@ -1420,10 +1416,9 @@ EOF
   then
     libc_cv_z_nodlopen=yes
   else
-    libc_cv_z_nodlopen=no
+    AC_MSG_ERROR(linker with -z nodlopen support required)
   fi
   rm -f conftest*])
-  AC_SUBST(libc_cv_z_nodlopen)
 
   AC_CACHE_CHECK(for -z initfirst option,
                 libc_cv_z_initfirst, [dnl
@@ -1437,10 +1432,9 @@ EOF
   then
     libc_cv_z_initfirst=yes
   else
-    libc_cv_z_initfirst=no
+    AC_MSG_ERROR(linker with -z initfirst support required)
   fi
   rm -f conftest*])
-  AC_SUBST(libc_cv_z_initfirst)
 
   AC_CACHE_CHECK(for -z relro option,
                 libc_cv_z_relro, [dnl
@@ -1452,9 +1446,8 @@ EOF
       libc_cv_z_relro=yes
     fi
   fi])
-  AC_SUBST(libc_cv_z_relro)
-  if test $libc_cv_z_relro = yes; then
-    AC_DEFINE(HAVE_Z_RELRO)
+  if test $libc_cv_z_relro != yes; then
+    AC_MSG_ERROR(linker with -z relro support required)
   fi
 
   AC_CACHE_CHECK(for -Bgroup option,
index 63e7b31b2a9b147cb31b08d16c6ef1c18523e6ed..e8fbab2958c17dca26e332062fd97baed95a43c5 100644 (file)
@@ -41,10 +41,7 @@ endif
 ifeq (yes,$(build-shared))
 tests = glrefmain failtest tst-dladdr default errmsg1 tstcxaatexit \
        bug-dlopen1 bug-dlsym1 tst-dlinfo bug-atexit1 bug-atexit2 \
-       bug-atexit3
-ifeq (yes,$(have-protected))
-tests += tstatexit
-endif
+       bug-atexit3 tstatexit
 endif
 modules-names = glreflib1 glreflib2 failtestmod defaultmod1 defaultmod2 \
                errmsg1mod modatexit modcxaatexit \
index 06e376d80321222a154e6005f7a9164820a117d4..afebaec1ec0d4b1e7f28759125a396133131ea26 100644 (file)
@@ -159,8 +159,8 @@ endif
 ifeq (yes,$(build-shared))
 tests += loadtest restest1 preloadtest loadfail multiload origtest resolvfail \
         constload1 order $(tests-vis-$(have-protected)) noload filter unload \
-        reldep reldep2 reldep3 reldep4 $(tests-nodelete-$(have-z-nodelete)) \
-        $(tests-nodlopen-$(have-z-nodlopen)) neededtest neededtest2 \
+        reldep reldep2 reldep3 reldep4 nodelete nodelete2 \
+        nodlopen nodlopen2 neededtest neededtest2 \
         neededtest3 neededtest4 unload2 lateglobal initfirst global \
         restest2 next dblload dblunload reldep5 reldep6 reldep7 reldep8 \
         circleload1 tst-tls3 tst-tls4 tst-tls5 tst-tls6 tst-tls7 tst-tls8 \
@@ -175,8 +175,6 @@ tests += loadtest restest1 preloadtest loadfail multiload origtest resolvfail \
 #       reldep9
 test-srcs = tst-pathopt
 tests-vis-yes = vismain
-tests-nodelete-yes = nodelete nodelete2
-tests-nodlopen-yes = nodlopen nodlopen2
 tests-execstack-yes = tst-execstack tst-execstack-needed tst-execstack-prog
 endif
 ifeq (yesyes,$(have-fpie)$(build-shared))
@@ -186,8 +184,9 @@ tests: $(objpfx)tst-leaks1-mem
 modules-names = testobj1 testobj2 testobj3 testobj4 testobj5 testobj6 \
                testobj1_1 failobj constload2 constload3 unloadmod \
                dep1 dep2 dep3 dep4 $(modules-vis-$(have-protected)) \
-               $(modules-nodelete-$(have-z-nodelete)) \
-               $(modules-nodlopen-$(have-z-nodlopen)) filtmod1 filtmod2 \
+               nodelmod1 nodelmod2 nodelmod3 nodelmod4 \
+               nodel2mod1 nodel2mod2 nodel2mod3 \
+               nodlopenmod nodlopenmod2 filtmod1 filtmod2 \
                reldepmod1 reldepmod2 reldepmod3 reldepmod4 nextmod1 nextmod2 \
                reldep4mod1 reldep4mod2 reldep4mod3 reldep4mod4 \
                neededobj1 neededobj2 neededobj3 neededobj4 \
@@ -221,9 +220,6 @@ ifeq (yesyes,$(have-fpie)$(build-shared))
 modules-names += tst-piemod1
 endif
 modules-vis-yes = vismod1 vismod2 vismod3
-modules-nodelete-yes = nodelmod1 nodelmod2 nodelmod3 nodelmod4 \
-                      nodel2mod1 nodel2mod2 nodel2mod3
-modules-nodlopen-yes = nodlopenmod nodlopenmod2
 modules-execstack-yes = tst-execstack-mod
 extra-test-objs += $(addsuffix .os,$(strip $(modules-names)))
 # We need this variable to be sure the test modules get the right CPPFLAGS.
index 2adeb60fcd90157b291d6a895bc4b997aa5ae31b..ccbbf4fdd2fc036f9c4dfa087bedb0f982be4b21 100644 (file)
@@ -1392,7 +1392,7 @@ cannot allocate TLS data structures for initial thread");
         requires that it be executable.  We must change the
         protection of the variable which contains the flags used in
         the mprotect calls.  */
-#if defined HAVE_Z_RELRO && defined SHARED
+#ifdef SHARED
       if ((mode & (__RTLD_DLOPEN | __RTLD_AUDIT)) == __RTLD_DLOPEN)
        {
          const uintptr_t p = (uintptr_t) &__stack_prot & -GLRO(dl_pagesize);
@@ -1935,11 +1935,10 @@ open_path (const char *name, size_t namelen, int preloaded,
         must not be freed using the general free() in libc.  */
       if (sps->malloced)
        free (sps->dirs);
-#ifdef HAVE_Z_RELRO
+
       /* rtld_search_dirs is attribute_relro, therefore avoid writing
         into it.  */
       if (sps != &rtld_search_dirs)
-#endif
        sps->dirs = (void *) -1;
     }
 
index edcc1f7e92ea9e2d85174a00901a66b1f1a1a297..5e6ee516039d2f05fdc37b9f8f13b44acffcd768 100644 (file)
@@ -207,8 +207,7 @@ DL_SYSINFO_IMPLEMENTATION
    is fine, too.  The latter is important here.  We can avoid setting
    up a temporary link map for ld.so if we can mark _rtld_global as
    hidden.  */
-#if defined PI_STATIC_AND_HIDDEN && defined HAVE_HIDDEN \
-    && defined HAVE_VISIBILITY_ATTRIBUTE
+#ifdef PI_STATIC_AND_HIDDEN
 # define DONT_USE_BOOTSTRAP_MAP        1
 #endif
 
index da46f5e8040e15395b97d7284203f78707410a8d..9eabcbd3548679b710d2d1757a8ffeda9ba2d35c 100644 (file)
 #  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)
 # 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...) \
index e040380d79223e2e3f013b2cb8bee2a1fdba6298..b293b8f1c7387859100b2dc1e0a3064a13d4630f 100644 (file)
@@ -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 *)
index c06d747d4af5a9c0d647ffe6b47cad47f9086d06..4aadfbca01143ef0ba35a6c441442b1065aedeca 100644 (file)
@@ -90,19 +90,6 @@ CFLAGS-posix_fallocate64.c = -fexceptions
 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
-CFLAGS-fstatat.c = -DHAVE_DOT_HIDDEN
-CFLAGS-fstatat64.c = -DHAVE_DOT_HIDDEN
-CFLAGS-mknodat.c = -DHAVE_DOT_HIDDEN
-endif
-
 test-stat2-ARGS = Makefile . $(objpfx)test-stat2
 
 tst-statvfs-ARGS = $(objpfx)tst-statvfs tst-statvfs.c /tmp
index 0f95c1a6e23c2c1362ba00534e39c4a715baa940..e2f9abd384b177e652b9d45b8d64ea27c7e11bef 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 1997, 1998, 2001 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 1997, 1998, 2001, 2006 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
 #undef fstat
 #undef __fstat
 int
+attribute_hidden
 __fstat (int fd, struct stat *buf)
 {
   return __fxstat (_STAT_VER, fd, 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
+weak_hidden_alias (__fstat, fstat)
index 79bd967d8fc855df267c9c15ad73e2c3aed23a39..fe655444b2c27c5bfb210f6e4bf69bf0b7f307f3 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 1997, 2001 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 1997, 2001, 2006 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
 
 #undef fstat64
 int
+attribute_hidden
 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
index 1ac80597a0ebc63204f50bfe677e6c35d6870007..abf083c72e1d73723c6779eb049b6413c54ecb8f 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 2005 Free Software Foundation, Inc.
+/* Copyright (C) 2005, 2006 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
 
 #undef fstatat
 int
+attribute_hidden
 fstatat (int fd, const char *file, struct stat *buf, int flag)
 {
   return __fxstatat (_STAT_VER, fd, file, buf, flag);
 }
-
-/* Hide the symbol so that no definition but the one locally in the
-   executable or DSO is used.  */
-#ifdef HAVE_DOT_HIDDEN
-asm (".hidden\tfstatat");
-#endif
index a14b42d42e4742f2daf8ab2f9f76109cf1133b2f..6fdf709af512b3926a14693aa49f25e8e100730c 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 2005 Free Software Foundation, Inc.
+/* Copyright (C) 2005, 2006 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
 
 #undef fstatat64
 int
+attribute_hidden
 fstatat64 (int fd, const char *file, struct stat64 *buf, int flag)
 {
   return __fxstatat64 (_STAT_VER, fd, file, buf, flag);
 }
-
-/* Hide the symbol so that no definition but the one locally in the
-   executable or DSO is used.  */
-#ifdef HAVE_DOT_HIDDEN
-asm (".hidden\tfstatat64");
-#endif
index c4d7abe2c28832f33b7504727018f946d32e2f2a..620e47877aa4b6c390fbe82b91efdad26041792c 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 1997, 2001 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 1997, 2001, 2006 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
 #undef lstat
 #undef __lstat
 int
+attribute_hidden
 __lstat (const char *file, struct stat *buf)
 {
   return __lxstat (_STAT_VER, file, 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
+weak_hidden_alias (__lstat, lstat)
index 8a994e4867cf9b44f6ad8adfdb2110ee5cb6688c..3e4ba2d9727a58ad22d96e45be27696f3a1b3023 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 1997, 2001 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 1997, 2001, 2006 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
 
 #undef lstat64
 int
+attribute_hidden
 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
index 7d43593a25692cf91a73d11d23fb4636d97ef656..cc5fd26105ab1ba17baef6ae9e9b2bdf4fd92f6c 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995, 1996, 2001 Free Software Foundation, Inc.
+/* Copyright (C) 1995, 1996, 2001, 2006 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
    all callers.  */
 
 int
+attribute_hidden
 __mknod (const char *path, mode_t mode, dev_t dev)
 {
   return __xmknod (_MKNOD_VER, path, mode, &dev);
 }
 
-weak_alias (__mknod, mknod)
-
-/* Hide the symbol so that no definition but the one locally in the
-   executable or DSO is used.  */
-#ifdef HAVE_DOT_HIDDEN
-asm (".hidden\tmknod");
-asm (".hidden\t__mknod");
-#endif
+weak_hidden_alias (__mknod, mknod)
index ac515b5b4838c5db270361d6f3578f8b9555a7cd..b02ba695f961ee811666738c427c551d69fe4638 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995, 1996, 2001, 2005 Free Software Foundation, Inc.
+/* Copyright (C) 1995, 1996, 2001, 2005, 2006 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
    all callers.  */
 
 int
+attribute_hidden
 mknodat (int fd, const char *path, mode_t mode, dev_t dev)
 {
   return __xmknodat (_MKNOD_VER, fd, path, mode, &dev);
 }
-
-
-/* Hide the symbol so that no definition but the one locally in the
-   executable or DSO is used.  */
-#ifdef HAVE_DOT_HIDDEN
-asm (".hidden\tmknodat");
-#endif
index 6af604957e15622876b80242600b4d5d9f8f85d1..6f1c28fc567210b56194766c83a786bc43959080 100644 (file)
--- a/io/stat.c
+++ b/io/stat.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 1997, 2001 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 1997, 2001, 2006 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
 
 #undef stat
 int
+attribute_hidden
 __stat (const char *file, struct stat *buf)
 {
   return __xstat (_STAT_VER, file, 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
+weak_hidden_alias (__stat, stat)
index cadf1e1f1da221479661476ec1b19d20285639e9..14e036a700c33a2cf9397b4a50f3b3fd7c422474 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 1997, 2001 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 1997, 2001, 2006 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
 
 #undef stat64
 int
+attribute_hidden
 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
index 8dc24ed98f5fcccf641402fca4a8167eb6802fbd..b2baf65be3f82748e2c517722123f8ddce6aa2ea 100644 (file)
@@ -1,4 +1,5 @@
-/* Copyright (C) 1993,1994,1996,1997,2000,2002 Free Software Foundation, Inc.
+/* Copyright (C) 1993,1994,1996,1997,2000,2002,2006
+   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
@@ -40,14 +41,9 @@ _IO_FILE *stderr = (FILE *) &_IO_2_1_stderr_;
 #undef _IO_stderr
 #ifdef _LIBC
 # define AL(name) AL2 (name, _IO_##name)
-# if defined HAVE_VISIBILITY_ATTRIBUTE
-#  define AL2(name, al) \
+# define AL2(name, al) \
   extern __typeof (name) al __attribute__ ((alias (#name),                    \
                                             visibility ("hidden")))
-# else
-#  define AL2(name, al) \
-  extern __typeof (name) al __attribute__ ((alias (#name)))
-# endif
 AL(stdin);
 AL(stdout);
 AL(stderr);
index 9c980182173aadc18cc28b92cd2b07968fb374d2..21657abeb73217c432931f03266f27d07efba598 100644 (file)
@@ -119,9 +119,7 @@ CFLAGS-initgrcache.c += $(nscd-cflags)
 CFLAGS-gai.c += $(nscd-cflags)
 
 ifeq (yesyes,$(have-fpie)$(build-shared))
-ifeq (yes,$(have-z-relro))
 relro-LDFLAGS += -Wl,-z,now
-endif
 
 $(objpfx)nscd: $(addprefix $(objpfx),$(nscd-modules:=.o))
        $(LINK.o) -pie -Wl,-O1 $(nscd-cflags) \
index e632d3523b47bf553ce0f9e592a1080cb187d26e..a0ff427b7ef375cd89bd692b38a733fcd689fc5c 100644 (file)
@@ -102,10 +102,6 @@ CFLAGS-strfmon.c = -D_IO_MTSAFE_IO
 CFLAGS-strfmon_l.c = -D_IO_MTSAFE_IO
 endif
 
-ifeq (yes,$(have-protected))
-CFLAGS-atexit.c = -DHAVE_DOT_HIDDEN
-endif
-
 CFLAGS-tst-bsearch.c = $(stack-align-test-flags)
 CFLAGS-tst-qsort.c = $(stack-align-test-flags)
 
index 307662bdcd407ce14b647164691822086466740d..0575dda03b0355be8b89b353ffa9485dec072a99 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1996, 1999, 2001 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1996, 1999, 2001, 2006 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
@@ -43,14 +43,9 @@ extern void *__dso_handle __attribute__ ((__weak__));
 
 /* Register FUNC to be executed by `exit'.  */
 int
+attribute_hidden
 atexit (void (*func) (void))
 {
   return __cxa_atexit ((void (*) (void *)) func, NULL,
                       &__dso_handle == NULL ? NULL : __dso_handle);
 }
-
-/* Hide the symbol so that no definition but the one locally in the
-   executable or DSO is used.  */
-#ifdef HAVE_DOT_HIDDEN
-asm (".hidden\tatexit");
-#endif
index 98ba7d5b341aaabd94c44102f6a383aed136b6d9..dda91bb80679cb31083d26a950bcddfd5fb64e5f 100644 (file)
@@ -490,17 +490,13 @@ struct rtld_global
 };
 # define __rtld_global_attribute__
 # ifdef IS_IN_rtld
-#  ifdef HAVE_VISIBILITY_ATTRIBUTE
-#   ifdef HAVE_SDATA_SECTION
-#    define __rtld_local_attribute__ \
+#  ifdef HAVE_SDATA_SECTION
+#   define __rtld_local_attribute__ \
            __attribute__ ((visibility ("hidden"), section (".sdata")))
-#    undef __rtld_global_attribute__
-#    define __rtld_global_attribute__ __attribute__ ((section (".sdata")))
-#   else
-#    define __rtld_local_attribute__ __attribute__ ((visibility ("hidden")))
-#   endif
+#   undef __rtld_global_attribute__
+#   define __rtld_global_attribute__ __attribute__ ((section (".sdata")))
 #  else
-#   define __rtld_local_attribute__
+#   define __rtld_local_attribute__ __attribute__ ((visibility ("hidden")))
 #  endif
 extern struct rtld_global _rtld_local __rtld_local_attribute__;
 #  undef __rtld_local_attribute__
@@ -662,11 +658,7 @@ struct rtld_global_ro
 };
 # define __rtld_global_attribute__
 # ifdef IS_IN_rtld
-#  ifdef HAVE_VISIBILITY_ATTRIBUTE
-#   define __rtld_local_attribute__ __attribute__ ((visibility ("hidden")))
-#  else
-#   define __rtld_local_attribute__
-#  endif
+#  define __rtld_local_attribute__ __attribute__ ((visibility ("hidden")))
 extern struct rtld_global_ro _rtld_local_ro
     attribute_relro __rtld_local_attribute__;
 extern struct rtld_global_ro _rtld_global_ro
index 6b8502c5881e316733e0e0134b879cb250b6942e..04296d2a9a3a958ff711ce56b2aa2205917de506 100644 (file)
@@ -34,9 +34,7 @@ elf_machine_matches_host (const Elf32_Ehdr *ehdr)
 }
 
 
-#if defined PI_STATIC_AND_HIDDEN \
-    && defined HAVE_VISIBILITY_ATTRIBUTE && defined HAVE_HIDDEN \
-    && !defined HAVE_BROKEN_VISIBILITY_ATTRIBUTE
+#ifdef PI_STATIC_AND_HIDDEN
 
 /* Return the link-time address of _DYNAMIC.  Conveniently, this is the
    first element of the GOT, a special entry that is never relocated.  */
index 4bd5394bec11b2dd611b33232cffd8ea75841ca2..113760d8463b29442c43dc107bda25c058664047 100644 (file)
@@ -1,5 +1,5 @@
 /* Compare two memory blocks for differences in the first COUNT bytes.
-   Copyright (C) 2004, 2005 Free Software Foundation, Inc.
+   Copyright (C) 2004, 2005, 2006 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
      absolute address.  */                                                   \
   addl (%ebx,INDEX,4), %ebx
 
-#ifdef HAVE_HIDDEN
        .section        .gnu.linkonce.t.__i686.get_pc_thunk.bx,"ax",@progbits
        .globl  __i686.get_pc_thunk.bx
        .hidden __i686.get_pc_thunk.bx
-#else
-        .text
-#endif
        ALIGN (4)
        .type   __i686.get_pc_thunk.bx,@function
 __i686.get_pc_thunk.bx:
index 2739cb00b381fe63f58135d78498c6955eb93736..e03a8e926d4d8a23149788d95a7d7ed21091a0c7 100644 (file)
@@ -1,5 +1,6 @@
 /* Assembler macros for i386.
-   Copyright (C) 1991-93,95,96,98,2002,2003,2005 Free Software Foundation, Inc.
+   Copyright (C) 1991-93,95,96,98,2002,2003,2005,2006
+   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
@@ -132,15 +133,7 @@ lose: SYSCALL_PIC_SETUP                                                          \
     cfi_adjust_cfa_offset (-4);                                                      \
     addl $_GLOBAL_OFFSET_TABLE+[.-0b], %ebx;
 
-# ifndef HAVE_HIDDEN
-#  define SETUP_PIC_REG(reg) \
-  call 1f;                                                                   \
-  .subsection 1;                                                             \
-1:movl (%esp), %e##reg;                                                              \
-  ret;                                                                       \
-  .previous
-# else
-#  define SETUP_PIC_REG(reg) \
+# define SETUP_PIC_REG(reg) \
   .ifndef __i686.get_pc_thunk.reg;                                           \
   .section .gnu.linkonce.t.__i686.get_pc_thunk.reg,"ax",@progbits;           \
   .globl __i686.get_pc_thunk.reg;                                            \
@@ -153,7 +146,6 @@ __i686.get_pc_thunk.reg:                                                  \
   .previous;                                                                 \
   .endif;                                                                    \
   call __i686.get_pc_thunk.reg
-# endif
 
 # define LOAD_PIC_REG(reg) \
   SETUP_PIC_REG(reg); addl $_GLOBAL_OFFSET_TABLE_, %e##reg
index 8fc624ebd927ea9c6ec05e018273892ae222e483..88cfe71e0bb88339be0a8b818ee2375c88dbc4ea 100644 (file)
@@ -96,7 +96,7 @@
 #endif
 
 #if defined SHARED && defined DO_VERSIONING && defined PIC \
-    && !defined HAVE_BROKEN_ALIAS_ATTRIBUTE && !defined NO_HIDDEN
+    && !defined NO_HIDDEN
 # undef HIDDEN_JUMPTARGET
 # define HIDDEN_JUMPTARGET(name) __GI_##name##@local
 #endif
index 2701e272982504cccee15d35b2e4d96ee21f198c..a8a9cc47023f712ca4964627e349f6c1a8fad558 100644 (file)
@@ -251,6 +251,33 @@ case "$prefix" in
   ;;
 esac
 
+# Under Linux the NPTL add-on should be available.
+case $add_ons in
+  # It is available.  Good.
+  *nptl*)
+    nptl_missing=
+    ;;
+  *)
+    nptl_missing=yes
+    ;;
+esac
+
+if test "$nptl_missing"; then
+  if test $enable_sanity = yes; then
+    echo "\
+*** On GNU/Linux systems it is normal to compile GNU libc with the
+*** \`nptl' add-on.  Without that, the library will be
+*** incompatible with normal GNU/Linux systems.
+*** If you really mean to not use this add-on, run configure again
+*** using the extra parameter \`--disable-sanity-checks'."
+    exit 1
+  else
+    echo "\
+*** WARNING: Are you sure you do not want to use the \`nptl'
+*** add-on?"
+  fi
+fi
+
 if test "$prefix" = "/usr/local" -o "$prefix" = "/usr/local/" -o "$prefix" = "NONE"; then
   if test $enable_sanity = yes; then
     echo "\
index 299574dac4dcb9f94eb7beddd30f20fc12b5e123..b5c1b98573a3d99ce7553a7005c8e03d4e4fe491 100644 (file)
@@ -1,5 +1,5 @@
 /* POSIX.1 `sigaction' call for Linux/i386.
-   Copyright (C) 1991,1995-2000,2002-2004,2005 Free Software Foundation, Inc.
+   Copyright (C) 1991,1995-2000,2002-2005,2006 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
@@ -46,18 +46,10 @@ int __libc_missing_rt_sigs;
 
 /* Using the hidden attribute here does not change the code but it
    helps to avoid warnings.  */
-#if defined HAVE_HIDDEN && defined HAVE_VISIBILITY_ATTRIBUTE \
-    && !defined HAVE_BROKEN_VISIBILITY_ATTRIBUTE
-# ifdef __NR_rt_sigaction
+#ifdef __NR_rt_sigaction
 extern void restore_rt (void) asm ("__restore_rt") attribute_hidden;
-# endif
-extern void restore (void) asm ("__restore") attribute_hidden;
-#else
-# ifdef __NR_rt_sigaction
-static void restore_rt (void) asm ("__restore_rt");
-# endif
-static void restore (void) asm ("__restore");
 #endif
+extern void restore (void) asm ("__restore") attribute_hidden;
 
 
 /* If ACT is not NULL, change the action for SIG to *ACT.
index d6f4558cef696135c31e2edd6fe40ce2cf7755a0..b83e98a77e67bf7bb069459723bf3dc9b3092583 100644 (file)
@@ -1,5 +1,5 @@
 /* POSIX.1 `sigaction' call for Linux/x86-64.
-   Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
+   Copyright (C) 2001, 2002, 2003, 2005, 2006 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
 
 /* Using the hidden attribute here does not change the code but it
    helps to avoid warnings.  */
-#if defined HAVE_HIDDEN && defined HAVE_VISIBILITY_ATTRIBUTE \
-    && !defined HAVE_BROKEN_VISIBILITY_ATTRIBUTE
 extern void restore_rt (void) asm ("__restore_rt") attribute_hidden;
-#else
-static void restore_rt (void) asm ("__restore_rt");
-#endif
 
 
 /* If ACT is not NULL, change the action for SIG to *ACT.