MIPS/LD/testsuite: Adjust match patterns for special section indexes
authorMaciej W. Rozycki <macro@mips.com>
Tue, 30 Jan 2018 00:38:12 +0000 (00:38 +0000)
committerMaciej W. Rozycki <macro@mips.com>
Tue, 30 Jan 2018 00:38:12 +0000 (00:38 +0000)
Update `readelf' symbol table dump match patterns to handle SHN_MIPS_DATA
and SHN_MIPS_TEXT special section indexes produced by the IRIX ELF format
variation used with a number of MIPS targets and printed by `readelf' as
PRC[0xff02] and PRC[0xff01] respectively, correcting LD test suite
failures:

extra regexps in .../ld/testsuite/ld-elf/comm-data1.sd starting with "^ +[0-9]+: +[0-9a-f]+ +0 +OBJECT +GLOBAL +DEFAULT +[0-9]+ +foo$"
EOF from dump.out
FAIL: Common symbol override test (auxiliary shared object build)

extra regexps in .../ld/testsuite/ld-elf/pr21703-shared.sd starting with "^ +[0-9]+: +[0-9a-f]+ +4 +FUNC +GLOBAL +DEFAULT +[0-9] +foo@FOO$"
EOF from dump.out
FAIL: PR ld/21703 shared

extra regexps in .../ld/testsuite/ld-elf/comm-data1.sd starting with "^ +[0-9]+: +[0-9a-f]+ +0 +OBJECT +GLOBAL +DEFAULT +[0-9]+ +foo$"
EOF from dump.out
FAIL: MIPS o32/copyreloc common symbol override test (auxiliary shared object build)

extra regexps in .../ld/testsuite/ld-elf/comm-data1.sd starting with "^ +[0-9]+: +[0-9a-f]+ +0 +OBJECT +GLOBAL +DEFAULT +[0-9]+ +foo$"
EOF from dump.out
FAIL: MIPS o32/nocopyreloc common symbol override test (auxiliary shared object build)

observed due to file contents like:

     7: 5ffe02e8     0 OBJECT  GLOBAL DEFAULT PRC[0xff02] foo

shown by `readelf -s' vs:

 +[0-9]+: +[0-9a-f]+ +0 +OBJECT +GLOBAL +DEFAULT +[0-9]+ +foo

pattern expected, triggered by widening testing to these targets by commit
05a5feafdd38 ("Rewrite check_shared_lib_support").

ld/
* testsuite/ld-elf/comm-data1.sd: Alternatively accept
`PRC[0xff02]' in place of a regular section index.
* testsuite/ld-elf/pr21703-shared.sd: Likewise `PRC[0xff01]'.

ld/ChangeLog
ld/testsuite/ld-elf/comm-data1.sd
ld/testsuite/ld-elf/pr21703-shared.sd

index a90dcb8b96d6473ecb593408d5a6d9022f41fd8e..ad05c547a710b8ce695cf5981e6f54b05841638f 100644 (file)
@@ -1,3 +1,9 @@
+2018-01-30  Maciej W. Rozycki  <macro@mips.com>
+
+       * testsuite/ld-elf/comm-data1.sd: Alternatively accept
+       `PRC[0xff02]' in place of a regular section index.
+       * testsuite/ld-elf/pr21703-shared.sd: Likewise `PRC[0xff01]'.
+
 2018-01-29  Alan Modra  <amodra@gmail.com>
 
        * testsuite/ld-elf/pr21964-3a.c: New file.
index d00435bd48b06b0a3e72d14f43d900dc4ceeef10..7d6507f12b9d884d093d0a65e6b88de5a11d77a8 100644 (file)
@@ -1,10 +1,10 @@
 Symbol table '\.dynsym' contains [0-9]+ entries:
  +Num: +Value +Size +Type +Bind +Vis +Ndx +Name
 #...
- +[0-9]+: +[0-9a-f]+ +0 +OBJECT +GLOBAL +DEFAULT +[0-9]+ +foo
+ +[0-9]+: +[0-9a-f]+ +0 +OBJECT +GLOBAL +DEFAULT +(?:[0-9]+|PRC\[0xff02\]) +foo
 #...
 Symbol table '\.symtab' contains [0-9]+ entries:
  +Num: +Value +Size +Type +Bind +Vis +Ndx +Name
 #...
- +[0-9]+: +[0-9a-f]+ +0 +OBJECT +GLOBAL +DEFAULT +[0-9]+ +foo
+ +[0-9]+: +[0-9a-f]+ +0 +OBJECT +GLOBAL +DEFAULT +(?:[0-9]+|PRC\[0xff02\]) +foo
 #pass
index 9ca541cf5413890ad128f6eda54770a45a10a3f7..79e67f78159297e9d4b5d00f77a1ef9f5c1d7356 100644 (file)
@@ -1,11 +1,11 @@
 Symbol table '\.dynsym' contains [0-9]+ entries:
  +Num: +Value +Size Type +Bind +Vis +Ndx Name
 #...
- +[0-9]+: +[0-9a-f]+ +4 +FUNC +GLOBAL +DEFAULT +[0-9] +foo@FOO
+ +[0-9]+: +[0-9a-f]+ +4 +FUNC +GLOBAL +DEFAULT +(?:[0-9]+|PRC\[0xff01\]) +foo@FOO
 #...
  +[0-9]+: +[0-9a-f]+ +0 +OBJECT +GLOBAL +DEFAULT +ABS +FOO1
 #...
- +[0-9]+: +[0-9a-f]+ +32 +FUNC +GLOBAL +DEFAULT +[0-9] +foo@@FOO1
+ +[0-9]+: +[0-9a-f]+ +32 +FUNC +GLOBAL +DEFAULT +(?:[0-9]+|PRC\[0xff01\]) +foo@@FOO1
 #...
  +[0-9]+: +[0-9a-f]+ +0 +OBJECT +GLOBAL +DEFAULT +ABS +FOO
 #...
This page took 0.027038 seconds and 4 git commands to generate.