From 0d01dace556f7eb482c346c545e11035d33852ce Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 28 Feb 2002 22:38:00 +0000 Subject: Update. 2002-02-28 Jakub Jelinek * 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. --- configure.in | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) (limited to 'configure.in') diff --git a/configure.in b/configure.in index 523e8efe6a..c48c4c1ca6 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 </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 <