mirror of
https://sourceware.org/git/glibc.git
synced 2025-08-05 19:35:52 +03:00
(_dl_make_stack_executable): Disable for static linking.
This commit is contained in:
@@ -35,6 +35,7 @@ _dl_make_stack_executable (void **stack_endp)
|
|||||||
return EPERM;
|
return EPERM;
|
||||||
*stack_endp = NULL;
|
*stack_endp = NULL;
|
||||||
|
|
||||||
|
#ifdef IS_IN_rtld
|
||||||
if (__mprotect ((void *)_dl_hurd_data->stack_base, _dl_hurd_data->stack_size,
|
if (__mprotect ((void *)_dl_hurd_data->stack_base, _dl_hurd_data->stack_size,
|
||||||
PROT_READ|PROT_WRITE|PROT_EXEC) != 0)
|
PROT_READ|PROT_WRITE|PROT_EXEC) != 0)
|
||||||
return errno;
|
return errno;
|
||||||
@@ -43,5 +44,9 @@ _dl_make_stack_executable (void **stack_endp)
|
|||||||
GL(dl_stack_flags) |= PF_X;
|
GL(dl_stack_flags) |= PF_X;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
#else
|
||||||
|
/* We don't bother to implement this for static linking. */
|
||||||
|
return ENOSYS;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
rtld_hidden_def (_dl_make_stack_executable)
|
rtld_hidden_def (_dl_make_stack_executable)
|
||||||
|
Reference in New Issue
Block a user