diff options
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())) { |