From 2dd87703d4386f2776c5b5f375a494c91d7f9fe4 Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Mon, 10 May 2021 10:31:41 +0200 Subject: 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 Reviewed-by: Carlos O'Donell --- elf/dl-load.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'elf/dl-load.c') diff --git a/elf/dl-load.c b/elf/dl-load.c index 2832ab3..918ec75 100644 --- a/elf/dl-load.c +++ b/elf/dl-load.c @@ -1368,7 +1368,11 @@ _dl_map_object_from_fd (const char *name, const char *origname, int fd, check_consistency (); #endif +#if PTHREAD_IN_LIBC + errval = _dl_make_stacks_executable (stack_endp); +#else errval = (*GL(dl_make_stack_executable_hook)) (stack_endp); +#endif if (errval) { errstring = N_("\ -- cgit v1.1