aboutsummaryrefslogtreecommitdiff
path: root/ld/testsuite/ld-x86-64
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2020-05-23 20:49:16 -0700
committerH.J. Lu <hjl.tools@gmail.com>2020-05-23 20:56:31 -0700
commit309cae1f7bbb6c4de0234e9f592d7dad3d6c61ba (patch)
treeb61443f60b3351096ad9ee3a009420fb2bcd3970 /ld/testsuite/ld-x86-64
parent4636b7db71d4ca8ccf999a837e932ee1d009ad42 (diff)
downloadgdb-309cae1f7bbb6c4de0234e9f592d7dad3d6c61ba.zip
gdb-309cae1f7bbb6c4de0234e9f592d7dad3d6c61ba.tar.gz
gdb-309cae1f7bbb6c4de0234e9f592d7dad3d6c61ba.tar.bz2
ld: Add -Bsymbolic-functions tests
PR ld/26018 * testsuite/ld-i386/i386.exp: Add a -Bsymbolic-functions test. * testsuite/ld-x86-64/x86-64.exp: Likewise. * testsuite/ld-i386/pr26018.d: New file. * testsuite/ld-x86-64/pr26018.d: Likewise. * testsuite/ld-x86-64/pr26018.s: Likewise.
Diffstat (limited to 'ld/testsuite/ld-x86-64')
-rw-r--r--ld/testsuite/ld-x86-64/pr26018.d15
-rw-r--r--ld/testsuite/ld-x86-64/pr26018.s7
-rw-r--r--ld/testsuite/ld-x86-64/x86-64.exp1
3 files changed, 23 insertions, 0 deletions
diff --git a/ld/testsuite/ld-x86-64/pr26018.d b/ld/testsuite/ld-x86-64/pr26018.d
new file mode 100644
index 0000000..c2003aa
--- /dev/null
+++ b/ld/testsuite/ld-x86-64/pr26018.d
@@ -0,0 +1,15 @@
+#as: --64
+#ld: -shared -Bsymbolic-functions -melf_x86_64
+#objdump: -dw
+
+.*: +file format .*
+
+
+Disassembly of section .text:
+
+[0-9a-f]+ <_start>:
+ +[a-f0-9]+: e8 00 00 00 00 callq [0-9a-f]+ <foo>
+
+[0-9a-f]+ <foo>:
+ +[a-f0-9]+: c3 retq
+#pass
diff --git a/ld/testsuite/ld-x86-64/pr26018.s b/ld/testsuite/ld-x86-64/pr26018.s
new file mode 100644
index 0000000..0b36f2b
--- /dev/null
+++ b/ld/testsuite/ld-x86-64/pr26018.s
@@ -0,0 +1,7 @@
+ .global _start, foo
+ .type foo, %function
+ .text
+_start:
+ call foo@PLT
+foo:
+ ret
diff --git a/ld/testsuite/ld-x86-64/x86-64.exp b/ld/testsuite/ld-x86-64/x86-64.exp
index d2e5ac7..9db16c6 100644
--- a/ld/testsuite/ld-x86-64/x86-64.exp
+++ b/ld/testsuite/ld-x86-64/x86-64.exp
@@ -467,6 +467,7 @@ run_dump_test "pr25416-2a"
run_dump_test "pr25416-2b"
run_dump_test "pr25416-3"
run_dump_test "pr25416-4"
+run_dump_test "pr26018"
if { ![istarget "x86_64-*-linux*"] && ![istarget "x86_64-*-nacl*"]} {
return