Fixed gdb support and added some ElfFile functions

Fixed gdb support so that it would continue working even when debug
symbols or other sections are included in the elf file. Also made it
actually read parts of the DWARF information so it should work even if
there are minor changes to how and where DWARF information is written
out.

Added a dwarf.h file with the dwarf constants.

Added a FindSectionByName function, a FindDynamicSymbol function, and
the ability to specify the mmap protection and flags directly if we are
mapping in the whole file.

Modified elf_writer_quick.cc to use the dwarf constants from dwarf.h.

Change-Id: I09e15c425fab252b331a2e4719863552e8b6b137
diff --git a/dex2oat/dex2oat.cc b/dex2oat/dex2oat.cc
index bf04a54..280f6d0 100644
--- a/dex2oat/dex2oat.cc
+++ b/dex2oat/dex2oat.cc
@@ -875,6 +875,8 @@
       watch_dog_enabled = false;
     } else if (option == "--gen-gdb-info") {
       generate_gdb_information = true;
+      // Debug symbols are needed for gdb information.
+      include_debug_symbols = true;
     } else if (option == "--no-gen-gdb-info") {
       generate_gdb_information = false;
     } else if (option.starts_with("-j")) {