This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Use correct readelf in elfcomm.exp


ld-elfcomm/elfcomm.exp has tests running plain readelf instead of 
$READELF.  This fails if no plain "readelf" is on the PATH (originally 
observed in remote-host testing) and in any case may use the wrong readelf 
instead of the one from the binutils under test.  This patch makes the 
obvious fix.  Tested on i686-pc-linux-gnu with a readelf script that gives 
an error placed on the PATH to make sure that readelf from the PATH isn't 
used, where it fixes:

FAIL: size/aligment change of common symbols (change 1)
FAIL: size/aligment change of common symbols (change 2)

OK to commit?

2008-03-27  Joseph Myers  <joseph@codesourcery.com>

	* ld-elfcomm/elfcomm.exp: Run $READELF not readelf.

Index: ld/testsuite/ld-elfcomm/elfcomm.exp
===================================================================
RCS file: /cvs/src/src/ld/testsuite/ld-elfcomm/elfcomm.exp,v
retrieving revision 1.16
diff -u -r1.16 elfcomm.exp
--- ld/testsuite/ld-elfcomm/elfcomm.exp	16 Oct 2007 14:42:15 -0000	1.16
+++ ld/testsuite/ld-elfcomm/elfcomm.exp	27 Mar 2008 21:23:15 -0000
@@ -54,7 +54,7 @@
     global READELF
 
     send_log "$READELF --syms tmpdir/common1.o | grep foo\n"
-    set exec_output [run_host_cmd "readelf" "--syms tmpdir/common1.o | grep foo"]
+    set exec_output [run_host_cmd "$READELF" "--syms tmpdir/common1.o | grep foo"]
 
     if {   ![regexp "(\[ 	\]*)(\[0-9\]+):(\[ 	\]*)(\[0\]*)80(\[ 	\]+)4(\[ 	\]+)(COMMON|OBJECT)(\[ 	\]+)GLOBAL(\[ 	\]+)DEFAULT(\[ 	\]+)(PRC\\\[0xff03\\\]|COM|SCOM)(\[ 	\]+)_?foo2" $exec_output]
 	|| ![regexp "(\[ 	\]*)(\[0-9\]+):(\[ 	\]*)(\[0-9\]+)(\[ 	\]+)21(\[ 	\]+)OBJECT(\[ 	\]+)GLOBAL(\[ 	\]+)DEFAULT(\[ 	\]+)(\[0-9\]+)(\[ 	\]+)_?foo1" $exec_output] } {
@@ -79,7 +79,7 @@
     }
 
     send_log "$READELF --syms tmpdir/common.exe | grep foo\n"
-    set exec_output [run_host_cmd "readelf" "--syms tmpdir/common.exe | grep foo"]
+    set exec_output [run_host_cmd "$READELF" "--syms tmpdir/common.exe | grep foo"]
 
     if {![regexp "(\[ 	\]*)(\[0-9\]+):(\[ 	\]*)(\[0-9\]+)(\[ 	\]+)(\[0-9\]+)(\[ 	\]+)COMMON(\[ 	\]+)GLOBAL(\[ 	\]+)DEFAULT(\[ 	\]+)(\[0-9\]+)(\[ 	\]+)_?foo2" $exec_output] } {
 	fail $testname
@@ -96,7 +96,7 @@
     global READELF
 
     verbose "Check to see if STT_COMMON symbols are being generated:"
-    set exec_output [run_host_cmd "readelf" "--syms tmpdir/common1a.o | grep foo"]
+    set exec_output [run_host_cmd "$READELF" "--syms tmpdir/common1a.o | grep foo"]
 
     if { ![regexp "(\[ 	\]*)(\[0-9\]+):(\[ 	\]*)(\[0\]*)80(\[ 	\]+).(\[ 	\]+)COMMON(\[ 	\]+)GLOBAL(\[ 	\]+)DEFAULT(\[ 	\]+)(PRC\\\[0xff03\\\]|COM|SCOM)(\[ 	\]+)_?foo2" $exec_output] } {
 	verbose "STT_COMMON not generated"

-- 
Joseph S. Myers
joseph@codesourcery.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]