Fix elf writer to properly handle empty text sections

Previously, empty text sections caused an underflow in the oat file
size.

Added regression test.

Bug: 22858531
Change-Id: I9391a3666ab04e32472a9776d5217fe1743417a9
diff --git a/runtime/runtime.h b/runtime/runtime.h
index 7b1fdb2..a8ba19b 100644
--- a/runtime/runtime.h
+++ b/runtime/runtime.h
@@ -151,6 +151,11 @@
     return compiler_callbacks_;
   }
 
+  void SetCompilerCallbacks(CompilerCallbacks* callbacks) {
+    CHECK(callbacks != nullptr);
+    compiler_callbacks_ = callbacks;
+  }
+
   bool IsZygote() const {
     return is_zygote_;
   }