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 /libexec/rtld-elf/Symbol.map | |
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 'libexec/rtld-elf/Symbol.map')
-rw-r--r-- | libexec/rtld-elf/Symbol.map | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/libexec/rtld-elf/Symbol.map b/libexec/rtld-elf/Symbol.map index 7a8273f..6a416a7 100644 --- a/libexec/rtld-elf/Symbol.map +++ b/libexec/rtld-elf/Symbol.map @@ -28,4 +28,5 @@ FBSDprivate_1.0 { _rtld_atfork_pre; _rtld_atfork_post; _rtld_addr_phdr; + _rtld_get_stack_prot; }; |