about summary refs log tree commit diff
path: root/elf/rtld.c
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2021-05-10 10:31:41 +0200
committerFlorian Weimer <fweimer@redhat.com>2021-05-10 10:31:41 +0200
commit2dd87703d4386f2776c5b5f375a494c91d7f9fe4 (patch)
tree94c59b0e923242d2ea1fe8992ea574d156fb7ded /elf/rtld.c
parentee07b3a7222746fafc5d5cb2163c9609b81615ef (diff)
downloadglibc-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/rtld.c')
-rw-r--r--elf/rtld.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/elf/rtld.c b/elf/rtld.c
index 1255d5cc7d..fbbd60b446 100644
--- a/elf/rtld.c
+++ b/elf/rtld.c
@@ -1125,9 +1125,11 @@ dl_main (const ElfW(Phdr) *phdr,
 
   __tls_pre_init_tp ();
 
+#if !PTHREAD_IN_LIBC
   /* The explicit initialization here is cheaper than processing the reloc
      in the _rtld_local definition's initializer.  */
   GL(dl_make_stack_executable_hook) = &_dl_make_stack_executable;
+#endif
 
   /* Process the environment variable which control the behaviour.  */
   process_envvars (&state);