* gdb.base/exe-lock.exp (binfile): Add $EXEEXT suffix to fix
[deliverable/binutils-gdb.git] / gdb / testsuite / gdb.base / prelink.exp
index 7dbf77e0016c7850858c4247d6c41b06a27c61ca..f499a34f14848dd49b2082d323aaf304353d76c7 100644 (file)
@@ -1,8 +1,8 @@
-# Copyright 2006 Free Software Foundation, Inc.
+# Copyright 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
+# the Free Software Foundation; either version 3 of the License, or
 # (at your option) any later version.
 #
 # This program is distributed in the hope that it will be useful,
@@ -11,8 +11,7 @@
 # GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA.
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # Please email any bugs, comments, and/or additions to this file to:
 # bug-gdb@gnu.org
@@ -48,7 +47,15 @@ if { [gdb_compile "${srcdir}/${subdir}/${libsrcfile}" "${libfile}" executable [l
     return -1
 }
 
-if {[catch "system \"prelink -qNR ${libfile}\""] != 0} {
+# `--no-exec-shield' is for i386 where prelink in the exec-shield mode is
+# forced to push all the libraries tight together to fit into the first two
+# memory areas (either the ASCII Shield area or at least below the executable).
+# In this case its -R option cannot be applied and we falsely FAIL here as if
+# the system is already prelinked prelink has no choice how to randomize the
+# single new unprelinked library address without wasting the first one/two
+# memory areas.  We do not care of the efficiency of loading such resulting
+# exec-shield unfriendly prelinked library.
+if {[catch "system \"prelink -qNR --no-exec-shield ${libfile}\""] != 0} {
     # Maybe we don't have prelink.
     return -1
 }
@@ -90,10 +97,10 @@ if { $found == 0  } {
 }
 
 if {[catch "system \"prelink -uN ${libfile}\""] != 0} {
-    untested "${libfile} was not prelinked, maybe system libraries are not prelinked?"
+    untested "${testfile}.so was not prelinked, maybe system libraries are not prelinked?"
     return 0
 }
-catch "system \"prelink -qNR ${libfile}\""
+catch "system \"prelink -qNR --no-exec-shield ${libfile}\""
 
 # Start with a fresh gdb
 
This page took 0.026176 seconds and 4 git commands to generate.