3337 x64 link-editor is painfully literal-minded about TLS
[illumos-gate.git] / usr / src / cmd / sgs / test / ld / x64 / tls / ie / style2-with-r13.s
blob40cf796234050422e23b5001a503a87fb44a39dd
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.
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.
13 * Copyright 2012, Richard Lowe.
14 */
16 .section .rodata.str1.1,"aMS",@progbits,1
17 .LC0:
18 .string "foo: %p\n"
19 .text
20 .globl main
21 .type main, @function
22 main:
23 .LFB0:
24 pushq %rbp
25 .LCFI0:
26 movq %rsp, %rbp
27 .LCFI1:
28 movq foo@GOTTPOFF(%rip), %r13
29 addq %fs:0, %r13
30 movq %r13, %rsi
31 movl $.LC0, %edi
32 movl $0, %eax
33 call printf
34 movl $0, %eax
35 leave
36 ret
37 .LFE0:
38 .size main, .-main
39 .globl foo
40 .section .rodata.str1.1
41 .LC1:
42 .string "foo"
43 .section .tdata,"awT",@progbits
44 .align 8
45 .type foo, @object
46 .size foo, 8
47 foo:
48 .quad .LC1