PowerPC64 dot-sym testsuite fixes
[deliverable/binutils-gdb.git] / ld / testsuite / ld-elfvers / vers.exp
index a2a678b924ea947e5231d698c4c225146e056142..4c423422a2246eeb1abe81c552e20d9041af5459 100644 (file)
@@ -122,9 +122,9 @@ proc test_ar { test lib object expect } {
        return
     }
 
-    verbose -log "$nm --print-armap $tmpdir/$lib | grep \" in \" | egrep \"VERS\\|bar\\|foo\" | sort > $tmpdir/nm.out"
-
-    catch "exec $nm --print-armap $tmpdir/$lib | grep \\\ in\\\  | egrep VERS\\\|bar\\\|foo | sort > $tmpdir/nm.out" exec_output
+    set cmd "$nm --print-armap $tmpdir/$lib | grep \\\ in\\\  | egrep VERS\\\|bar\\\|foo | grep -v ^\\\\. | sort > $tmpdir/nm.out"
+    verbose -log $cmd
+    catch "exec $cmd" exec_output
     if [string match "" $exec_output] then {
        catch "exec sort $srcdir/$subdir/$expect | $diff $tmpdir/nm.out -" exec_output
        set exec_output [prune_warnings $exec_output]
@@ -245,9 +245,9 @@ proc objdump_symstuff { objdump object expectfile } {
 
     if ![info exists SOBJDUMP_FLAGS] { set SOBJDUMP_FLAGS "" }
 
-    verbose -log "$objdump $SOBJDUMP_FLAGS $object | grep \@ | sort -k 6  > $tmpdir/objdump.out"
-
-    catch "exec $objdump $SOBJDUMP_FLAGS $object | grep \@ | sort -k 6 > $tmpdir/objdump.out" exec_output
+    set cmd "$objdump $SOBJDUMP_FLAGS $object | sed -n {s/^\\(\[0-9a-f\]* *\\)\\(\[gw\]\\)\\( *\\)\\(\[FO\]\\)/\\1\\2\\4\\3/;/\@/p} | sort -k 5 > $tmpdir/objdump.out"
+    verbose -log $cmd
+    catch "exec $cmd" exec_output
     set exec_output [prune_warnings $exec_output]
     if [string match "" $exec_output] then {
 
@@ -286,7 +286,8 @@ proc objdump_symstuff { objdump object expectfile } {
        close $file_a
 
        while { [gets $file_b line] != $eof } {
-           if [regexp "^#.*$" $line] then {
+           if [regexp {\.text.* \.[^ ]*$} $line] then {
+               # Discard defined powerpc64 dot-symbols
                continue
            } else {
                lappend list_b $line
@@ -340,9 +341,9 @@ proc objdump_dynsymstuff { objdump object expectfile } {
 
     if ![info exists DOBJDUMP_FLAGS] { set DOBJDUMP_FLAGS "" }
 
-    verbose -log "$objdump $DOBJDUMP_FLAGS $object | sed -n /VERS/p\\\;/show/p | sort | uniq  > $tmpdir/objdump.out"
-
-    catch "exec $objdump $DOBJDUMP_FLAGS $object | sed -n /VERS/p\\\;/show/p | sort | uniq  > $tmpdir/objdump.out" exec_output
+    set cmd "$objdump $DOBJDUMP_FLAGS $object | sed -n /VERS/p\\\;/show/p | sort | uniq > $tmpdir/objdump.out"
+    verbose -log $cmd
+    catch "exec $cmd" exec_output
     set exec_output [prune_warnings $exec_output]
     if [string match "" $exec_output] then {
 
@@ -381,7 +382,8 @@ proc objdump_dynsymstuff { objdump object expectfile } {
        close $file_a
 
        while { [gets $file_b line] != $eof } {
-           if [regexp "^#.*$" $line] then {
+           if [regexp {\.text.* \.[^ ]*$} $line] then {
+               # Discard defined powerpc64 dot-symbols
                continue
            } else {
                lappend list_b $line
This page took 0.038028 seconds and 4 git commands to generate.