summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorCharles Crayne <chuck@thor.crayne.org>2008-11-01 17:09:36 -0700
committerCharles Crayne <chuck@thor.crayne.org>2008-11-01 17:09:36 -0700
commit81afb49809eb4edb7701bed82a8adc64f4bd5bd2 (patch)
tree3f3f42b5ca305df27f0a0b235532c0b66f32b2f9 /doc
parent5fb6a39bc9b1f16f1223be448bb819e3424242db (diff)
downloadnasm-81afb49809eb4edb7701bed82a8adc64f4bd5bd2.tar.gz
nasm-81afb49809eb4edb7701bed82a8adc64f4bd5bd2.tar.bz2
nasm-81afb49809eb4edb7701bed82a8adc64f4bd5bd2.zip
Document differences between TLS coding in ELF32 and ELF64
Absolute relocation wrt ..tlsie for ELF32 Relative relocation wrt ..gottpoff for ELF64
Diffstat (limited to 'doc')
-rw-r--r--doc/nasmdoc.src12
1 files changed, 10 insertions, 2 deletions
diff --git a/doc/nasmdoc.src b/doc/nasmdoc.src
index 35ba19b..a79a318 100644
--- a/doc/nasmdoc.src
+++ b/doc/nasmdoc.src
@@ -5397,9 +5397,18 @@ shared libraries entirely in NASM is given in \k{picdll}.
\S{elftls} \i{Thread Local Storage}\I{TLS}: \c{elf} Special
Symbols and \i\c{WRT}
+\b In ELF32 mode, referring to an external or global symbol using
+\c{wrt ..tlsie} \I\c{..tlsie}
+causes the linker to build an entry \e{in} the GOT containing the
+offset of the symbol within the TLS block, so you can access the value
+of the symbol with code such as:
+
+\c mov eax,[tid wrt ..tlsie]
+\c mov dword [gs:eax],ebx
-\b Referring to an external or global symbol using \c{wrt ..gottpoff} \I\c{..gottpoff}
+\b In ELF64 mode, referring to an external or global symbol using
+\c{wrt ..gottpoff} \I\c{..gottpoff}
causes the linker to build an entry \e{in} the GOT containing the
offset of the symbol within the TLS block, so you can access the value
of the symbol with code such as:
@@ -5407,7 +5416,6 @@ of the symbol with code such as:
\c mov rax,[rel tid wrt ..gottpoff]
\c mov rcx, [fs:rax]
-(Please note that this feature is currently implemented only for ELF64.)
\S{elfglob} \c{elf} Extensions to the \c{GLOBAL} Directive\I{GLOBAL,
elf extensions to}\I{GLOBAL, aoutb extensions to}