Re: Constify host-side offload data`

2015-10-22 Thread Ilya Verbin
On Thu, Oct 22, 2015 at 07:35:55 -0700, H.J. Lu wrote: > On Thu, Oct 22, 2015 at 7:11 AM, Ilya Verbin wrote: > > On Wed, Oct 21, 2015 at 10:44:56 -0700, H.J. Lu wrote: > >> On Wed, Oct 21, 2015 at 10:42 AM, Ilya Verbin wrote: > >> > On Wed, Oct 21, 2015 at 10:38:10 -0700, H.J. Lu wrote: > >> >> O

Re: Constify host-side offload data`

2015-10-22 Thread H.J. Lu
On Thu, Oct 22, 2015 at 7:11 AM, Ilya Verbin wrote: > On Wed, Oct 21, 2015 at 10:44:56 -0700, H.J. Lu wrote: >> On Wed, Oct 21, 2015 at 10:42 AM, Ilya Verbin wrote: >> > On Wed, Oct 21, 2015 at 10:38:10 -0700, H.J. Lu wrote: >> >> On Wed, Oct 21, 2015 at 10:33 AM, Ilya Verbin wrote: >> >> > H.J.

Re: Constify host-side offload data`

2015-10-22 Thread Ilya Verbin
On Wed, Oct 21, 2015 at 10:44:56 -0700, H.J. Lu wrote: > On Wed, Oct 21, 2015 at 10:42 AM, Ilya Verbin wrote: > > On Wed, Oct 21, 2015 at 10:38:10 -0700, H.J. Lu wrote: > >> On Wed, Oct 21, 2015 at 10:33 AM, Ilya Verbin wrote: > >> > H.J., > >> > Maybe linker should print some warning about joini

Re: Constify host-side offload data`

2015-10-21 Thread Nathan Sidwell
On 10/21/15 13:33, Ilya Verbin wrote: Hi! This happens because .gnu.offload_{funcs,vars} sections in crtoffload{begin,end}.o now doesn't have WRITE flag, but the same sections produced by omp_finish_file has it. When linker joins writable + nonwritable sections from several objects, it insert

Re: Constify host-side offload data`

2015-10-21 Thread H.J. Lu
On Wed, Oct 21, 2015 at 10:42 AM, Ilya Verbin wrote: > On Wed, Oct 21, 2015 at 10:38:10 -0700, H.J. Lu wrote: >> On Wed, Oct 21, 2015 at 10:33 AM, Ilya Verbin wrote: >> > H.J., >> > Maybe linker should print some warning about joining writable + nonwritable >> > sections? Here is a simple testca

Re: Constify host-side offload data`

2015-10-21 Thread Ilya Verbin
On Wed, Oct 21, 2015 at 10:38:10 -0700, H.J. Lu wrote: > On Wed, Oct 21, 2015 at 10:33 AM, Ilya Verbin wrote: > > H.J., > > Maybe linker should print some warning about joining writable + nonwritable > > sections? Here is a simple testcase: > > > > $ cat t1.s > > .section ".AAA", "a" > > .long 0x

Re: Constify host-side offload data`

2015-10-21 Thread H.J. Lu
On Wed, Oct 21, 2015 at 10:33 AM, Ilya Verbin wrote: > Hi! > > On Wed, Jul 15, 2015 at 20:56:50 -0400, Nathan Sidwell wrote: >> --- libgcc/offloadstuff.c (revision 225851) >> +++ libgcc/offloadstuff.c (working copy) >> ... >> -void *__offload_func_table[0] >> +const void *const __offload_f

Re: Constify host-side offload data`

2015-10-21 Thread Ilya Verbin
Hi! On Wed, Jul 15, 2015 at 20:56:50 -0400, Nathan Sidwell wrote: > --- libgcc/offloadstuff.c (revision 225851) > +++ libgcc/offloadstuff.c (working copy) > ... > -void *__offload_func_table[0] > +const void *const __offload_func_table[0] > ... > -void *__offload_var_table[0] > +const void

Re: Constify host-side offload data`

2015-07-17 Thread Jakub Jelinek
On Thu, Jul 16, 2015 at 08:20:53AM -0400, Nathan Sidwell wrote: > On 07/16/15 07:41, Ilya Verbin wrote: > >On Wed, Jul 15, 2015 at 20:56:50 -0400, Nathan Sidwell wrote: > >>Index: gcc/config/nvptx/mkoffload.c > >>=== > >>- fprintf (ou

Re: Constify host-side offload data`

2015-07-16 Thread Nathan Sidwell
On 07/16/15 07:41, Ilya Verbin wrote: On Wed, Jul 15, 2015 at 20:56:50 -0400, Nathan Sidwell wrote: Index: gcc/config/nvptx/mkoffload.c === - fprintf (out, "extern void *__OFFLOAD_TABLE__[];\n\n"); + fprintf (out, "extern const vo

Re: Constify host-side offload data`

2015-07-16 Thread Ilya Verbin
On Wed, Jul 15, 2015 at 20:56:50 -0400, Nathan Sidwell wrote: > Index: gcc/config/nvptx/mkoffload.c > === > - fprintf (out, "extern void *__OFFLOAD_TABLE__[];\n\n"); > + fprintf (out, "extern const void *conat __OFFLOAD_TABLE__[];\n\