xref: /illumos-gate/usr/src/test/elf-tests/tests/tls/amd64/ie/style1-main.s (revision d48be21240dfd051b689384ce2b23479d757f2d8)
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 bar: %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	%fs:0, %rsi
29	leaq	bar@TPOFF(%rsi), %rdx
30	addq	$foo@TPOFF, %rsi
31	movl	$.LC0, %edi
32	movl	$0, %eax
33	call	printf
34	movl	$0, %eax
35	call	func
36	movl	$0, %eax
37	leave
38	ret
39.LFE0:
40	.size	main, .-main
41.globl foo
42	.section	.rodata.str1.1
43.LC1:
44	.string	"foo"
45	.section	.tdata,"awT",@progbits
46	.align 8
47	.type	foo, @object
48	.size	foo, 8
49foo:
50	.quad	.LC1
51.globl bar
52	.section	.rodata.str1.1
53.LC2:
54	.string	"bar"
55	.section	.tdata
56	.align 8
57	.type	bar, @object
58	.size	bar, 8
59bar:
60	.quad	.LC2
61