aboutsummaryrefslogtreecommitdiff
path: root/elf/dl-reloc.c
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2021-05-17 09:59:14 +0200
committerFlorian Weimer <fweimer@redhat.com>2021-05-17 10:17:41 +0200
commit9dc21009a47300f62b2a1fd9fec2270a21bd7c3d (patch)
tree3346d2857b8616a5b979ad145851f37dda0c470d /elf/dl-reloc.c
parent0b3e92bdf3c11e8ca3271beb03ff16b87c23ed7f (diff)
downloadglibc-9dc21009a47300f62b2a1fd9fec2270a21bd7c3d.zip
glibc-9dc21009a47300f62b2a1fd9fec2270a21bd7c3d.tar.gz
glibc-9dc21009a47300f62b2a1fd9fec2270a21bd7c3d.tar.bz2
elf: Move static TLS size and alignment into _rtld_global_ro
This helps to clarify that the caching of these fields in libpthread (in __static_tls_size, __static_tls_align_m1) is unnecessary. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Diffstat (limited to 'elf/dl-reloc.c')
-rw-r--r--elf/dl-reloc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/elf/dl-reloc.c b/elf/dl-reloc.c
index bb9ca1a..e13a672 100644
--- a/elf/dl-reloc.c
+++ b/elf/dl-reloc.c
@@ -53,14 +53,14 @@ _dl_try_allocate_static_tls (struct link_map *map, bool optional)
/* If we've already used the variable with dynamic access, or if the
alignment requirements are too high, fail. */
if (map->l_tls_offset == FORCED_DYNAMIC_TLS_OFFSET
- || map->l_tls_align > GL(dl_tls_static_align))
+ || map->l_tls_align > GLRO (dl_tls_static_align))
{
fail:
return -1;
}
#if TLS_TCB_AT_TP
- size_t freebytes = GL(dl_tls_static_size) - GL(dl_tls_static_used);
+ size_t freebytes = GLRO (dl_tls_static_size) - GL(dl_tls_static_used);
if (freebytes < TLS_TCB_SIZE)
goto fail;
freebytes -= TLS_TCB_SIZE;
@@ -89,7 +89,7 @@ _dl_try_allocate_static_tls (struct link_map *map, bool optional)
+ map->l_tls_firstbyte_offset);
size_t used = offset + map->l_tls_blocksize;
- if (used > GL(dl_tls_static_size))
+ if (used > GLRO (dl_tls_static_size))
goto fail;
/* Account optional static TLS surplus usage. */