diff options
author | Florian Weimer <fweimer@redhat.com> | 2020-11-16 19:33:30 +0100 |
---|---|---|
committer | Florian Weimer <fweimer@redhat.com> | 2020-11-16 19:33:30 +0100 |
commit | 1daccf403b1bd86370eb94edca794dc106d02039 (patch) | |
tree | e54bc8ee71eb92b7114df79e2f378a477c470029 /nptl_db/td_init.c | |
parent | aac0f62c47beee5b546bacc330acc2dd21cda0dc (diff) | |
download | glibc-1daccf403b1bd86370eb94edca794dc106d02039.zip glibc-1daccf403b1bd86370eb94edca794dc106d02039.tar.gz glibc-1daccf403b1bd86370eb94edca794dc106d02039.tar.bz2 |
nptl: Move stack list variables into _rtld_global
Now __thread_gscope_wait (the function behind THREAD_GSCOPE_WAIT,
formerly __wait_lookup_done) can be implemented directly in ld.so,
eliminating the unprotected GL (dl_wait_lookup_done) function
pointer.
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Diffstat (limited to 'nptl_db/td_init.c')
-rw-r--r-- | nptl_db/td_init.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/nptl_db/td_init.c b/nptl_db/td_init.c index 86773dc..79a1f90 100644 --- a/nptl_db/td_init.c +++ b/nptl_db/td_init.c @@ -29,3 +29,17 @@ td_init (void) LOG ("td_init"); return TD_OK; } + +bool +__td_ta_rtld_global (td_thragent_t *ta) +{ + if (ta->ta_addr__rtld_global == 0 + && td_mod_lookup (ta->ph, LD_SO, SYM__rtld_global, + &ta->ta_addr__rtld_global) != PS_OK) + { + ta->ta_addr__rtld_global = (void*)-1; + return false; + } + else + return ta->ta_addr__rtld_global != (void*)-1; +} |