aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/riscv
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2025-01-02 13:45:27 +0100
committerFlorian Weimer <fweimer@redhat.com>2025-01-02 13:45:27 +0100
commitcc74583f23657515b1d09d0765032422af71de52 (patch)
tree3fc3b63128ff27d179d33579ef3278dbdbd8a6bc /sysdeps/riscv
parent30e32da6aafcef5a5d5a1c91e233636db6493fc8 (diff)
downloadglibc-cc74583f23657515b1d09d0765032422af71de52.zip
glibc-cc74583f23657515b1d09d0765032422af71de52.tar.gz
glibc-cc74583f23657515b1d09d0765032422af71de52.tar.bz2
elf: Remove the remaining uses of GET_ADDR_OFFSET
Expand the macro where it is used in static definitions of __tls_get_addr. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Diffstat (limited to 'sysdeps/riscv')
-rw-r--r--sysdeps/riscv/dl-tls.h1
-rw-r--r--sysdeps/riscv/libc-tls.c2
2 files changed, 1 insertions, 2 deletions
diff --git a/sysdeps/riscv/dl-tls.h b/sysdeps/riscv/dl-tls.h
index 302fd02..467c0b6 100644
--- a/sysdeps/riscv/dl-tls.h
+++ b/sysdeps/riscv/dl-tls.h
@@ -41,7 +41,6 @@ typedef struct
extern void *__tls_get_addr (tls_index *ti);
-#define GET_ADDR_OFFSET (ti->ti_offset + TLS_DTV_OFFSET)
#define __TLS_GET_ADDR(__ti) (__tls_get_addr (__ti) - TLS_DTV_OFFSET)
/* Value used for dtv entries for which the allocation is delayed. */
diff --git a/sysdeps/riscv/libc-tls.c b/sysdeps/riscv/libc-tls.c
index 6110d9e..a08555f 100644
--- a/sysdeps/riscv/libc-tls.c
+++ b/sysdeps/riscv/libc-tls.c
@@ -28,5 +28,5 @@ void *
__tls_get_addr (tls_index *ti)
{
dtv_t *dtv = THREAD_DTV ();
- return (char *) dtv[1].pointer.val + GET_ADDR_OFFSET;
+ return (char *) dtv[1].pointer.val + ti->ti_offset + TLS_DTV_OFFSET;
}