diff options
author | Vladimir Marko <vmarko@google.com> | 2014-08-01 19:04:18 +0100 |
---|---|---|
committer | Vladimir Marko <vmarko@google.com> | 2014-09-25 18:56:34 +0100 |
commit | f4da675bbc4615c5f854c81964cac9dd1153baea (patch) | |
tree | ea78bafc7ee543e11e7bd824ab40d5f5f3d82f9d /compiler/elf_builder.h | |
parent | f2476d524281c6d649f5deb6d1ccccc92380c1ed (diff) | |
download | art-f4da675bbc4615c5f854c81964cac9dd1153baea.zip art-f4da675bbc4615c5f854c81964cac9dd1153baea.tar.gz art-f4da675bbc4615c5f854c81964cac9dd1153baea.tar.bz2 |
Implement method calls using relative BL on ARM.
Store the linker patches with each CompiledMethod instead of
keeping them in CompilerDriver. Reorganize oat file creation
to apply the patches as we're writing the method code. Add
framework for platform-specific relative call patches in the
OatWriter. Implement relative call patches for ARM.
Change-Id: Ie2effb3d92b61ac8f356140eba09dc37d62290f8
Diffstat (limited to 'compiler/elf_builder.h')
-rw-r--r-- | compiler/elf_builder.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/compiler/elf_builder.h b/compiler/elf_builder.h index e535b6d..3be2478 100644 --- a/compiler/elf_builder.h +++ b/compiler/elf_builder.h @@ -412,6 +412,7 @@ class ElfFileMemoryPiece : public ElfFilePiece<Elf_Word> { class CodeOutput { public: + virtual void SetCodeOffset(size_t offset) = 0; virtual bool Write(OutputStream* out) = 0; virtual ~CodeOutput() {} }; @@ -423,6 +424,7 @@ class ElfFileRodataPiece : public ElfFilePiece<Elf_Word> { output_(output) {} bool DoActualWrite(File* elf_file) OVERRIDE { + output_->SetCodeOffset(this->offset_); std::unique_ptr<BufferedOutputStream> output_stream( new BufferedOutputStream(new FileOutputStream(elf_file))); if (!output_->Write(output_stream.get())) { |