149f9b365SRichard Lowe/* 249f9b365SRichard Lowe * This file and its contents are supplied under the terms of the 349f9b365SRichard Lowe * Common Development and Distribution License ("CDDL"), version 1.0. 449f9b365SRichard Lowe * You may only use this file in accordance with the terms of version 549f9b365SRichard Lowe * 1.0 of the CDDL. 649f9b365SRichard Lowe * 749f9b365SRichard Lowe * A full copy of the text of the CDDL should have accompanied this 849f9b365SRichard Lowe * source. A copy of the CDDL is also available via the Internet at 949f9b365SRichard Lowe * http://www.illumos.org/license/CDDL. 1049f9b365SRichard Lowe */ 1149f9b365SRichard Lowe 1249f9b365SRichard Lowe/* 1349f9b365SRichard Lowe * Copyright 2012, Richard Lowe. 14*4db555a5SRichard Lowe */ 1549f9b365SRichard Lowe 1649f9b365SRichard Lowe .section .rodata.str1.1,"aMS",@progbits,1 1749f9b365SRichard Lowe.LC0: 1849f9b365SRichard Lowe .string "foo: %p\n" 1949f9b365SRichard Lowe .text 2049f9b365SRichard Lowe.globl main 2149f9b365SRichard Lowe .type main, @function 2249f9b365SRichard Lowemain: 2349f9b365SRichard Lowe.LFB0: 2449f9b365SRichard Lowe pushq %rbp 2549f9b365SRichard Lowe.LCFI0: 2649f9b365SRichard Lowe movq %rsp, %rbp 2749f9b365SRichard Lowe.LCFI1: 2849f9b365SRichard Lowe movq foo@GOTTPOFF(%rip), %r12 2949f9b365SRichard Lowe addq %fs:0, %r12 3049f9b365SRichard Lowe movq %r12, %rsi 3149f9b365SRichard Lowe movl $.LC0, %edi 3249f9b365SRichard Lowe movl $0, %eax 3349f9b365SRichard Lowe call printf 3449f9b365SRichard Lowe movl $0, %eax 3549f9b365SRichard Lowe leave 3649f9b365SRichard Lowe ret 3749f9b365SRichard Lowe.LFE0: 3849f9b365SRichard Lowe .size main, .-main 3949f9b365SRichard Lowe.globl foo 4049f9b365SRichard Lowe .section .rodata.str1.1 4149f9b365SRichard Lowe.LC1: 4249f9b365SRichard Lowe .string "foo" 43*4db555a5SRichard Lowe 4449f9b365SRichard Lowe .section .tdata,"awT",@progbits 4549f9b365SRichard Lowe .align 8 4649f9b365SRichard Lowe .type foo, @object 4749f9b365SRichard Lowe .size foo, 8 4849f9b365SRichard Lowefoo: 4949f9b365SRichard Lowe .quad .LC1 50