Simplify template parameters of Elf classes.

The ELF specification defines several types which differ between
32-bit ELF and 64-bit ELF.  We used to template all ELF-related
methods on all of those types which was very verbose.

This CL wraps all the types as typedefs in ElfTypes32 and ElfTypes64.
One of those wrappers is then used as the template parameter.

Change-Id: I65247c2c79d92a7c4799e988cf3e4a1b10eb4788
diff --git a/runtime/elf_file_impl.h b/runtime/elf_file_impl.h
index 383dc41..047849a 100644
--- a/runtime/elf_file_impl.h
+++ b/runtime/elf_file_impl.h
@@ -32,11 +32,22 @@
   struct JITCodeEntry;
 }
 
-template <typename Elf_Ehdr, typename Elf_Phdr, typename Elf_Shdr, typename Elf_Word,
-          typename Elf_Sword, typename Elf_Addr, typename Elf_Sym, typename Elf_Rel,
-          typename Elf_Rela, typename Elf_Dyn, typename Elf_Off>
+template <typename ElfTypes>
 class ElfFileImpl {
  public:
+  using Elf_Addr = typename ElfTypes::Addr;
+  using Elf_Off = typename ElfTypes::Off;
+  using Elf_Half = typename ElfTypes::Half;
+  using Elf_Word = typename ElfTypes::Word;
+  using Elf_Sword = typename ElfTypes::Sword;
+  using Elf_Ehdr = typename ElfTypes::Ehdr;
+  using Elf_Shdr = typename ElfTypes::Shdr;
+  using Elf_Sym = typename ElfTypes::Sym;
+  using Elf_Rel = typename ElfTypes::Rel;
+  using Elf_Rela = typename ElfTypes::Rela;
+  using Elf_Phdr = typename ElfTypes::Phdr;
+  using Elf_Dyn = typename ElfTypes::Dyn;
+
   static ElfFileImpl* Open(File* file, bool writable, bool program_header_only,
                            std::string* error_msg, uint8_t* requested_base = nullptr);
   static ElfFileImpl* Open(File* file, int mmap_prot, int mmap_flags, std::string* error_msg);
@@ -209,9 +220,7 @@
   // Support for GDB JIT
   uint8_t* jit_elf_image_;
   JITCodeEntry* jit_gdb_entry_;
-  std::unique_ptr<ElfFileImpl<Elf_Ehdr, Elf_Phdr, Elf_Shdr, Elf_Word,
-                  Elf_Sword, Elf_Addr, Elf_Sym, Elf_Rel,
-                  Elf_Rela, Elf_Dyn, Elf_Off>> gdb_file_mapping_;
+  std::unique_ptr<ElfFileImpl<ElfTypes>> gdb_file_mapping_;
   void GdbJITSupport();
 
   // Override the 'base' p_vaddr in the first LOAD segment with this value (if non-null).