diff options
author | Florian Weimer <fweimer@redhat.com> | 2021-05-10 10:31:41 +0200 |
---|---|---|
committer | Florian Weimer <fweimer@redhat.com> | 2021-05-10 10:31:41 +0200 |
commit | 2dd87703d4386f2776c5b5f375a494c91d7f9fe4 (patch) | |
tree | 94c59b0e923242d2ea1fe8992ea574d156fb7ded /elf/dl-support.c | |
parent | ee07b3a7222746fafc5d5cb2163c9609b81615ef (diff) | |
download | glibc-2dd87703d4386f2776c5b5f375a494c91d7f9fe4.tar.gz glibc-2dd87703d4386f2776c5b5f375a494c91d7f9fe4.tar.xz glibc-2dd87703d4386f2776c5b5f375a494c91d7f9fe4.zip |
nptl: Move changing of stack permissions into ld.so
All the stack lists are now in _rtld_global, so it is possible to change stack permissions directly from there, instead of calling into libpthread to do the change. Tested-by: Carlos O'Donell <carlos@redhat.com> Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Diffstat (limited to 'elf/dl-support.c')
-rw-r--r-- | elf/dl-support.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/elf/dl-support.c b/elf/dl-support.c index 580b0202ad..dfc9ab760e 100644 --- a/elf/dl-support.c +++ b/elf/dl-support.c @@ -183,12 +183,6 @@ uint64_t _dl_hwcap_mask __attribute__ ((nocommon)); * executable but this isn't true for all platforms. */ ElfW(Word) _dl_stack_flags = DEFAULT_STACK_PERMS; -/* If loading a shared object requires that we make the stack executable - when it was not, we do it by calling this function. - It returns an errno code or zero on success. */ -int (*_dl_make_stack_executable_hook) (void **) = _dl_make_stack_executable; - - #if THREAD_GSCOPE_IN_TCB list_t _dl_stack_used; list_t _dl_stack_user; @@ -197,6 +191,10 @@ size_t _dl_stack_cache_actsize; uintptr_t _dl_in_flight_stack; int _dl_stack_cache_lock; #else +/* If loading a shared object requires that we make the stack executable + when it was not, we do it by calling this function. + It returns an errno code or zero on success. */ +int (*_dl_make_stack_executable_hook) (void **) = _dl_make_stack_executable; int _dl_thread_gscope_count; void (*_dl_init_static_tls) (struct link_map *) = &_dl_nothread_init_static_tls; #endif |