about summary refs log tree commit diff
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2004-09-20 14:47:18 +0000
committerUlrich Drepper <drepper@redhat.com>2004-09-20 14:47:18 +0000
commit54beacabbe34d033abcf9545c28f091ae06e944b (patch)
treede38de4f58f6b53a659d0832516c300ae9eb4c41
parentefec50797a13f527967ec8e0113fd9405ec7e7bc (diff)
downloadglibc-54beacabbe34d033abcf9545c28f091ae06e944b.tar.gz
glibc-54beacabbe34d033abcf9545c28f091ae06e944b.tar.xz
glibc-54beacabbe34d033abcf9545c28f091ae06e944b.zip
Update.
2004-09-20  Jakub Jelinek  <jakub@redhat.com>

	* configure.in (libc_cv_z_relro): Only set to yes if linker script
	contains DATA_SEGMENT_RELRO_END.
-rw-r--r--ChangeLog5
-rwxr-xr-xconfigure15
-rw-r--r--configure.in8
3 files changed, 21 insertions, 7 deletions
diff --git a/ChangeLog b/ChangeLog
index cc17efe616..dbd376d369 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2004-09-20  Jakub Jelinek  <jakub@redhat.com>
+
+	* configure.in (libc_cv_z_relro): Only set to yes if linker script
+	contains DATA_SEGMENT_RELRO_END.
+
 2004-09-20  Ulrich Drepper  <drepper@redhat.com>
 
 	* elf/dl-load.c (_dl_map_object_from_fd): Add some error checking.
diff --git a/configure b/configure
index cf0b32f9b9..4e0ea1b765 100755
--- a/configure
+++ b/configure
@@ -5549,16 +5549,23 @@ echo $ECHO_N "checking for -z relro option... $ECHO_C" >&6
 if test "${libc_cv_z_relro+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-    if { ac_try='${CC-cc} -v --help 2>&1|grep "z relro" 1>&5'
+    libc_cv_z_relro=no
+  if { ac_try='${CC-cc} -v --help 2>&1|grep "z relro" 1>&5'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }
   then
-    libc_cv_z_relro=yes
-  else
-    libc_cv_z_relro=no
+    if { ac_try='${CC-cc} -Wl,--verbose 2>&1|grep DATA_SEGMENT_RELRO_END 1>&5'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }
+    then
+      libc_cv_z_relro=yes
+    fi
   fi
 fi
 echo "$as_me:$LINENO: result: $libc_cv_z_relro" >&5
diff --git a/configure.in b/configure.in
index 235b6d222c..19b8ba504a 100644
--- a/configure.in
+++ b/configure.in
@@ -1325,11 +1325,13 @@ EOF
 
   AC_CACHE_CHECK(for -z relro option,
 		 libc_cv_z_relro, [dnl
+  libc_cv_z_relro=no
   if AC_TRY_COMMAND([${CC-cc} -v --help 2>&1|grep "z relro" 1>&AS_MESSAGE_LOG_FD])
   then
-    libc_cv_z_relro=yes
-  else
-    libc_cv_z_relro=no
+    if AC_TRY_COMMAND([${CC-cc} -Wl,--verbose 2>&1|grep DATA_SEGMENT_RELRO_END 1>&AS_MESSAGE_LOG_FD])
+    then
+      libc_cv_z_relro=yes
+    fi
   fi])
   AC_SUBST(libc_cv_z_relro)
   if test $libc_cv_z_relro = yes; then