From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10616 invoked by alias); 16 Sep 2005 18:18:36 -0000 Mailing-List: contact binutils-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sources.redhat.com Received: (qmail 10550 invoked by uid 22791); 16 Sep 2005 18:18:18 -0000 Received: from mx1.redhat.com (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Fri, 16 Sep 2005 18:18:18 +0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.11/8.12.11) with ESMTP id j8GIIH9V018642; Fri, 16 Sep 2005 14:18:17 -0400 Received: from pobox.corp.redhat.com (pobox.corp.redhat.com [172.16.52.156]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id j8GIIGV08771; Fri, 16 Sep 2005 14:18:16 -0400 Received: from livre.oliva.athome.lsd.ic.unicamp.br (vpn50-140.rdu.redhat.com [172.16.50.140]) by pobox.corp.redhat.com (8.12.8/8.12.8) with ESMTP id j8GIIEm7022674; Fri, 16 Sep 2005 14:18:15 -0400 Received: from livre.oliva.athome.lsd.ic.unicamp.br (livre.oliva.athome.lsd.ic.unicamp.br [127.0.0.1]) by livre.oliva.athome.lsd.ic.unicamp.br (8.13.4/8.13.4) with ESMTP id j8GIIBSn004705; Fri, 16 Sep 2005 15:18:12 -0300 Received: (from aoliva@localhost) by livre.oliva.athome.lsd.ic.unicamp.br (8.13.4/8.13.4/Submit) id j8GII7UA004701; Fri, 16 Sep 2005 15:18:07 -0300 To: "Jan Beulich" , Michael Matz , discuss@x86-64.org Cc: "Andreas Jaeger" , , libc-alpha@sources.redhat.com Subject: Re: RFC: TLS improvements for IA32 and AMD64/EM64T References: <432A9023.76F0.0078.0@novell.com> From: Alexandre Oliva Date: Fri, 16 Sep 2005 21:01:00 -0000 In-Reply-To: <432A9023.76F0.0078.0@novell.com> Message-ID: User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.4 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-SW-Source: 2005-09/txt/msg00195.txt.bz2 --=-=-= Content-length: 911 On Sep 16, 2005, "Jan Beulich" wrote: >> Please check the current x86-64 ABI, the relocations until 31 are all >> taken and reserved, you cannot use the above ones, > It's actually 33 meanwhile. And the same proposal that adds 32 and 33 > to x86-64 also suggests using 38 on i386 for a different purpose. See > the thread starting at > http://www.x86-64.org/mailing_lists/list?listname=discuss&listnum=0 Thanks, I've renumbered the relocations to avoid conflicts and, while at that, the dynamic table entries to a more appropriate range. Here's a patch for the x86-64 ABI document that adds the new relocations and references the new dynamic table numbers, referring to the latest version of my specs on the web for details. I'll post updated patches for binutils and glibc as soon as I get confirmation that the 3 relocation numbers are at least reserved for this purpose. Thanks, --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=tlsdesc.patch Content-length: 3126 Index: ChangeLog from Alexandre Oliva * object-files.tex (Relocation Types): Add R_X86_64_GOTPC32_TLSDESC, R_X86_64_TLSDESC_CALL and R_X86_64_TLSDESC. Add pointer to description. * dl.tex (Procedure Linkage Table): Mention lazy relocation of TLS descriptors. Index: dl.tex =================================================================== RCS file: /cvs/Repository/x86-64-ABI/dl.tex,v retrieving revision 1.31 diff -u -p -r1.31 dl.tex --- dl.tex 24 Aug 2005 15:11:42 -0000 1.31 +++ dl.tex 16 Sep 2005 18:10:44 -0000 @@ -265,6 +265,14 @@ evaluates procedure linkage table entrie resolution and relocation until the first execution of a table entry. \index{procedure linkage table|)} +Relocation entries of type \codeindex{R_X86_64_TLSDESC} may also be +subject to lazy relocation, using a single entry in the procedure +linkage table and in the global offset table, at locations given by +\texttt{DT_TLSDESC_PLT} and \texttt{DT_TLSDESC_GOT}, respectively, as +described in ``Thread-Local Storage Descriptors for IA32 and +AMD64/EM64T''\footnote{This document is currently available via + \url{http://people.redhat.com/aoliva/writeups/TLS/RFC-TLSDESC-x86.txt}}. + \subsubsection{Large Models} In the small and medium code models the size of both the PLT and the GOT Index: object-files.tex =================================================================== RCS file: /cvs/Repository/x86-64-ABI/object-files.tex,v retrieving revision 1.36 diff -u -p -r1.36 object-files.tex --- object-files.tex 14 Sep 2005 22:36:07 -0000 1.36 +++ object-files.tex 16 Sep 2005 18:10:46 -0000 @@ -448,6 +448,9 @@ the relocation addend. \texttt{R_X86_64_GOTPC32} & 26 & \textit{word32} & \texttt{GOT + A - P} \\ \texttt{R_X86_64_SIZE32} & 32 & \textit{word32} & \texttt{Z + A} \\ \texttt{R_X86_64_SIZE64} & 33 & \textit{word64} & \texttt{Z + A} \\ + \texttt{R_X86_64_GOTPC32_TLSDESC} & 34 & \textit{word32} & \\ + \texttt{R_X86_64_TLSDESC_CALL} & 35 & none & \\ + \texttt{R_X86_64_TLSDESC} & 36 & \textit{word64}$\times 2$ & \\ % \texttt{R_X86_64_GOT64} & 16 & \textit{word64} & \texttt{G + A} \\ % \texttt{R_X86_64_PLT64} & 17 & \textit{word64} & \texttt{L + A - P} \\ \end{tabular} @@ -501,7 +504,14 @@ The relocations \texttt{R_X86_64_DPTMOD6 of the Thread-Local Storage ABI extensions and are documented in the document called ``ELF Handling for Thread-Local Storage''\footnote{This document is currently available via - \url{http://people.redhat.com/drepper/tls.pdf}}\index{Thread-Local Storage}. + \url{http://people.redhat.com/drepper/tls.pdf}}\index{Thread-Local + Storage}. The relocations \texttt{R_X86_64_GOTPC32_TLSDESC}, +\texttt{R_X86_64_TLSDESC_CALL} and \texttt{R_X86_64_TLSDESC} are also +used for Thread-Local Storage, but are not documented there as of this +writing. A description can be found in the document ``Thread-Local +Storage Descriptors for IA32 and AMD64/EM64T''\footnote{This document + is currently available via + \url{http://people.redhat.com/aoliva/writeups/TLS/RFC-TLSDESC-x86.txt}}. \end{sloppypar} --=-=-= Content-length: 188 -- Alexandre Oliva http://www.lsd.ic.unicamp.br/~oliva/ Red Hat Compiler Engineer aoliva@{redhat.com, gcc.gnu.org} Free Software Evangelist oliva@{lsd.ic.unicamp.br, gnu.org} --=-=-=--