aboutsummaryrefslogtreecommitdiff
path: root/ld/testsuite/ld-mips-elf
diff options
context:
space:
mode:
Diffstat (limited to 'ld/testsuite/ld-mips-elf')
-rw-r--r--ld/testsuite/ld-mips-elf/hash1.d11
-rw-r--r--ld/testsuite/ld-mips-elf/hash1.s8
-rw-r--r--ld/testsuite/ld-mips-elf/hash1a.d5
-rw-r--r--ld/testsuite/ld-mips-elf/hash1b.d4
-rw-r--r--ld/testsuite/ld-mips-elf/hash1c.d4
-rw-r--r--ld/testsuite/ld-mips-elf/hash2.d17
-rw-r--r--ld/testsuite/ld-mips-elf/mips-elf.exp5
-rw-r--r--ld/testsuite/ld-mips-elf/start.s12
8 files changed, 49 insertions, 17 deletions
diff --git a/ld/testsuite/ld-mips-elf/hash1.d b/ld/testsuite/ld-mips-elf/hash1.d
new file mode 100644
index 0000000..3b9725d
--- /dev/null
+++ b/ld/testsuite/ld-mips-elf/hash1.d
@@ -0,0 +1,11 @@
+#source: hash1.s
+#readelf: -d -I
+#ld: -nostdlib -shared --hash-style=gnu
+#target: [check_shared_lib_support]
+#xfail: mips*-*-irix*
+
+#...
+ +0x[0-9a-z]+ +\(MIPS_XHASH\) +0x[0-9a-z]+
+#...
+ +1 +1 +\( 50.0%\) +100.0%
+#...
diff --git a/ld/testsuite/ld-mips-elf/hash1.s b/ld/testsuite/ld-mips-elf/hash1.s
index 4e7fe2f..587cef1 100644
--- a/ld/testsuite/ld-mips-elf/hash1.s
+++ b/ld/testsuite/ld-mips-elf/hash1.s
@@ -1 +1,7 @@
- nop
+.globl foo
+
+.text
+
+foo:
+ jr $ra
+ nop
diff --git a/ld/testsuite/ld-mips-elf/hash1a.d b/ld/testsuite/ld-mips-elf/hash1a.d
deleted file mode 100644
index c189c93..0000000
--- a/ld/testsuite/ld-mips-elf/hash1a.d
+++ /dev/null
@@ -1,5 +0,0 @@
-#source: hash1.s
-#ld: -shared --hash-style=sysv
-#objdump: -dr
-#target: [check_shared_lib_support]
-#pass
diff --git a/ld/testsuite/ld-mips-elf/hash1b.d b/ld/testsuite/ld-mips-elf/hash1b.d
deleted file mode 100644
index 5cafede..0000000
--- a/ld/testsuite/ld-mips-elf/hash1b.d
+++ /dev/null
@@ -1,4 +0,0 @@
-#source: hash1.s
-#ld: -shared --hash-style=both
-#target: [check_shared_lib_support]
-#error: .gnu.hash is incompatible with the MIPS ABI
diff --git a/ld/testsuite/ld-mips-elf/hash1c.d b/ld/testsuite/ld-mips-elf/hash1c.d
deleted file mode 100644
index 379620a..0000000
--- a/ld/testsuite/ld-mips-elf/hash1c.d
+++ /dev/null
@@ -1,4 +0,0 @@
-#source: hash1.s
-#ld: -shared --hash-style=gnu
-#target: [check_shared_lib_support]
-#error: .gnu.hash is incompatible with the MIPS ABI
diff --git a/ld/testsuite/ld-mips-elf/hash2.d b/ld/testsuite/ld-mips-elf/hash2.d
new file mode 100644
index 0000000..79fda3c
--- /dev/null
+++ b/ld/testsuite/ld-mips-elf/hash2.d
@@ -0,0 +1,17 @@
+#source: start.s
+#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]+ +NOTYPE +GLOBAL +DEFAULT +[1-9] 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]+ +NOTYPE +GLOBAL +DEFAULT +[1-9] __start
+#...
diff --git a/ld/testsuite/ld-mips-elf/mips-elf.exp b/ld/testsuite/ld-mips-elf/mips-elf.exp
index 1fee8ef..3c7ce6a 100644
--- a/ld/testsuite/ld-mips-elf/mips-elf.exp
+++ b/ld/testsuite/ld-mips-elf/mips-elf.exp
@@ -854,9 +854,8 @@ if { $linux_gnu } {
run_dump_test_n32 "emit-relocs-1" {{as -EB} {ld -EB}}
-run_dump_test "hash1a"
-run_dump_test "hash1b"
-run_dump_test "hash1c"
+run_dump_test "hash1"
+run_dump_test "hash2"
if { $linux_gnu && $has_abi(o32) } {
# The number of symbols that are always included in the symbol table
diff --git a/ld/testsuite/ld-mips-elf/start.s b/ld/testsuite/ld-mips-elf/start.s
new file mode 100644
index 0000000..ee26ab3
--- /dev/null
+++ b/ld/testsuite/ld-mips-elf/start.s
@@ -0,0 +1,12 @@
+ .text
+ .globl start
+start:
+ .globl _start
+_start:
+ .globl __start
+__start:
+ .globl main
+main:
+ .globl _main
+_main:
+ .dc.a 0