summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTommi Rantala <tt.rantala@gmail.com>2012-09-19 11:05:43 +0300
committerTommi Rantala <tt.rantala@gmail.com>2012-09-28 14:50:03 +0300
commitee8df2628891435ebb95eee04668d5bbd6995723 (patch)
tree434b11caa4fdc9921d6e1355a73a5db5189453a8
parenta9b5b10f23fe0f55e39fece22d5d4bfdf7f3bdfe (diff)
downloadlibunwind-ee8df2628891435ebb95eee04668d5bbd6995723.tar.gz
Constify `dwarf_to_unw_regnum_map'
-rw-r--r--include/dwarf_i.h2
-rw-r--r--src/ppc32/Gglobal.c2
-rw-r--r--src/ppc64/Gglobal.c2
-rw-r--r--src/x86/Gglobal.c2
-rw-r--r--src/x86_64/Gglobal.c2
5 files changed, 5 insertions, 5 deletions
diff --git a/include/dwarf_i.h b/include/dwarf_i.h
index 77f52fe9..0e728457 100644
--- a/include/dwarf_i.h
+++ b/include/dwarf_i.h
@@ -17,7 +17,7 @@
#ifndef dwarf_to_unw_regnum
# define dwarf_to_unw_regnum_map UNW_OBJ (dwarf_to_unw_regnum_map)
-extern uint8_t dwarf_to_unw_regnum_map[DWARF_REGNUM_MAP_LENGTH];
+extern const uint8_t dwarf_to_unw_regnum_map[DWARF_REGNUM_MAP_LENGTH];
/* REG is evaluated multiple times; it better be side-effects free! */
# define dwarf_to_unw_regnum(reg) \
(((reg) <= DWARF_REGNUM_MAP_LENGTH) ? dwarf_to_unw_regnum_map[reg] : 0)
diff --git a/src/ppc32/Gglobal.c b/src/ppc32/Gglobal.c
index 36566668..6af97727 100644
--- a/src/ppc32/Gglobal.c
+++ b/src/ppc32/Gglobal.c
@@ -33,7 +33,7 @@ HIDDEN int tdep_init_done;
/* The API register numbers are exactly the same as the .eh_frame
registers, for now at least. */
-HIDDEN uint8_t dwarf_to_unw_regnum_map[DWARF_REGNUM_MAP_LENGTH] =
+HIDDEN const uint8_t dwarf_to_unw_regnum_map[DWARF_REGNUM_MAP_LENGTH] =
{
[UNW_PPC32_R0]=UNW_PPC32_R0,
[UNW_PPC32_R1]=UNW_PPC32_R1,
diff --git a/src/ppc64/Gglobal.c b/src/ppc64/Gglobal.c
index c192f629..7c5dfc1b 100644
--- a/src/ppc64/Gglobal.c
+++ b/src/ppc64/Gglobal.c
@@ -33,7 +33,7 @@ HIDDEN int tdep_init_done;
/* The API register numbers are exactly the same as the .eh_frame
registers, for now at least. */
-HIDDEN uint8_t dwarf_to_unw_regnum_map[DWARF_REGNUM_MAP_LENGTH] =
+HIDDEN const uint8_t dwarf_to_unw_regnum_map[DWARF_REGNUM_MAP_LENGTH] =
{
[UNW_PPC64_R0]=UNW_PPC64_R0,
[UNW_PPC64_R1]=UNW_PPC64_R1,
diff --git a/src/x86/Gglobal.c b/src/x86/Gglobal.c
index d7f53263..24b388a4 100644
--- a/src/x86/Gglobal.c
+++ b/src/x86/Gglobal.c
@@ -31,7 +31,7 @@ HIDDEN int tdep_init_done;
/* See comments for svr4_dbx_register_map[] in gcc/config/i386/i386.c. */
-HIDDEN uint8_t dwarf_to_unw_regnum_map[19] =
+HIDDEN const uint8_t dwarf_to_unw_regnum_map[19] =
{
UNW_X86_EAX, UNW_X86_ECX, UNW_X86_EDX, UNW_X86_EBX,
UNW_X86_ESP, UNW_X86_EBP, UNW_X86_ESI, UNW_X86_EDI,
diff --git a/src/x86_64/Gglobal.c b/src/x86_64/Gglobal.c
index 7c66b6dd..37fe6b0b 100644
--- a/src/x86_64/Gglobal.c
+++ b/src/x86_64/Gglobal.c
@@ -34,7 +34,7 @@ HIDDEN int tdep_init_done;
/* See comments for svr4_dbx_register_map[] in gcc/config/i386/i386.c. */
-HIDDEN uint8_t dwarf_to_unw_regnum_map[DWARF_NUM_PRESERVED_REGS] =
+HIDDEN const uint8_t dwarf_to_unw_regnum_map[DWARF_NUM_PRESERVED_REGS] =
{
UNW_X86_64_RAX,
UNW_X86_64_RDX,