aboutsummaryrefslogtreecommitdiff
path: root/libgcc
diff options
context:
space:
mode:
authorNathan Sidwell <nathan@codesourcery.com>2015-07-17 17:12:01 +0000
committerNathan Sidwell <nathan@gcc.gnu.org>2015-07-17 17:12:01 +0000
commitebe4a560737e72aa508af4c0d9e1ac6e84a97655 (patch)
tree0620634b02bd3dbd3f65141af8fbb850d2590361 /libgcc
parent247577525613274ed246537f195eda285087d814 (diff)
downloadgcc-ebe4a560737e72aa508af4c0d9e1ac6e84a97655.zip
gcc-ebe4a560737e72aa508af4c0d9e1ac6e84a97655.tar.gz
gcc-ebe4a560737e72aa508af4c0d9e1ac6e84a97655.tar.bz2
mkoffload.c (process): Constify host data.
gcc/ * config/nvptx/mkoffload.c (process): Constify host data. * config/i386/intelmic-mkoffload.c (generate_target_descr_file): Constify host data. (generate_host_descr_file): Likewise. libgomp/ * target.c (struct_offload_image_descr): Constify host_table. (gomp_offload_image_to_device): Likewise. (GOMP_offload_register, GOMP_offload_unregister): Likewise. libgcc/ * offloadstuff.c: Constify host data. From-SVN: r225943
Diffstat (limited to 'libgcc')
-rw-r--r--libgcc/ChangeLog4
-rw-r--r--libgcc/offloadstuff.c14
2 files changed, 11 insertions, 7 deletions
diff --git a/libgcc/ChangeLog b/libgcc/ChangeLog
index ac1fbb7..4bd9f1f 100644
--- a/libgcc/ChangeLog
+++ b/libgcc/ChangeLog
@@ -1,3 +1,7 @@
+2015-07-17 Nathan Sidwell <nathan@codesourcery.com>
+
+ * offloadstuff.c: Constify host data.
+
2015-07-17 Jan Beulich <jbeulich@suse.com>
* config/t-softfp: Split up "else ifneq".
diff --git a/libgcc/offloadstuff.c b/libgcc/offloadstuff.c
index 0d6ef23..57e0973 100644
--- a/libgcc/offloadstuff.c
+++ b/libgcc/offloadstuff.c
@@ -46,10 +46,10 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
#ifdef CRT_BEGIN
#if defined(HAVE_GAS_HIDDEN) && defined(ENABLE_OFFLOADING)
-void *__offload_func_table[0]
+const void *const __offload_func_table[0]
__attribute__ ((__used__, visibility ("hidden"),
section (OFFLOAD_FUNC_TABLE_SECTION_NAME))) = { };
-void *__offload_var_table[0]
+const void *const __offload_var_table[0]
__attribute__ ((__used__, visibility ("hidden"),
section (OFFLOAD_VAR_TABLE_SECTION_NAME))) = { };
#endif
@@ -57,17 +57,17 @@ void *__offload_var_table[0]
#elif defined CRT_END
#if defined(HAVE_GAS_HIDDEN) && defined(ENABLE_OFFLOADING)
-void *__offload_funcs_end[0]
+const void *const __offload_funcs_end[0]
__attribute__ ((__used__, visibility ("hidden"),
section (OFFLOAD_FUNC_TABLE_SECTION_NAME))) = { };
-void *__offload_vars_end[0]
+const void *const __offload_vars_end[0]
__attribute__ ((__used__, visibility ("hidden"),
section (OFFLOAD_VAR_TABLE_SECTION_NAME))) = { };
-extern void *__offload_func_table[];
-extern void *__offload_var_table[];
+extern const void *const __offload_func_table[];
+extern const void *const __offload_var_table[];
-void *__OFFLOAD_TABLE__[]
+const void *const __OFFLOAD_TABLE__[]
__attribute__ ((__visibility__ ("hidden"))) =
{
&__offload_func_table, &__offload_funcs_end,