Accept mips-sgi-irix output in a few ld tests
authorAlan Modra <amodra@gmail.com>
Tue, 17 Dec 2019 07:16:04 +0000 (17:46 +1030)
committerAlan Modra <amodra@gmail.com>
Tue, 17 Dec 2019 10:12:47 +0000 (20:42 +1030)
mips-sgi-irix gas emits STT_OBJECT symbols where other assemblers
would use STT_NOTYPE.  See mips_frob_symbol in gas/config/tc-mips.c.
Also, the section of some dynamic symbols is set to SHN_MIPS_TEXT or
SHN_MIPS_DATA.  See _bfd_mips_elf_finish_dynamic_symbol in
bfd/elfxx-mips.c.  These differences are visible in readelf output
and cause some tests to fail for no other good reason.

The patch fixes the following fails and removes an xfail.
FAIL: ld-elf/pr23591
FAIL: PROVIDE_HIDDEN test (auxiliary shared object)
FAIL: PR ld/21233 dynamic symbols with section GC (auxiliary shared library)

* testsuite/ld-elf/pr21233-l.sd: Accept OBJECT for type and
PRC for section of symbols.
* testsuite/ld-elf/pr23591.d: Likewise.
* testsuite/ld-elf/provide-hidden-s.nd: Likewise.
* testsuite/ld-mips-elf/start.s: Make symbols function type.
* testsuite/ld-mips-elf/hash2.d: Adjust.  Don't xfail irix.

ld/ChangeLog
ld/testsuite/ld-elf/pr21233-l.sd
ld/testsuite/ld-elf/pr23591.d
ld/testsuite/ld-elf/provide-hidden-s.nd
ld/testsuite/ld-mips-elf/hash2.d
ld/testsuite/ld-mips-elf/start.s

index f23d70b043cc816e78219cc58cb42d9fb277e161..8a38d869b104ecc6f92f42e6e02a7a6e1d307867 100644 (file)
@@ -1,3 +1,12 @@
+2019-12-17  Alan Modra  <amodra@gmail.com>
+
+       * testsuite/ld-elf/pr21233-l.sd: Accept OBJECT for type and
+       PRC for section of symbols.
+       * testsuite/ld-elf/pr23591.d: Likewise.
+       * testsuite/ld-elf/provide-hidden-s.nd: Likewise.
+       * testsuite/ld-mips-elf/start.s: Make symbols function type.
+       * testsuite/ld-mips-elf/hash2.d: Adjust.  Don't xfail irix.
+
 2019-12-17  Alan Modra  <amodra@gmail.com>
 
        * emulparams/tic80coff.sh: Delete file.
index 724fdd41d88f1c76cdba3fcee50741d4f1fa3885..c7e56e3511ea8962e68464b3005017ae46a5be61 100644 (file)
@@ -2,5 +2,5 @@
 #    Num:    Value  Size Type    Bind   Vis      Ndx Name
 #      1: 00000000     1 OBJECT  GLOBAL DEFAULT    5 bar
 #...
- *[0-9]+: +[0-9a-f]+ +1 +OBJECT +GLOBAL +DEFAULT +[0-9]+ +bar
+ *[0-9]+: +[0-9a-f]+ +1 +OBJECT +GLOBAL +DEFAULT +([0-9]+|PRC\[0xff02\]) +bar
 #pass
index e5a747532400f15a854de2892133d60e446f9928..c9cfdfa4352aed4dd5a6a02ef80bf799f0f96bcc 100644 (file)
@@ -8,5 +8,5 @@
 # relocations in read-only sections.
 
 #...
- +[0-9]+: +[a-f0-9]+ +0 +NOTYPE +(GLOBAL +HIDDEN|LOCAL +DEFAULT) +[0-9]+ +___?start___sancov_cntrs
+ +[0-9]+: +[a-f0-9]+ +0 +(NOTYPE|OBJECT) +(GLOBAL +HIDDEN|LOCAL +DEFAULT) +[0-9]+ +___?start___sancov_cntrs
 #pass
index 4fd2cc57b1b2a53dd925f0012d2f4670a7e25b5b..96ce725f41f3e9b30c6685ca1126febef30303ef 100644 (file)
@@ -1,8 +1,8 @@
 Symbol table '\.dynsym' contains [0-9]+ entries:
 #...
- *[0-9]+: 0*12300000 +0 (?:NOTYPE|OBJECT) +GLOBAL +DEFAULT +[0-9]+ foo
+ *[0-9]+: 0*12300000 +0 (?:NOTYPE|OBJECT) +GLOBAL +DEFAULT +([0-9]+|PRC\[0xff02\]) foo
 #...
 Symbol table '\.symtab' contains [0-9]+ entries:
 #...
- *[0-9]+: 0*12300000 +0 (?:NOTYPE|OBJECT) +GLOBAL +DEFAULT +[0-9]+ foo
+ *[0-9]+: 0*12300000 +0 (?:NOTYPE|OBJECT) +GLOBAL +DEFAULT +([0-9]+|PRC\[0xff02\]) foo
 #pass
index 79fda3c621c01ccd98bb562443ac9c195ca0471f..122edb80e13f0bb886e26989d36e9b33740d3d9e 100644 (file)
@@ -2,16 +2,15 @@
 #readelf: -d -s -D
 #ld: -shared --hash-style=gnu
 #target: [check_shared_lib_support] 
-#xfail: mips*-*-irix*
 
 #...
  +0x[0-9a-z]+ +\(MIPS_XHASH\) +0x[0-9a-z]+
 #...
- +[0-9]+ +[0-9]+: +[0-9a-f]+ +[0-9]+ +NOTYPE +GLOBAL +DEFAULT +[1-9] _start
+ +[0-9]+ +[0-9]+: +[0-9a-f]+ +[0-9]+ +FUNC +GLOBAL +DEFAULT +([1-9]|PRC) _start
 #...
- +[0-9]+ +[0-9]+: +[0-9a-f]+ +[0-9]+ +NOTYPE +GLOBAL +DEFAULT +[1-9] main
+ +[0-9]+ +[0-9]+: +[0-9a-f]+ +[0-9]+ +FUNC +GLOBAL +DEFAULT +([1-9]|PRC) main
 #...
- +[0-9]+ +[0-9]+: +[0-9a-f]+ +[0-9]+ +NOTYPE +GLOBAL +DEFAULT +[1-9] start
+ +[0-9]+ +[0-9]+: +[0-9a-f]+ +[0-9]+ +FUNC +GLOBAL +DEFAULT +([1-9]|PRC) start
 #...
- +[0-9]+ +[0-9]+: +[0-9a-f]+ +[0-9]+ +NOTYPE +GLOBAL +DEFAULT +[1-9] __start
+ +[0-9]+ +[0-9]+: +[0-9a-f]+ +[0-9]+ +FUNC +GLOBAL +DEFAULT +([1-9]|PRC) __start
 #...
index ee26ab30ac673d80a26e361dd14cd1e34cbf759b..b252f797ab5ddc4cca175141aa5c89c72cafaa99 100644 (file)
@@ -1,12 +1,17 @@
        .text
-       .globl start
+       .globl  start
+       .type   start, @function
 start:
-       .globl _start
+       .globl  _start
+       .type   _start, @function
 _start:
-       .globl __start
+       .globl  __start
+       .type   __start, @function
 __start:
-       .globl main
+       .globl  main
+       .type   main, @function
 main:
        .globl  _main
+       .type   _main, @function
 _main:
        .dc.a 0
This page took 0.027219 seconds and 4 git commands to generate.