aboutsummaryrefslogtreecommitdiff
path: root/ld/testsuite/ld-x86-64/pr22064a.S
diff options
context:
space:
mode:
Diffstat (limited to 'ld/testsuite/ld-x86-64/pr22064a.S')
-rw-r--r--ld/testsuite/ld-x86-64/pr22064a.S33
1 files changed, 33 insertions, 0 deletions
diff --git a/ld/testsuite/ld-x86-64/pr22064a.S b/ld/testsuite/ld-x86-64/pr22064a.S
new file mode 100644
index 0000000..8065a11
--- /dev/null
+++ b/ld/testsuite/ld-x86-64/pr22064a.S
@@ -0,0 +1,33 @@
+ .section .rodata.str1.1,"aMS",@progbits,1
+.LC0:
+ .string "PASS"
+ .text
+ .globl main
+ .type main, @function
+main:
+ movq foo@GOTPCREL(%rip), %rax
+ cmpl $0, (%rax)
+ jne .L4
+ subq $8, %rsp
+ call foo_p@PLT
+ cmpq foo@GOTPCREL(%rip), %rax
+ jne .L2
+ movq bar@GOTPCREL(%rip), %rax
+ cmpl $-1, (%rax)
+ jne .L2
+ call bar_p@PLT
+ cmpq bar@GOTPCREL(%rip), %rax
+ jne .L2
+ leaq .LC0(%rip), %rdi
+ call puts@PLT
+.L2:
+ movl $0, %eax
+ addq $8, %rsp
+ ret
+.L4:
+ movl $0, %eax
+ ret
+ .size main, .-main
+ .comm bar,8,4
+ .comm foo,4,4
+ .section .note.GNU-stack,"",@progbits