diff options
Diffstat (limited to 'ld/testsuite')
-rw-r--r-- | ld/testsuite/ld-elf/hash.d | 2 | ||||
-rw-r--r-- | ld/testsuite/ld-mips-elf/hash1.d | 11 | ||||
-rw-r--r-- | ld/testsuite/ld-mips-elf/hash1.s | 8 | ||||
-rw-r--r-- | ld/testsuite/ld-mips-elf/hash1a.d | 5 | ||||
-rw-r--r-- | ld/testsuite/ld-mips-elf/hash1b.d | 4 | ||||
-rw-r--r-- | ld/testsuite/ld-mips-elf/hash1c.d | 4 | ||||
-rw-r--r-- | ld/testsuite/ld-mips-elf/hash2.d | 17 | ||||
-rw-r--r-- | ld/testsuite/ld-mips-elf/mips-elf.exp | 5 | ||||
-rw-r--r-- | ld/testsuite/ld-mips-elf/start.s | 12 |
9 files changed, 50 insertions, 18 deletions
diff --git a/ld/testsuite/ld-elf/hash.d b/ld/testsuite/ld-elf/hash.d index fb079124e5b..efe675e0c7f 100644 --- a/ld/testsuite/ld-elf/hash.d +++ b/ld/testsuite/ld-elf/hash.d @@ -3,7 +3,7 @@ #ld: -shared --hash-style=gnu #target: *-*-linux* *-*-gnu* arm*-*-uclinuxfdpiceabi #xfail: mips*-*-* -# GNU hash is not supported for MIPS targets due to psABI restrictions +# MIPS uses a different style of GNU hash due to psABI restrictions # on dynsym table ordering. #... diff --git a/ld/testsuite/ld-mips-elf/hash1.d b/ld/testsuite/ld-mips-elf/hash1.d new file mode 100644 index 00000000000..3b9725dbe58 --- /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 4e7fe2f0a49..587cef1d761 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 c189c93acd0..00000000000 --- 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 5cafede5ebd..00000000000 --- 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 379620af20b..00000000000 --- 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 00000000000..79fda3c621c --- /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 1fee8efb847..3c7ce6af14b 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 00000000000..ee26ab30ac6 --- /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 |