Fix some global constructors and destructors
Bug: 17994073
Change-Id: Ib4da5ac25812460b3dcee26024d1a3415a21257b
diff --git a/runtime/elf.h b/runtime/elf.h
index 4514bb2..d1efc92 100644
--- a/runtime/elf.h
+++ b/runtime/elf.h
@@ -42,7 +42,7 @@
typedef int64_t Elf64_Sxword;
// Object file magic string.
-static const char ElfMagic[] = { 0x7f, 'E', 'L', 'F', '\0' };
+static constexpr char ElfMagic[] = { 0x7f, 'E', 'L', 'F', '\0' };
// e_ident size and indices.
enum {
@@ -60,10 +60,10 @@
};
// BEGIN android-added for <elf.h> compat
-const char ELFMAG0 = ElfMagic[EI_MAG0];
-const char ELFMAG1 = ElfMagic[EI_MAG1];
-const char ELFMAG2 = ElfMagic[EI_MAG2];
-const char ELFMAG3 = ElfMagic[EI_MAG3];
+constexpr char ELFMAG0 = ElfMagic[EI_MAG0];
+constexpr char ELFMAG1 = ElfMagic[EI_MAG1];
+constexpr char ELFMAG2 = ElfMagic[EI_MAG2];
+constexpr char ELFMAG3 = ElfMagic[EI_MAG3];
// END android-added for <elf.h> compat
struct Elf32_Ehdr {