Create libelffile library for ELF file manipulation.

Move some of our tooling to library to make it reusable.

Remove MIPS support from the ELF builder.  This is slightly
easier than making it independent of the runtime.

Bug: 110133331
Test: test.py -b --host
Change-Id: I93343808d0e27ee8e1117e713a2503e8179fc245
diff --git a/compiler/debug/elf_debug_info_writer.h b/compiler/debug/elf_debug_info_writer.h
index 05a4a3e..8eead4e 100644
--- a/compiler/debug/elf_debug_info_writer.h
+++ b/compiler/debug/elf_debug_info_writer.h
@@ -22,17 +22,17 @@
 #include <vector>
 
 #include "art_field-inl.h"
-#include "debug/dwarf/debug_abbrev_writer.h"
-#include "debug/dwarf/debug_info_entry_writer.h"
 #include "debug/elf_compilation_unit.h"
 #include "debug/elf_debug_loc_writer.h"
 #include "debug/method_debug_info.h"
 #include "dex/code_item_accessors-inl.h"
 #include "dex/dex_file-inl.h"
 #include "dex/dex_file.h"
+#include "dwarf/debug_abbrev_writer.h"
+#include "dwarf/debug_info_entry_writer.h"
+#include "elf/elf_builder.h"
 #include "heap_poisoning.h"
 #include "linear_alloc.h"
-#include "linker/elf_builder.h"
 #include "mirror/array.h"
 #include "mirror/class-inl.h"
 #include "mirror/class.h"
@@ -59,7 +59,7 @@
   using Elf_Addr = typename ElfTypes::Addr;
 
  public:
-  explicit ElfDebugInfoWriter(linker::ElfBuilder<ElfTypes>* builder)
+  explicit ElfDebugInfoWriter(ElfBuilder<ElfTypes>* builder)
       : builder_(builder),
         debug_abbrev_(&debug_abbrev_buffer_) {
   }
@@ -80,7 +80,7 @@
   }
 
  private:
-  linker::ElfBuilder<ElfTypes>* builder_;
+  ElfBuilder<ElfTypes>* builder_;
   std::vector<uint8_t> debug_abbrev_buffer_;
   dwarf::DebugAbbrevWriter<> debug_abbrev_;
   std::vector<uint8_t> debug_loc_;