diff options
Diffstat (limited to 'src/compiler/dex/write_elf.cc')
-rw-r--r-- | src/compiler/dex/write_elf.cc | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/src/compiler/dex/write_elf.cc b/src/compiler/dex/write_elf.cc index acec531b6a..d9e45a9c19 100644 --- a/src/compiler/dex/write_elf.cc +++ b/src/compiler/dex/write_elf.cc @@ -14,9 +14,16 @@ * limitations under the License. */ -#include "elf_writer.h" +#include "elf_fixup.h" +#include "elf_stripper.h" #include "os.h" +#if defined(ART_USE_PORTABLE_COMPILER) +#include "elf_writer_mclinker.h" +#else +#include "elf_writer_quick.h" +#endif + namespace art { class CompilerDriver; class DexFile; @@ -29,10 +36,14 @@ extern "C" bool WriteElf(art::CompilerDriver& driver, std::vector<uint8_t>& oat_contents, art::File* file) SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) { - return art::ElfWriter::Create(file, oat_contents, dex_files, android_root, is_host, driver); +#if defined(ART_USE_PORTABLE_COMPILER) + return art::ElfWriterMclinker::Create(file, oat_contents, dex_files, android_root, is_host, driver); +#else + return art::ElfWriterQuick::Create(file, oat_contents, dex_files, android_root, is_host, driver); +#endif } extern "C" bool FixupElf(art::File* file, uintptr_t oat_data_begin) { - return art::ElfWriter::Fixup(file, oat_data_begin); + return art::ElfFixup::Fixup(file, oat_data_begin); } extern "C" void GetOatElfInformation(art::File* file, size_t& oat_loaded_size, @@ -40,5 +51,5 @@ extern "C" void GetOatElfInformation(art::File* file, art::ElfWriter::GetOatElfInformation(file, oat_loaded_size, oat_data_offset); } extern "C" bool StripElf(art::File* file) { - return art::ElfWriter::Strip(file); + return art::ElfStripper::Strip(file); } |