public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Alexandre Oliva <aoliva@redhat.com>
To: "Jan Beulich" <JBeulich@novell.com>, Michael Matz <matz@suse.de>,
	discuss@x86-64.org
Cc: "Andreas Jaeger" <aj@suse.de>, <binutils@sources.redhat.com>,
	libc-alpha@sources.redhat.com
Subject: Re: RFC: TLS improvements for IA32 and AMD64/EM64T
Date: Fri, 16 Sep 2005 21:01:00 -0000	[thread overview]
Message-ID: <orhdckzxk4.fsf@livre.oliva.athome.lsd.ic.unicamp.br> (raw)
In-Reply-To: <432A9023.76F0.0078.0@novell.com>

[-- Attachment #1: Type: text/plain, Size: 911 bytes --]

On Sep 16, 2005, "Jan Beulich" <JBeulich@novell.com> 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,


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: tlsdesc.patch --]
[-- Type: text/x-patch, Size: 3126 bytes --]

Index: ChangeLog
from  Alexandre Oliva  <aoliva@redhat.com>

	* 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}
 

[-- Attachment #3: Type: text/plain, Size: 188 bytes --]


-- 
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}

  reply	other threads:[~2005-09-16 18:18 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-09-16  6:07 Alexandre Oliva
2005-09-16  7:27 ` Alexandre Oliva
2005-09-16  7:34   ` Andreas Jaeger
2005-09-16  8:19     ` Jan Beulich
2005-09-16 21:01       ` Alexandre Oliva [this message]
2005-09-18 17:17   ` Alexandre Oliva
2005-09-22  7:53     ` Alexandre Oliva
2006-01-14 17:58       ` Alexandre Oliva
2006-01-18  1:45         ` Alan Modra
2005-09-17 14:14 Menezes, Evandro
2005-09-17 18:45 ` Alexandre Oliva
2005-09-19 23:18 Menezes, Evandro
2006-10-08 20:53 ` Alexandre Oliva
2006-10-09  6:23   ` Michael Matz
2006-10-09 19:57   ` Menezes, Evandro
2006-10-10  8:23     ` Alexandre Oliva
2006-10-10 16:24       ` Menezes, Evandro

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=orhdckzxk4.fsf@livre.oliva.athome.lsd.ic.unicamp.br \
    --to=aoliva@redhat.com \
    --cc=JBeulich@novell.com \
    --cc=aj@suse.de \
    --cc=binutils@sources.redhat.com \
    --cc=discuss@x86-64.org \
    --cc=libc-alpha@sources.redhat.com \
    --cc=matz@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).