]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Update.
authorUlrich Drepper <drepper@redhat.com>
Sat, 16 Mar 2002 02:47:08 +0000 (02:47 +0000)
committerUlrich Drepper <drepper@redhat.com>
Sat, 16 Mar 2002 02:47:08 +0000 (02:47 +0000)
2002-03-15  H.J. Lu  <hjl@gnu.org>
            Ulrich Drepper  <drepper@redhat.com>

* 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.

ChangeLog
config.h.in
config.make.in
configure.in

index b809c487a11d8eeebe0826dca5375130eb687dd1..5f129777bae9c0f1ebfb251d610714220692bf5d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2002-03-15  H.J. Lu  <hjl@gnu.org>
+            Ulrich Drepper  <drepper@redhat.com>
+
+       * 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  <drepper@redhat.com>
 
        * stdio-common/tst-printf.c (main): Comment out one test which
index 42e7e48417e58e0c5c6ca6fb96d5ff276253cbbe..30e63d514452cd3373a7d29132350c78da426c93 100644 (file)
 /* 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.  */
index 76048959c28898bcdfa942f2762b8e68d3b7b31e..edd47a51bc46712393c692e1d6f96bb9d9134f0d 100644 (file)
@@ -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@
 
index c48c4c1ca63c959d9ca75bc1a7e3265ba102c504..484614949fa9f895ad39753c19ece45b5304fcb8 100644 (file)
@@ -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 <<EOF
+int _start (void) { return 0; }
+int __start (void) { return 0; }
+int foo (void) { return 1; }
+#ifdef __i386__
+asm (".section .init_array\n\t.long foo");
+#else
+# error "define appropriately for the architecture"
+#endif
+EOF
+  if AC_TRY_COMMAND([${CC-cc} -o conftest conftest.c
+                    -static -nostartfiles -nostdlib 1>&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 <<EOF