summary refs log tree commit diff
path: root/configure.in
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2001-08-26 09:17:23 +0000
committerUlrich Drepper <drepper@redhat.com>2001-08-26 09:17:23 +0000
commita711b01d34ca5de9857ca5d19235812674fccee6 (patch)
tree1073e9cf9b096ff80eee7263a6b885cc161f2e43 /configure.in
parent7c69dc8bc888762333f5ccf1c8c7fb5883ffc6ed (diff)
downloadglibc-a711b01d34ca5de9857ca5d19235812674fccee6.tar.gz
glibc-a711b01d34ca5de9857ca5d19235812674fccee6.tar.xz
glibc-a711b01d34ca5de9857ca5d19235812674fccee6.zip
Update.
2001-08-26  Ulrich Drepper  <drepper@redhat.com>

	* config.h.in: Add HAVE_Z_COMBRELOC.
	* configure.in: Add test for -z combreloc.

	* sysdeps/i386/dl-machine.h (elf_machine_rel): Minor cleanups and
	optimizations.  Use HAVE_Z_COMBRELOC to avoid generaton of
	R_386_RELATIVE handling for ld.so startup.
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in20
1 files changed, 19 insertions, 1 deletions
diff --git a/configure.in b/configure.in
index 5962b91340..719856e2b7 100644
--- a/configure.in
+++ b/configure.in
@@ -255,7 +255,7 @@ gnu* | linux* | sysv4* | solaris2* | irix6*)
 aix*)
   # These systems are always xcoff
   xcoff=yes
-  elf=no    
+  elf=no
   ;;
 esac
 
@@ -1061,6 +1061,24 @@ EOF
   fi
   rm -f conftest*])
   AC_SUBST(libc_cv_Bgroup)
+
+  AC_CACHE_CHECK(for -z combreloc,
+		 libc_cv_z_combreloc, [dnl
+  cat > conftest.c <<EOF
+int foo (void) { return 0; }
+EOF
+  if AC_TRY_COMMAND([${CC-cc} -shared -o conftest.so conftest.c -Wl,-z,combreloc 1>&AC_FD_CC])
+  then
+dnl The following test is a bit weak.  We must use a tool which can test
+dnl cross-platform since the gcc used can be a cross compiler.  Without
+dnl introducing new options this is not easily doable.  Instead use a tool
+dnl which always is cross-platform: readelf.  To detect whether -z combreloc
+dnl look for a section named .rel.dyn.
+    if readelf -S conftest.so | fgrep .rel.dyn > /dev/null; then
+      AC_DEFINE(HAVE_Z_COMBRELOC)
+    fi
+  fi
+  rm -f conftest*])
 fi
 
 if test $elf != yes; then