]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
* testsuite/relro_test.sh: Fail if dc is not present.
authorIan Lance Taylor <ian@airs.com>
Tue, 22 Mar 2011 00:19:14 +0000 (00:19 +0000)
committerIan Lance Taylor <ian@airs.com>
Tue, 22 Mar 2011 00:19:14 +0000 (00:19 +0000)
gold/ChangeLog
gold/testsuite/relro_test.sh

index ca1ae8ce5a16b11fe3da5e2cb821dab783a3f29a..de3c3453ff59bfbc8dae269ee9842d0a5d9c74ff 100644 (file)
@@ -1,6 +1,7 @@
 2011-03-21  Ian Lance Taylor  <iant@google.com>
 
        * testsuite/final_layout.sh: Rewrite to not use dc.
+       * testsuite/relro_test.sh: Fail if dc is not present.
 
 2011-03-21  Sriraman Tallam  <tmsriram@google.com>
 
index 2995302d7dd99da5e884b228fd87b7c94f8305f9..47a94910b631e92886ad1c2b903f45edb661adce 100755 (executable)
@@ -2,7 +2,7 @@
 
 # relro_test.sh -- test -z relro
 
-# Copyright 2010 Free Software Foundation, Inc.
+# Copyright 2010, 2011 Free Software Foundation, Inc.
 # Written by Cary Coutant <ccoutant@google.com>.
 
 # This file is part of gold.
@@ -63,8 +63,9 @@ check()
   RELRO_END=`echo "16o 16i $RELRO_START $RELRO_LEN + p" | dc`
   REM=`echo "16i $RELRO_END $LOAD_ALIGN % p" | dc`
 
-  if test "$REM" -ne 0
-  then
+  if test "$REM" -eq 0; then
+    :
+  else
     echo "PT_GNU_RELRO segment does not end at page boundary."
     exit 1
   fi