summaryrefslogtreecommitdiffstats
path: root/compiler/oat_writer.h
diff options
context:
space:
mode:
authorDavid Srbecky <dsrbecky@google.com>2015-04-22 19:40:27 +0100
committerDavid Srbecky <dsrbecky@google.com>2015-04-30 12:29:29 +0100
commitbc90fd09e09a845ae6ea0d84ad67560575a94142 (patch)
tree400ccfd60a231ce9bf03fcbad025d724da63a48e /compiler/oat_writer.h
parent0c5bbc11a6af7b4f83b3929bc99de690635095c0 (diff)
downloadandroid_art-bc90fd09e09a845ae6ea0d84ad67560575a94142.tar.gz
android_art-bc90fd09e09a845ae6ea0d84ad67560575a94142.tar.bz2
android_art-bc90fd09e09a845ae6ea0d84ad67560575a94142.zip
Major refactoring of ElfBuilder.
Simplify ElfBuilder by removing duplicated or redundant code. Many of the repeated code patterns were replaced by just looping over the list of all sections. Methods Init() and Write() have been merged into one. The split between those was rather arbitrary, but it was there for a reason. It allowed creation of raw sections between the calls which may have depended on layout decisions done in Init(), but not in Write() (e.g. knowing of offset of .text). This has been replaced by more generic solution. All sections are asked about their size first and complete file layout is calculated. Then the sections are asked to write their content (potentially using the layout information). This should be pure refactoring CL - the compiler should produce bit for bit identical output as before. Change-Id: I281d13d469801bd8288b36b360d200d98a3e92d7
Diffstat (limited to 'compiler/oat_writer.h')
-rw-r--r--compiler/oat_writer.h7
1 files changed, 2 insertions, 5 deletions
diff --git a/compiler/oat_writer.h b/compiler/oat_writer.h
index 8c79b44153..6f1b4ec15a 100644
--- a/compiler/oat_writer.h
+++ b/compiler/oat_writer.h
@@ -118,11 +118,8 @@ class OatWriter {
return it.first->second.get();
}
- void SetOatDataOffset(size_t oat_data_offset) {
- oat_data_offset_ = oat_data_offset;
- }
-
- bool Write(OutputStream* out);
+ bool WriteRodata(OutputStream* out);
+ bool WriteCode(OutputStream* out);
~OatWriter();