xref: /illumos-gate/usr/src/test/elf-tests/tests/tls/amd64/ie/style2.s (revision d8849d7dee03b84a3fa281ec65eb9e3d86d3756b)
1/*
2 * This file and its contents are supplied under the terms of the
3 * Common Development and Distribution License ("CDDL"), version 1.0.
4 * You may only use this file in accordance with the terms of version
5 * 1.0 of the CDDL.
6 *
7 * A full copy of the text of the CDDL should have accompanied this
8 * source.  A copy of the CDDL is also available via the Internet at
9 * http://www.illumos.org/license/CDDL.
10 */
11
12/*
13 * Copyright 2012, Richard Lowe.
14 */
15
16	.section	.rodata.str1.1,"aMS",@progbits,1
17.LC0:
18	.string	"foo: %p\n"
19	.text
20.globl main
21	.type	main, @function
22main:
23.LFB0:
24	pushq	%rbp
25.LCFI0:
26	movq	%rsp, %rbp
27.LCFI1:
28	movq	foo@GOTTPOFF(%rip), %rsi
29	addq	%fs:0, %rsi
30	movl	$.LC0, %edi
31	movl	$0, %eax
32	call	printf
33	movl	$0, %eax
34	leave
35	ret
36.LFE0:
37	.size	main, .-main
38.globl foo
39	.section	.rodata.str1.1
40.LC1:
41	.string	"foo"
42	.section	.tdata,"awT",@progbits
43	.align 8
44	.type	foo, @object
45	.size	foo, 8
46foo:
47	.quad	.LC1
48