Make libdexfile usable from libunwind

Can not depend on libutils as that causes build cycle.
Use just jni_headers instead.

Make the library available in vendor builds.

Fill one of the basic dex Open methods which does not
depend on the ART runtime.

Add some needed definitions to elf.h for libunwind.

Bug: 66919073
Test: m test-art-host-gtest
Change-Id: Ie3a42c127a19c1b986934723688e9f8903ba8fb9
diff --git a/runtime/elf.h b/runtime/elf.h
index 63b18c5..521d4a2 100644
--- a/runtime/elf.h
+++ b/runtime/elf.h
@@ -64,6 +64,9 @@
 constexpr char ELFMAG1 = ElfMagic[EI_MAG1];
 constexpr char ELFMAG2 = ElfMagic[EI_MAG2];
 constexpr char ELFMAG3 = ElfMagic[EI_MAG3];
+constexpr char ELFMAG[] = "\177ELF";
+constexpr int SELFMAG = 4;
+constexpr int NT_PRSTATUS = 1;
 // END android-added for <elf.h> compat
 
 struct Elf32_Ehdr {
@@ -1411,7 +1414,9 @@
 };
 
 // BEGIN android-added for <elf.h> compat
+static inline unsigned char ELF32_ST_BIND(unsigned char st_info) { return st_info >> 4; }
 static inline unsigned char ELF32_ST_TYPE(unsigned char st_info) { return st_info & 0x0f; }
+static inline unsigned char ELF64_ST_BIND(unsigned char st_info) { return st_info >> 4; }
 static inline unsigned char ELF64_ST_TYPE(unsigned char st_info) { return st_info & 0x0f; }
 // END android-added for <elf.h> compat