aboutsummaryrefslogtreecommitdiff
path: root/ld/testsuite/ld-elf
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2019-12-17 17:46:04 +1030
committerAlan Modra <amodra@gmail.com>2019-12-17 20:42:47 +1030
commit260bcd09bfb98ebc5d8f0eb564edca21872e9f7f (patch)
tree65082588aa843219b3567a28de239794f28ca704 /ld/testsuite/ld-elf
parent5b660084e26050d2e7f1fda06daec1e83311c188 (diff)
downloadgdb-260bcd09bfb98ebc5d8f0eb564edca21872e9f7f.zip
gdb-260bcd09bfb98ebc5d8f0eb564edca21872e9f7f.tar.gz
gdb-260bcd09bfb98ebc5d8f0eb564edca21872e9f7f.tar.bz2
Accept mips-sgi-irix output in a few ld tests
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.
Diffstat (limited to 'ld/testsuite/ld-elf')
-rw-r--r--ld/testsuite/ld-elf/pr21233-l.sd2
-rw-r--r--ld/testsuite/ld-elf/pr23591.d2
-rw-r--r--ld/testsuite/ld-elf/provide-hidden-s.nd4
3 files changed, 4 insertions, 4 deletions
diff --git a/ld/testsuite/ld-elf/pr21233-l.sd b/ld/testsuite/ld-elf/pr21233-l.sd
index 724fdd4..c7e56e3 100644
--- a/ld/testsuite/ld-elf/pr21233-l.sd
+++ b/ld/testsuite/ld-elf/pr21233-l.sd
@@ -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
diff --git a/ld/testsuite/ld-elf/pr23591.d b/ld/testsuite/ld-elf/pr23591.d
index e5a7475..c9cfdfa 100644
--- a/ld/testsuite/ld-elf/pr23591.d
+++ b/ld/testsuite/ld-elf/pr23591.d
@@ -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
diff --git a/ld/testsuite/ld-elf/provide-hidden-s.nd b/ld/testsuite/ld-elf/provide-hidden-s.nd
index 4fd2cc5..96ce725 100644
--- a/ld/testsuite/ld-elf/provide-hidden-s.nd
+++ b/ld/testsuite/ld-elf/provide-hidden-s.nd
@@ -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