1*4db555a5SRichard Lowe/* 2*4db555a5SRichard Lowe * This file and its contents are supplied under the terms of the 3*4db555a5SRichard Lowe * Common Development and Distribution License ("CDDL"), version 1.0. 4*4db555a5SRichard Lowe * You may only use this file in accordance with the terms of version 5*4db555a5SRichard Lowe * 1.0 of the CDDL. 6*4db555a5SRichard Lowe * 7*4db555a5SRichard Lowe * A full copy of the text of the CDDL should have accompanied this 8*4db555a5SRichard Lowe * source. A copy of the CDDL is also available via the Internet at 9*4db555a5SRichard Lowe * http://www.illumos.org/license/CDDL.u 10*4db555a5SRichard Lowe */ 11*4db555a5SRichard Lowe 12*4db555a5SRichard Lowe/* 13*4db555a5SRichard Lowe * Copyright 2019, Richard Lowe. 14*4db555a5SRichard Lowe */ 15*4db555a5SRichard Lowe 16*4db555a5SRichard Lowe .section .rodata.str1.1,"aMS",@progbits,1 17*4db555a5SRichard Lowe.LC0: 18*4db555a5SRichard Lowe .string "foo: %s (%p)\n" 19*4db555a5SRichard Lowe .section .tdata,"awT",@progbits 20*4db555a5SRichard Lowe .align 4 21*4db555a5SRichard Lowe .type foo, @object 22*4db555a5SRichard Lowe .size foo,4 23*4db555a5SRichard Lowe.local foo 24*4db555a5SRichard Lowefoo: 25*4db555a5SRichard Lowe .string "foo" 26*4db555a5SRichard Lowe .text 27*4db555a5SRichard Lowe.globl main 28*4db555a5SRichard Lowe .type main, @function 29*4db555a5SRichard Lowemain: 30*4db555a5SRichard Lowe pushl %ebp 31*4db555a5SRichard Lowe movl %esp, %ebp 32*4db555a5SRichard Lowe /* 33*4db555a5SRichard Lowe * an R_386_TLS_LDM relocation without a following 34*4db555a5SRichard Lowe * followed by an R_386_PLT32 relocation, rather than an 35*4db555a5SRichard Lowe * R_386_TLS_LDM_PLT the call should be removed, and _not_ 36*4db555a5SRichard Lowe * left alone unrelocated as it was prior to: 37*4db555a5SRichard Lowe * 10267 ld and GCC disagree about i386 local dynamic TLS 38*4db555a5SRichard Lowe */ 39*4db555a5SRichard Lowe leal foo@TLSLDM(%ebx), %eax 40*4db555a5SRichard Lowe call ___tls_get_addr@PLT 41*4db555a5SRichard Lowe leal foo@DTPOFF(%eax), %edx 42*4db555a5SRichard Lowe pushl %edx 43*4db555a5SRichard Lowe pushl %edx 44*4db555a5SRichard Lowe pushl $.LC0 45*4db555a5SRichard Lowe call printf@PLT 46*4db555a5SRichard Lowe movl $0x0,%eax 47*4db555a5SRichard Lowe leave 48*4db555a5SRichard Lowe ret 49*4db555a5SRichard Lowe .size main, .-main 50