From 1c846f80138289b996555f2a4fb571d9d898be40 Mon Sep 17 00:00:00 2001 From: Anhad Singh Date: Sat, 30 Nov 2024 00:22:51 +1100 Subject: [PATCH] fix comment x86 and x86_64 are below TP and others are above TP Signed-off-by: Anhad Singh --- src/ld_so/linker.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ld_so/linker.rs b/src/ld_so/linker.rs index ecfc1f0172..16e2711a1c 100644 --- a/src/ld_so/linker.rs +++ b/src/ld_so/linker.rs @@ -180,11 +180,11 @@ impl Linker { for obj in new_objects.iter() { if cfg!(any(target_arch = "x86", target_arch = "x86_64")) { - // Above the TP + // Below the TP tcb.dtv_mut().unwrap()[obj.tls_module_id - 1] = tcb_ptr.cast::().sub(obj.tls_offset); } else { - // Below the TP + // Above the TP tcb.dtv_mut().unwrap()[obj.tls_module_id - 1] = tcb_ptr.add(1).cast::().add(obj.tls_offset); }