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