xref: /illumos-gate/usr/src/test/elf-tests/tests/relocs/amd64/gotpcrelx/rex_gotpcrel.s (revision 2c4055ebe2826777af400387612994d8bf26d113)
1	.text
2	.globl	foo
3	.section	.rodata
4foo_addr:
5	.string	"string"
6
7	.section	.data.rel.local,"aw",@progbits
8	.align 8
9	.type	foo, @object
10	.size	foo, 8
11foo:
12	.quad	foo_addr
13
14	.text
15	.globl	main
16	.type	main, @function
17main:
18	pushq	%rbp
19	movq	%rsp, %rbp
20	subq	$16, %rsp
21	movl	%edi, -4(%rbp)
22	movq	%rsi, -16(%rbp)
23	movq	foo@GOTPCREL(%rip), %rax
24	movq	(%rax), %rax
25	movq	%rax, %rdi
26	call	puts@PLT
27	movl	$0, %eax
28	leave
29	ret
30	.size	main, .-main
31