2003-04-24 J"orn Rennecke <joern.rennecke@superh.com>
authorH.J. Lu <hjl.tools@gmail.com>
Thu, 24 Apr 2003 21:00:06 +0000 (21:00 +0000)
committerH.J. Lu <hjl.tools@gmail.com>
Thu, 24 Apr 2003 21:00:06 +0000 (21:00 +0000)
* ld-elfcomm/elfcomm.exp: Allow symbols to have '_' prepended.

ld/testsuite/ChangeLog
ld/testsuite/ld-elfcomm/elfcomm.exp

index b7438ef..9fc8f0d 100644 (file)
@@ -1,3 +1,7 @@
+2003-04-24  J"orn Rennecke <joern.rennecke@superh.com>
+
+       * ld-elfcomm/elfcomm.exp: Allow symbols to have '_' prepended.
+
 2003-04-23  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
 
        * ld-sh/tlsbin-1.d, ld-sh/tlsbin-2.d, ld-sh/tlsbin-3.d,
index 37e5ede..c9836c1 100644 (file)
@@ -1,4 +1,4 @@
-# Expect script for commom symbol tests
+# Expect script for common symbol tests
 #   Copyright 2003 Free Software Foundation, Inc.
 #
 # This file is free software; you can redistribute it and/or modify
@@ -39,8 +39,8 @@ proc dump_common1 { testname } {
 
     send_log "readelf -s tmpdir/common1.o | grep foo\n"
     catch "exec readelf -s tmpdir/common1.o | grep foo" exec_output
-    if { ![regexp "(\[         \]*)(\[0-9\]+):(\[      \]*)(\[0\]*)80(\[       \]+)4(\[        \]+)OBJECT(\[   \]+)GLOBAL(\[   \]+)DEFAULT(\[  \]+)COM(\[      \]+)foo2" $exec_output]
-        || ![regexp "(\[       \]*)(\[0-9\]+):(\[      \]*)(\[0-9\]+)(\[       \]+)21(\[       \]+)OBJECT(\[   \]+)GLOBAL(\[   \]+)DEFAULT(\[  \]+)(\[0-9\]+)(\[       \]+)foo1" $exec_output] } {
+    if { ![regexp "(\[         \]*)(\[0-9\]+):(\[      \]*)(\[0\]*)80(\[       \]+)4(\[        \]+)OBJECT(\[   \]+)GLOBAL(\[   \]+)DEFAULT(\[  \]+)COM(\[      \]+)_?foo2" $exec_output]
+        || ![regexp "(\[       \]*)(\[0-9\]+):(\[      \]*)(\[0-9\]+)(\[       \]+)21(\[       \]+)OBJECT(\[   \]+)GLOBAL(\[   \]+)DEFAULT(\[  \]+)(\[0-9\]+)(\[       \]+)_?foo1" $exec_output] } {
        send_log "$exec_output\n"
        verbose $exec_output
        fail $testname
@@ -50,7 +50,7 @@ proc dump_common1 { testname } {
     return 1
 }
 
-set test1 "size/aligment change of commom symbols"
+set test1 "size/aligment change of common symbols"
 if { ![ld_compile "$CC $CFLAGS" $srcdir/$subdir/common1a.c tmpdir/common1a.o]
     || ![ld_compile "$CC $CFLAGS" $srcdir/$subdir/common1b.c tmpdir/common1b.o] } {
     unresolved $test1
@@ -65,8 +65,8 @@ if { [ld_simple_link $ld tmpdir/common1.o "-r tmpdir/common1a.o tmpdir/common1b.
     return
 }
 
-if { ![regexp "Warning: alignment (\[0-9\]+) of symbol \`foo1\' in tmpdir/common1b.o is smaller than 64 in tmpdir/common1a.o" $link_output]
-     || ![regexp "Warning: size of symbol \`foo1\' changed from 2 in tmpdir/common1a.o to 21 in tmpdir/common1b.o" $link_output] } {
+if { ![regexp "Warning: alignment (\[0-9\]+) of symbol \`_?foo1\' in tmpdir/common1b.o is smaller than 64 in tmpdir/common1a.o" $link_output]
+     || ![regexp "Warning: size of symbol \`_?foo1\' changed from 2 in tmpdir/common1a.o to 21 in tmpdir/common1b.o" $link_output] } {
     fail "$test1 (warning 1)"
 } else {
     pass "$test1 (warning 1)"
@@ -81,7 +81,7 @@ if { [ld_simple_link $ld tmpdir/common1.o "-r tmpdir/common1b.o tmpdir/common1a.
     return
 }
 
-if { ![regexp "Warning: alignment (\[0-9\]+) of symbol \`foo1\' in tmpdir/common1b.o is smaller than 64 in tmpdir/common1a.o" $link_output] } {
+if { ![regexp "Warning: alignment (\[0-9\]+) of symbol \`_?foo1\' in tmpdir/common1b.o is smaller than 64 in tmpdir/common1a.o" $link_output] } {
     fail "$test1 (warning 2)"
 } else {
     pass "$test1 (warning 2)"