ELS TLS documentation: s/module/module_id/.
The field is actually called `module_id` in the code.
Test: N/A
Change-Id: I10f5ce07cb67f7f338036c49e0008c3dce2db0bd
diff --git a/docs/elf-tls.md b/docs/elf-tls.md
index 4a62793..d408b3f 100644
--- a/docs/elf-tls.md
+++ b/docs/elf-tls.md
@@ -101,9 +101,9 @@
`R_TLS_DTPOFF` is a dynamic relocation to the offset of `tls_var` within its module's `PT_TLS`
segment.
-`__tls_get_addr` looks up `TlsIndex::module`'s entry in the DTV and adds `TlsIndex::offset` to the
-module's TLS block. Before it can do this, it ensures that the module's TLS block is allocated. A
-simple approach is to allocate memory lazily:
+`__tls_get_addr` looks up `TlsIndex::module_id`'s entry in the DTV and adds `TlsIndex::offset` to
+the module's TLS block. Before it can do this, it ensures that the module's TLS block is allocated.
+A simple approach is to allocate memory lazily:
1. If the current thread's DTV generation count is less than the current global TLS generation, then
`__tls_get_addr` may reallocate the DTV or free blocks for unloaded modules.
diff --git a/linker/arch/arm64/tlsdesc_resolver.S b/linker/arch/arm64/tlsdesc_resolver.S
index 96eff8e..ad155e2 100644
--- a/linker/arch/arm64/tlsdesc_resolver.S
+++ b/linker/arch/arm64/tlsdesc_resolver.S
@@ -58,9 +58,9 @@
cmp x21, x22
b.lo .fallback
- ldr x21, [x0, #8] // TlsIndex::module
+ ldr x21, [x0, #8] // TlsIndex::module_id
ldr x22, [x0, #16] // TlsIndex::offset
- ldr x21, [x20, x21, lsl #3] // TlsDtv::modules[module]
+ ldr x21, [x20, x21, lsl #3] // TlsDtv::modules[module_id]
cbz x21, .fallback
add x0, x21, x22
sub x0, x0, x19