elf fixes.
[deliverable/binutils-gdb.git] / binutils / testsuite / binutils-all / objcopy.exp
index 611022ee5fe286030343cc5b686ae70e3f97ae8b..68a1b6c0ccd770e407b09ce2ddc67145f2177c79 100644 (file)
@@ -74,13 +74,13 @@ if ![string match "" $got] then {
     setup_xfail "m68*-ericsson-ose" "m68k*-motorola-sysv*"
     setup_xfail "i*86-*-linuxaout*" "i*86-*-aout*"
     setup_xfail "i*86-*-sysv3" "i*86-*-isc*" "i*86-*-sco*" "i*86-*-coff"
-    setup_xfail "i*86-*-aix*" "i*86-*-go32*"
+    setup_xfail "i*86-*-aix*" "i*86-*-go32*" "i*86-*-msdos*"
     setup_xfail "a29k-*-udi" "a29k-*-coff" "a29k-*-vxworks*"
     setup_xfail "i960-*-coff"
     setup_xfail "h8300-*-hms" "h8300-*-coff"
     setup_xfail "h8500-*-hms" "h8500-*-coff"
     setup_xfail "hppa*-*-*"
-    clear_xfail "hppa*-*-*elf*"
+    clear_xfail "hppa*-*-*elf*" "hppa*-*-linux*"
     setup_xfail "m88*-*-coff" "m88*-motorola-sysv*"
     setup_xfail "z8*-*-coff"
 
@@ -341,7 +341,7 @@ proc strip_test { } {
     }
 
     set exec_output [binutils_run $NM "-a $NMFLAGS $objfile"]
-    if ![string match "No symbols in *" $exec_output] {
+    if ![string match "*: no symbols*" $exec_output] {
        fail $test
        return
     }
@@ -375,14 +375,15 @@ proc strip_test_with_saving_a_symbol { } {
        set objfile tmpdir/testprog.o
     }
 
-    set exec_output [binutils_run $STRIP "$STRIPFLAGS -K main $objfile"]
+    set exec_output [binutils_run $STRIP "$STRIPFLAGS -K main -K _main $objfile"]
     if ![string match "" $exec_output] {
        fail $test
        return
     }
 
     set exec_output [binutils_run $NM "$NMFLAGS $objfile"]
-    if ![regexp {^([0-9a-fA-F]+)?[ ]+T main} $exec_output] {
+    if {![regexp {^([0-9a-fA-F]+)?[ ]+T main} $exec_output] \
+         && ![regexp {^([0-9a-fA-F]+)?[ ]+T _main} $exec_output]} {
        fail $test
        return
     }
@@ -468,6 +469,15 @@ proc copy_executable { prog flags test1 test2 } {
            setup_xfail "*-*-*"
        }
 
+       # This also fails for mips*-*-elf targets.  See elf32-mips.c
+       # mips_elf_sym_is_global.
+       setup_xfail "mips*-*-elf"
+
+       setup_xfail "arm*-*-coff"
+       setup_xfail "arm*-*-pe"
+       setup_xfail "thumb*-*-coff"
+       setup_xfail "thumb*-*-pe"
+    
        fail $test1
     }
 
@@ -511,7 +521,7 @@ proc strip_executable { prog flags test } {
     }
 
     set exec_output [binutils_run $NM "$NMFLAGS ${copyfile}"]
-    if ![string match "$copyfile: no symbols*" $exec_output] {
+    if ![string match "*: no symbols*" $exec_output] {
        fail $test
        return
     }
@@ -549,7 +559,8 @@ proc strip_executable_with_saving_a_symbol { prog flags test } {
     }
 
     set exec_output [binutils_run $NM "$NMFLAGS ${copyfile}"]
-    if ![regexp {^[0-9a-fA-F]+ T main} $exec_output] {
+    if {![regexp {^[0-9a-fA-F]+ T main} $exec_output] \
+         && ![regexp {^[0-9a-fA-F]+ T _main} $exec_output]} {
        fail $test
        return
     }
@@ -580,6 +591,6 @@ switch [copy_setup] {
     "0" {
        copy_executable "$OBJCOPY" "$OBJCOPYFLAGS" "$test1" "$test2"
        strip_executable "$STRIP" "$STRIPFLAGS" "$test3"
-       strip_executable_with_saving_a_symbol "$STRIP" "-K main $STRIPFLAGS" "$test4"
+       strip_executable_with_saving_a_symbol "$STRIP" "-K main -K _main $STRIPFLAGS" "$test4"
     }
 }
This page took 0.025118 seconds and 4 git commands to generate.