diff options
author | Torne (Richard Coles) <torne@google.com> | 2014-02-27 13:18:00 +0000 |
---|---|---|
committer | Torne (Richard Coles) <torne@google.com> | 2014-04-17 14:30:46 +0100 |
commit | 183ad9df536ab04ef35a397a1f4724e4e401d11f (patch) | |
tree | 65c76a120390c1350ff1d38b725b54cabd91c06b /linker/linker_phdr.h | |
parent | 12bbb9164578b6512b8b07a3fb093858244b7c7b (diff) | |
download | android_bionic-183ad9df536ab04ef35a397a1f4724e4e401d11f.tar.gz android_bionic-183ad9df536ab04ef35a397a1f4724e4e401d11f.tar.bz2 android_bionic-183ad9df536ab04ef35a397a1f4724e4e401d11f.zip |
Allow sharing the RELRO section via a file.
Add flags and a file descriptor to android_dlopen_ext() to allow writing
the RELRO section of the loaded library to a file after relocation
processing, and to allow mapping identical pages from the file over the
top of relocated memory in another process. Explicitly comparing the
pages is required in case a page contains a reference to a symbol
defined in another library loaded at a random base address.
Bug: 13005501
Change-Id: Ibb5b2d384edfaa5acf3e97a5f8b6115c10497a1e
Diffstat (limited to 'linker/linker_phdr.h')
-rw-r--r-- | linker/linker_phdr.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/linker/linker_phdr.h b/linker/linker_phdr.h index 430c6ecb8..611f1a7cb 100644 --- a/linker/linker_phdr.h +++ b/linker/linker_phdr.h @@ -89,6 +89,11 @@ int phdr_table_unprotect_segments(const ElfW(Phdr)* phdr_table, size_t phdr_coun int phdr_table_protect_gnu_relro(const ElfW(Phdr)* phdr_table, size_t phdr_count, ElfW(Addr) load_bias); +int phdr_table_serialize_gnu_relro(const ElfW(Phdr)* phdr_table, size_t phdr_count, ElfW(Addr) load_bias, + int fd); + +int phdr_table_map_gnu_relro(const ElfW(Phdr)* phdr_table, size_t phdr_count, ElfW(Addr) load_bias, + int fd); #if defined(__arm__) int phdr_table_get_arm_exidx(const ElfW(Phdr)* phdr_table, size_t phdr_count, ElfW(Addr) load_bias, |