diff --git a/ChangeLog b/ChangeLog index b809c487a1..5f129777ba 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2002-03-15 H.J. Lu + Ulrich Drepper + + * configure.in: Check for availability of + init_array/fini_array/preinit_array handling in binutils. + * config.h.in (HAVE_INITFINI_ARRAY): New macro. + * config.make.in (have-initfini-array): New variable. + 2002-03-15 Ulrich Drepper * stdio-common/tst-printf.c (main): Comment out one test which diff --git a/config.h.in b/config.h.in index 42e7e48417..30e63d5144 100644 --- a/config.h.in +++ b/config.h.in @@ -111,6 +111,10 @@ /* Define if binutils support TLS handling. */ #undef HAVE_TLS_SUPPORT +/* Define if the linker supports .preinit_array/.init_array/.fini_array + sections. */ +#undef HAVE_INITFINI_ARRAY + /* Defined to some form of __attribute__ ((...)) if the compiler supports a different, more efficient calling convention. */ diff --git a/config.make.in b/config.make.in index 76048959c2..edd47a51bc 100644 --- a/config.make.in +++ b/config.make.in @@ -48,6 +48,7 @@ with-fp = @with_fp@ with-cvs = @with_cvs@ old-glibc-headers = @old_glibc_headers@ unwind-find-fde = @libc_cv_gcc_unwind_find_fde@ +have-initfini-array = @libc_cv_initfinit_array@ static-libgcc = @libc_cv_gcc_static_libgcc@ diff --git a/configure.in b/configure.in index c48c4c1ca6..484614949f 100644 --- a/configure.in +++ b/configure.in @@ -1039,6 +1039,35 @@ EOF fi fi + AC_CACHE_CHECK(for .preinit_array/.init_array/.fini_array support, + libc_cv_initfinit_array, [dnl + cat > conftest.c <&AC_FD_CC]) + then + if readelf -S conftest | fgrep INIT_ARRAY > /dev/null; then + libc_cv_initfinit_array=yes + else + libc_cv_initfinit_array=no + fi + else + libc_cv_initfinit_array=no + fi + rm -f conftest*]) + AC_SUBST(libc_cv_initfinit_array) + if test $libc_cv_initfinit_array = yes; then + AC_DEFINE(HAVE_INITFINI_ARRAY) + fi + AC_CACHE_CHECK(for -z nodelete option, libc_cv_z_nodelete, [dnl cat > conftest.c <