Allow for extra st_other readelf output in ld testsuite
authorAlan Modra <amodra@gmail.com>
Thu, 31 Oct 2013 09:03:23 +0000 (19:33 +1030)
committerAlan Modra <amodra@gmail.com>
Fri, 15 Nov 2013 05:20:20 +0000 (15:50 +1030)
(cherry picked from commit 4115bfc68301edaca4dd1fd83eddeaafeda4c63c)

ld/testsuite/ChangeLog
ld/testsuite/ld-elfvers/vers24.rd
ld/testsuite/ld-ifunc/ifunc.exp

index 0cda12a..8cd06b9 100644 (file)
@@ -2,6 +2,11 @@
 
        Apply changes from mainline to 2.24
        2013-11-04  Alan Modra  <amodra@gmail.com>
+       * ld-elfvers/vers24.rd: Allow extra readelf output after
+       symbol visibility.
+       * ld-ifunc/ifunc.exp: Likewise.
+
+       2013-11-04  Alan Modra  <amodra@gmail.com>
        * ld-scripts/crossref.exp: Don't allow changes made to CFLAGS
        for this test to bleed into following tests.  Don't set
        -mcall-aixdesc for powerpc64le.
index 42e81e4..fb464f9 100644 (file)
@@ -7,9 +7,9 @@ Symbol table '.dynsym' contains [0-9]+ entries:
 # And ensure the dynamic symbol table contains at least x@VERS.0
 # and foo@@VERS.0 symbols
 #...
- +[0-9]+: [0-9a-f]+ +(4 +OBJECT +GLOBAL +DEFAULT +[0-9]+ _?x|[0-9]+ +FUNC +GLOBAL +DEFAULT +[0-9]+ _?foo@)@VERS\.0
+ +[0-9]+: [0-9a-f]+ +(4 +OBJECT +GLOBAL +DEFAULT +[0-9]+ _?x|[0-9]+ +FUNC +GLOBAL +DEFAULT .* [0-9]+ _?foo@)@VERS\.0
 #...
- +[0-9]+: [0-9a-f]+ +(4 +OBJECT +GLOBAL +DEFAULT +[0-9]+ _?x|[0-9]+ +FUNC +GLOBAL +DEFAULT +[0-9]+ _?foo@)@VERS\.0
+ +[0-9]+: [0-9a-f]+ +(4 +OBJECT +GLOBAL +DEFAULT +[0-9]+ _?x|[0-9]+ +FUNC +GLOBAL +DEFAULT .* [0-9]+ _?foo@)@VERS\.0
 #...
 Symbol table '.symtab' contains [0-9]+ entries:
 #pass
index 1d64efc..fb106c6 100644 (file)
@@ -98,8 +98,9 @@ proc contains_ifunc_symbol { binary_file } {
 
     # Look for a line like this:
     #    58: 0000000000400600    30 IFUNC   GLOBAL DEFAULT   12 library_func2
+    # with perhaps some other info between the visibility and section
 
-    if { ![regexp ".*\[ \]*IFUNC\[ \]+GLOBAL\[ \]+DEFAULT\[ \]+\[UND0-9\]+\[ \]+library_func2\n" [file_contents readelf.out]] } {
+    if { ![regexp ".*\[ \]*IFUNC\[ \]+GLOBAL\[ \]+DEFAULT .* \[UND0-9\]+\[ \]+library_func2\n" [file_contents readelf.out]] } {
        return 0
     }