diff options
author | kib <kib@FreeBSD.org> | 2011-01-08 17:11:49 +0000 |
---|---|---|
committer | kib <kib@FreeBSD.org> | 2011-01-08 17:11:49 +0000 |
commit | 5cec74bed917b7e7fe4e854d8ee69bbc3a117817 (patch) | |
tree | 0882ce7d12d36adab2adfd0186d9396cb4ab972f /lib/libc/gen/elf_utils.c | |
parent | 90de4ffc1a4a4d4d4f9f496f70a225b61a6acd34 (diff) | |
download | FreeBSD-src-5cec74bed917b7e7fe4e854d8ee69bbc3a117817.zip FreeBSD-src-5cec74bed917b7e7fe4e854d8ee69bbc3a117817.tar.gz |
In rtld, read the initial stack access mode from AT_STACKPROT as set
by kernel, and parse PT_GNU_STACK phdr from linked and loaded dsos.
If the loaded dso requires executable stack, as specified by PF_X bit
of p_flags of PT_GNU_STACK phdr, but current stack protection does not
permit execution, the __pthread_map_stacks_exec symbol is looked up
and called. It should be implemented in libc or threading library and
change the protection mode of all thread stacks to be executable.
Provide a private interface _rtld_get_stack_prot() to export the stack
access mode as calculated by rtld.
Reviewed by: kan
Diffstat (limited to 'lib/libc/gen/elf_utils.c')
0 files changed, 0 insertions, 0 deletions