summaryrefslogtreecommitdiff
path: root/ld/testsuite/ld-x86-64/pr20253-2b.S
blob: 9bfab0cb4755afb0fc6e5648b1e546f6af815549 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"PASS"
	.text
	.globl	check
	.type	check, @function
check:
	subq	$8, %rsp
	call	*get_func1@GOTPCREL(%rip)
#ifdef CHECK_PLT
	cmpl	$func1, %eax
#else
	cmpq	func1@GOTPCREL(%rip), %rax
#endif
	jne	.L3
	movq	func1_p@GOTPCREL(%rip), %rdx
#ifdef __LP64__
	cmpq	%rax, (%rdx)
#else
	cmpl	%eax, (%rdx)
#endif
	jne	.L3
	call	*func1@GOTPCREL(%rip)
	cmpl	$1, %eax
	jne	.L3
	call	*call_func1@GOTPCREL(%rip)
	cmpl	$1, %eax
	jne	.L3
	call	*get_func2@GOTPCREL(%rip)
	movq	func2_p@GOTPCREL(%rip), %rdx
#ifdef __LP64__
	cmpq	%rax, (%rdx)
#else
	cmpl	%eax, (%rdx)
#endif
	jne	.L3
	call	*call_func2@GOTPCREL(%rip)
	cmpl	$2, %eax
	jne	.L3
	leaq	.LC0(%rip), %rdi
	addq	$8, %rsp
	jmp	*puts@GOTPCREL(%rip)
.L3:
	call	*abort@GOTPCREL(%rip)
	.size	check, .-check
	.section	.note.GNU-stack,"",@progbits