Elf interface for new unwinder.

This cl includes the code to read arm unwind information from a shared
library.

Bug: 23762183

Test: Passes all unit tests. I can dump the arm unwind information
Test: for an arm shared library.
Change-Id: I43501ea2eab843b81de8bd5128401dd1971af8d3
diff --git a/libunwindstack/Android.bp b/libunwindstack/Android.bp
index 9bb1304..ece623b 100644
--- a/libunwindstack/Android.bp
+++ b/libunwindstack/Android.bp
@@ -30,6 +30,15 @@
             enabled: false,
         },
     },
+
+    multilib: {
+        lib32: {
+            suffix: "32",
+        },
+        lib64: {
+            suffix: "64",
+        },
+    },
 }
 
 cc_defaults {
@@ -38,8 +47,12 @@
 
     srcs: [
         "ArmExidx.cpp",
-        "Memory.cpp",
+        "Elf.cpp",
+        "ElfInterface.cpp",
+        "ElfInterfaceArm.cpp",
         "Log.cpp",
+        "Regs.cpp",
+        "Memory.cpp",
     ],
 
     shared_libs: [
@@ -74,6 +87,9 @@
     srcs: [
         "tests/ArmExidxDecodeTest.cpp",
         "tests/ArmExidxExtractTest.cpp",
+        "tests/ElfInterfaceArmTest.cpp",
+        "tests/ElfInterfaceTest.cpp",
+        "tests/ElfTest.cpp",
         "tests/LogFake.cpp",
         "tests/MemoryFake.cpp",
         "tests/MemoryFileTest.cpp",
@@ -93,15 +109,6 @@
         "liblog",
     ],
 
-    multilib: {
-        lib32: {
-            suffix: "32",
-        },
-        lib64: {
-            suffix: "64",
-        },
-    },
-
     target: {
         linux: {
             host_ldlibs: [
@@ -130,3 +137,31 @@
         "libunwindstack_debug",
     ],
 }
+
+//-------------------------------------------------------------------------
+// Utility Executables
+//-------------------------------------------------------------------------
+cc_defaults {
+    name: "libunwindstack_executables",
+    defaults: ["libunwindstack_flags"],
+
+    shared_libs: [
+        "libunwindstack",
+        "libbase",
+    ],
+
+    static_libs: [
+        "liblog",
+    ],
+
+    compile_multilib: "both",
+}
+
+cc_binary {
+    name: "unwind_info",
+    defaults: ["libunwindstack_executables"],
+
+    srcs: [
+        "unwind_info.cpp",
+    ],
+}