aboutsummaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2002-02-28 22:38:00 +0000
committerUlrich Drepper <drepper@redhat.com>2002-02-28 22:38:00 +0000
commit0d01dace556f7eb482c346c545e11035d33852ce (patch)
tree9bf619ec2629e5dc966602d19f633fbbc8bbbea1 /configure.in
parent1eb610d162de8470b53b3e31629932ca7726a142 (diff)
downloadglibc-0d01dace556f7eb482c346c545e11035d33852ce.zip
glibc-0d01dace556f7eb482c346c545e11035d33852ce.tar.gz
glibc-0d01dace556f7eb482c346c545e11035d33852ce.tar.bz2
Update.
2002-02-28 Jakub Jelinek <jakub@redhat.com> * elf/rtld.c (_rtld_global): Remove .protected. (_rtld_local): Strong alias to _rtld_global. * elf/Makefile (CFLAGS-.os): Add -D_RTLD_LOCAL if compiling rtld only .os object. * sysdeps/generic/ldsodefs.h (GL): If SHARED and _RTLD_LOCAL, use _rtld_local instead of _rtld_global. (_rtld_local): Add hidden extern, possibly in .sdata section. * configure.in: Add tests for visibility attribute and .sdata. * config.h.in: Add HAVE_VISIBILITY_ATTRIBUTE and HAVE_SDATA_SECTION. * sysdeps/alpha/dl-machine.h: Use _rtld_local instead of _rtld_global. * sysdeps/arm/dl-machine.h: Likewise. * sysdeps/generic/ldsodefs.h: Likewise. * sysdeps/hppa/dl-machine.h: Likewise. * sysdeps/cris/dl-machine.h: Likewise. * sysdeps/i386/dl-machine.h: Likewise. * sysdeps/ia64/dl-machine.h: Likewise. * sysdeps/m68k/dl-machine.h: Likewise. * sysdeps/mips/mips64/dl-machine.h: Likewise. * sysdeps/mips/dl-machine.h: Likewise. * sysdeps/sparc/sparc32/dl-machine.h: Likewise. * sysdeps/sparc/sparc64/dl-machine.h: Likewise. * sysdeps/sh/dl-machine.h: Likewise. * sysdeps/s390/s390-32/dl-machine.h: Likewise. * sysdeps/s390/s390-64/dl-machine.h: Likewise. * sysdeps/x86_64/dl-machine.h: Likewise.
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in38
1 files changed, 38 insertions, 0 deletions
diff --git a/configure.in b/configure.in
index 523e8ef..c48c4c1 100644
--- a/configure.in
+++ b/configure.in
@@ -1001,6 +1001,44 @@ EOF
AC_SUBST(libc_cv_asm_protected_directive)
AC_DEFINE(HAVE_PROTECTED)
+ if test $libc_cv_asm_protected_directive = yes; then
+ AC_CACHE_CHECK(whether __attribute__((visibility())) is supported,
+ libc_cv_visibility_attribute,
+ [cat > conftest.c <<EOF
+ int foo __attribute__ ((visibility ("hidden"))) = 1;
+ int bar __attribute__ ((visibility ("protected"))) = 1;
+EOF
+ libc_cv_visibility_attribute=no
+ if ${CC-cc} -Werror -S conftest.c -o conftest.s >/dev/null 2>&1; then
+ if grep '\.hidden.*foo' conftest.s >/dev/null; then
+ if grep '\.protected.*bar' conftest.s >/dev/null; then
+ libc_cv_visibility_attribute=yes
+ fi
+ fi
+ fi
+ rm -f conftest.[cs]
+ ])
+ if test $libc_cv_visibility_attribute = yes; then
+ AC_DEFINE(HAVE_VISIBILITY_ATTRIBUTE)
+ fi
+ fi
+
+ if test $libc_cv_visibility_attribute = yes -a $gnu_ld = yes; then
+ AC_CACHE_CHECK(whether to put _rtld_local into .sdata section,
+ libc_cv_have_sdata_section,
+ [echo "int i;" > conftest.c
+ libc_cv_have_sdata_section=no
+ if ${CC-cc} -shared -Wl,--verbose conftest.c -o conftest.so 2>&1 \
+ | grep '\.sdata' >/dev/null; then
+ libc_cv_have_sdata_section=yes
+ fi
+ rm -f conftest.c conftest.so
+ ])
+ if test $libc_cv_have_sdata_section = yes; then
+ AC_DEFINE(HAVE_SDATA_SECTION)
+ fi
+ fi
+
AC_CACHE_CHECK(for -z nodelete option,
libc_cv_z_nodelete, [dnl
cat > conftest.c <<EOF