Revert "Revert "Add option to generate compressed backtrace info.""

This reverts commit 8546cc9aeb05e866e1fb6a9e4130d53ea330baa8.

Change-Id: I676fdf9af27fa3b16fa8921778ff8832ab8c437d
diff --git a/compiler/elf_writer_quick.cc b/compiler/elf_writer_quick.cc
index 7b1bdd7..6bf080a 100644
--- a/compiler/elf_writer_quick.cc
+++ b/compiler/elf_writer_quick.cc
@@ -137,9 +137,7 @@
 void ElfWriterQuick<ElfTypes>::SetBssSize(size_t bss_size) {
   auto* bss = builder_->GetBss();
   if (bss_size != 0u) {
-    bss->Start();
-    bss->SetSize(bss_size);
-    bss->End();
+    bss->WriteNoBitsSection(bss_size);
   }
 }
 
@@ -152,8 +150,13 @@
 void ElfWriterQuick<ElfTypes>::WriteDebugInfo(
     const ArrayRef<const dwarf::MethodDebugInfo>& method_infos) {
   if (compiler_options_->GetGenerateDebugInfo()) {
+    // Generate all the debug information we can.
     dwarf::WriteDebugInfo(builder_.get(), method_infos, kCFIFormat);
   }
+  if (compiler_options_->GetGenerateMiniDebugInfo()) {
+    // Generate only some information and compress it.
+    dwarf::WriteMiniDebugInfo(builder_.get(), method_infos);
+  }
 }
 
 template <typename ElfTypes>