summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2013-11-22 08:19:21 -0800
committerH.J. Lu <hjl.tools@gmail.com>2013-11-22 08:19:21 -0800
commitba194ed920be571b08733b9bc273497ccc1dc9ab (patch)
tree126fb46ac93dc89955d70a199056873aa7b58494
parentcc02be46ca0a9ec7212fbd0fca3377fd7dd47452 (diff)
downloadbinutils-gdb-users/hjl/mpx/plt32.tar.gz
Add bnd-plt-1.dusers/hjl/mpx/plt32
-rw-r--r--ld/testsuite/ld-x86-64/bnd-plt-1.d49
-rw-r--r--ld/testsuite/ld-x86-64/mpx.exp1
2 files changed, 50 insertions, 0 deletions
diff --git a/ld/testsuite/ld-x86-64/bnd-plt-1.d b/ld/testsuite/ld-x86-64/bnd-plt-1.d
new file mode 100644
index 00000000000..0b0b23095f4
--- /dev/null
+++ b/ld/testsuite/ld-x86-64/bnd-plt-1.d
@@ -0,0 +1,49 @@
+#source: bnd-branch-1.s
+#as: --64
+#ld: -shared -melf_x86_64
+#objdump: -dw
+
+.*: +file format .*
+
+
+Disassembly of section .plt:
+
+0+2b0 <foo2@plt-0x10>:
+[ ]*[a-f0-9]+: ff 35 82 01 20 00 pushq 0x200182\(%rip\) # 200438 <_GLOBAL_OFFSET_TABLE_\+0x8>
+[ ]*[a-f0-9]+: f2 ff 25 83 01 20 00 bnd jmpq \*0x200183\(%rip\) # 200440 <_GLOBAL_OFFSET_TABLE_\+0x10>
+[ ]*[a-f0-9]+: 0f 1f 00 nopl \(%rax\)
+
+0+2c0 <foo2@plt>:
+[ ]*[a-f0-9]+: ff 25 82 01 20 00 jmpq \*0x200182\(%rip\) # 200448 <_GLOBAL_OFFSET_TABLE_\+0x18>
+[ ]*[a-f0-9]+: 68 00 00 00 00 pushq \$0x0
+[ ]*[a-f0-9]+: e9 e0 ff ff ff jmpq 2b0 <foo2@plt-0x10>
+
+0+2d0 <foo3@plt>:
+[ ]*[a-f0-9]+: f2 ff 25 79 01 20 00 bnd jmpq \*0x200179\(%rip\) # 200450 <_GLOBAL_OFFSET_TABLE_\+0x20>
+[ ]*[a-f0-9]+: 68 01 00 00 00 pushq \$0x1
+[ ]*[a-f0-9]+: f2 e9 ce ff ff ff bnd jmpq 2b0 <foo2@plt-0x10>
+[ ]*[a-f0-9]+: 0f 1f 80 00 00 00 00 nopl 0x0\(%rax\)
+[ ]*[a-f0-9]+: 0f 1f 80 00 00 00 00 nopl 0x0\(%rax\)
+
+0+2f0 <foo1@plt>:
+[ ]*[a-f0-9]+: f2 ff 25 69 01 20 00 bnd jmpq \*0x200169\(%rip\) # 200460 <_GLOBAL_OFFSET_TABLE_\+0x30>
+[ ]*[a-f0-9]+: 68 02 00 00 00 pushq \$0x2
+[ ]*[a-f0-9]+: f2 e9 ae ff ff ff bnd jmpq 2b0 <foo2@plt-0x10>
+[ ]*[a-f0-9]+: 0f 1f 80 00 00 00 00 nopl 0x0\(%rax\)
+[ ]*[a-f0-9]+: 0f 1f 80 00 00 00 00 nopl 0x0\(%rax\)
+
+0+310 <foo4@plt>:
+[ ]*[a-f0-9]+: ff 25 5a 01 20 00 jmpq \*0x20015a\(%rip\) # 200470 <_GLOBAL_OFFSET_TABLE_\+0x40>
+[ ]*[a-f0-9]+: 68 03 00 00 00 pushq \$0x3
+[ ]*[a-f0-9]+: e9 90 ff ff ff jmpq 2b0 <foo2@plt-0x10>
+
+Disassembly of section .text:
+
+0+320 <_start>:
+[ ]*[a-f0-9]+: f2 e9 ca ff ff ff bnd jmpq 2f0 <foo1@plt>
+[ ]*[a-f0-9]+: e8 95 ff ff ff callq 2c0 <foo2@plt>
+[ ]*[a-f0-9]+: e9 a0 ff ff ff jmpq 2d0 <foo3@plt>
+[ ]*[a-f0-9]+: e8 db ff ff ff callq 310 <foo4@plt>
+[ ]*[a-f0-9]+: f2 e8 95 ff ff ff bnd callq 2d0 <foo3@plt>
+[ ]*[a-f0-9]+: e9 d0 ff ff ff jmpq 310 <foo4@plt>
+#pass
diff --git a/ld/testsuite/ld-x86-64/mpx.exp b/ld/testsuite/ld-x86-64/mpx.exp
index e3510cf3abd..54e9e029ab0 100644
--- a/ld/testsuite/ld-x86-64/mpx.exp
+++ b/ld/testsuite/ld-x86-64/mpx.exp
@@ -78,4 +78,5 @@ set run_tests {
run_ld_link_exec_tests [] $run_tests
run_dump_test "bnd-branch-1"
+run_dump_test "bnd-plt-1"
run_dump_test "bnd-got-plt-1"