diff options
author | Andreas Gampe <agampe@google.com> | 2015-04-07 18:34:42 -0700 |
---|---|---|
committer | Andreas Gampe <agampe@google.com> | 2015-04-17 17:51:27 -0700 |
commit | fa8429b967fe2260ece572337534c9dda6c50d8a (patch) | |
tree | b21da4365bdb203029a30e201ff506bd3b4b7745 /runtime/oat_file.h | |
parent | e7bee3b7d307508243f4a00b5cf8a8867fcaaff5 (diff) | |
download | art-fa8429b967fe2260ece572337534c9dda6c50d8a.tar.gz art-fa8429b967fe2260ece572337534c9dda6c50d8a.tar.bz2 art-fa8429b967fe2260ece572337534c9dda6c50d8a.zip |
ART: Re-add dlopen
Re-add an oat-file path that uses dlopen to load oat files. This
code-path will be necessary to support libunwind unwinding through
properly CFI-annotated oat files, as libunwind consults the linker
about loaded ELF files.
We avoid the original dlopen issue, namely that the semantics of
dlopen disallow loading the same soname twice, by using an extension
of bionic that supersedes the specified behavior.
Change-Id: I4a7e3cb00d1ea156dad84f76826def2a5967c9ca
Diffstat (limited to 'runtime/oat_file.h')
-rw-r--r-- | runtime/oat_file.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/runtime/oat_file.h b/runtime/oat_file.h index a5d5ae8a7b..42c60dca9c 100644 --- a/runtime/oat_file.h +++ b/runtime/oat_file.h @@ -263,6 +263,12 @@ class OatFile FINAL { private: static void CheckLocation(const std::string& location); + static OatFile* OpenDlopen(const std::string& elf_filename, + const std::string& location, + uint8_t* requested_base, + const char* abs_dex_location, + std::string* error_msg); + static OatFile* OpenElfFile(File* file, const std::string& location, uint8_t* requested_base, @@ -273,6 +279,8 @@ class OatFile FINAL { std::string* error_msg); explicit OatFile(const std::string& filename, bool executable); + bool Dlopen(const std::string& elf_filename, uint8_t* requested_base, + const char* abs_dex_location, std::string* error_msg); bool ElfFileOpen(File* file, uint8_t* requested_base, uint8_t* oat_file_begin, // Override where the file is loaded to if not null bool writable, bool executable, |