public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: "Menezes, Evandro" <evandro.menezes@amd.com>
To: "Alexandre Oliva" <aoliva@redhat.com>
Cc: "Jan Beulich" <JBeulich@novell.com>,
	"Michael Matz" <matz@suse.de>,
	        discuss@x86-64.org, "Andreas Jaeger" <aj@suse.de>,
	        binutils@sources.redhat.com,
	libc-alpha@sources.redhat.com,
	        "Michael Meissner" <michael.meissner@amd.com>,
	        "H. J. Lu" <hjl@lucon.org>
Subject: RE: RFC: TLS improvements for IA32 and AMD64/EM64T
Date: Mon, 09 Oct 2006 19:57:00 -0000	[thread overview]
Message-ID: <1449F58C868D8D4E9C72945771150BDF5215EF@SAUSEXMB1.amd.com> (raw)
In-Reply-To: <oru02emswx.fsf@free.oliva.athome.lsd.ic.unicamp.br>

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

Hi, Alexandre. 

> Here's an updated patch the should address all of your concerns.  The
> proposed ABI changes haven't changed at all for almost a year, and in
> the mean time we've ported it to one more platform (ARM), so I believe
> this is rock solid now.

It looks good and the patch is pretty informative.  However, there are some statements that may not be as clear as they could be, so I was thinking if the changes to your patch in attach seem reasonable.

Would you consider adding the calculations for the new relocations in order to improve their clarity?  The original paper on TLS goes on about them a bit, but it wouldn't be a bad idea to have the psABI document more stand-alone.

I remember some examples in your paper at the GCC Summit and adding them to section 3.5 would be swell too.

> Let me know what you think about the proposed changes.  They document
> what's implemented in GNU binutils, GCC and the pending patches I have
> for glibc, that I'm retesting after updating them to a current tree.

From your paper at the GCC Summit it's quite clear that such additions to the psABI would be a fine idea.  Perhaps HJ would like to consider the corresponding additions for the i386 psABI extension.

So, there's no question about the technical part of your proposal.  But, as you can infer from my comments above, I'd like to improve the clarity of the psABI so that one wouldn't have to go to specific implementations to figure out the details.  What do you think?

Thank you,

-- 
_______________________________________________________
Evandro Menezes               AMD            Austin, TX


[-- Attachment #2: tlsdesc.patch.patch --]
[-- Type: application/octet-stream, Size: 2048 bytes --]

--- tlsdesc.patch	2006-10-09 14:32:25.739161000 -0500
+++ tlsdesc.patch.new	2006-10-09 14:38:53.597399000 -0500
@@ -115,10 +115,10 @@ Index: object-files.tex
 +linker generates such relocations in adjacent entries in the GOT, in
 +response to \texttt{R_X86_64_TLSGD} and \texttt{R_X86_64_TLSLD}
 +relocations.  If the linker can compute the offset itself, because the
-+referenced symbol binds locally, the \texttt{DTPOFF} may be omitted.
++referenced symbol binds locally, the relocations \texttt{R_X86_64_64} and \texttt{R_X86_64_32} may be used instead.
 +Otherwise, such relocations are always in pairs, such that the
-+\texttt{DTPOFF64} relocation applies to the word64 right past the
-+corresponding \texttt{DTPMOD} relocation.
++\texttt{R_X86_64_DTPOFF64} relocation applies to the word64 right past the
++corresponding \texttt{R_X86_64_DTPMOD64} relocation.
  \end{sloppypar}
  
 +\texttt{R_X86_64_TPOFF64} and \texttt{R_X86_64_TPOFF32} resolve to the
@@ -129,12 +129,12 @@ Index: object-files.tex
 +
 +\texttt{R_X86_64_TLSGD} and \texttt{R_X86_64_TLSLD} both resolve to
 +PC-relative offsets to a \texttt{DTPMOD} GOT entry.  The difference
-+between them is that, for \texttt{TLSGD}, the following GOT entry will
++between them is that, for \texttt{R_X86_64_TLSGD}, the following GOT entry will
 +contain the offset of the referenced symbol into its TLS block,
-+whereas, for \texttt{TLSLD}, the following GOT entry will contain the
++whereas, for \texttt{R_X86_64_TLSLD}, the following GOT entry will contain the
 +offset for the base address of the TLS block.  The idea is that adding
-+this offset to the result of \texttt{DTPMOD32} for a symbol ought to
-+yield the same as the result of \texttt{DTPMOD64} for the same symbol.
++this offset to the result of \texttt{R_X86_64_DTPMOD32} for a symbol ought to
++yield the same as the result of \texttt{R_X86_64_DTPMOD64} for the same symbol.
 +
 +\texttt{R_X86_64_TLSDESC} resolves to a pair of word64s, called TLS
 +Descriptor, the first of which is a pointer to a function, followed by

  parent reply	other threads:[~2006-10-09 19:57 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2006-10-10  8:23     ` Alexandre Oliva
2006-10-10 16:24       ` Menezes, Evandro
2006-10-25 23:58         ` A public discussion group for IA32 psABI H. J. Lu
  -- strict thread matches above, loose matches on Subject: below --
2005-09-17 14:14 RFC: TLS improvements for IA32 and AMD64/EM64T Menezes, Evandro
2005-09-17 18:45 ` Alexandre Oliva
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
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

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=1449F58C868D8D4E9C72945771150BDF5215EF@SAUSEXMB1.amd.com \
    --to=evandro.menezes@amd.com \
    --cc=JBeulich@novell.com \
    --cc=aj@suse.de \
    --cc=aoliva@redhat.com \
    --cc=binutils@sources.redhat.com \
    --cc=discuss@x86-64.org \
    --cc=hjl@lucon.org \
    --cc=libc-alpha@sources.redhat.com \
    --cc=matz@suse.de \
    --cc=michael.meissner@amd.com \
    /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).