comp.lang.ada
 help / color / mirror / Atom feed
From: Bryan <kamikaze.decoy@gmail.com>
Subject: Re: Cross compilation problem
Date: Fri, 1 May 2009 10:50:49 -0700 (PDT)
Date: 2009-05-01T10:50:49-07:00	[thread overview]
Message-ID: <a13a45cf-cb7f-4d23-b56a-56384ee41916@f19g2000yqh.googlegroups.com> (raw)
In-Reply-To: wccvdokbu1d.fsf@shell01.TheWorld.com

On May 1, 1:41 pm, Robert A Duff <bobd...@shell01.TheWorld.com> wrote:
> Bryan <kamikaze.de...@gmail.com> writes:
> > I have been trying to create a gcc cross compiler from cygwin to ARM
> > for a project at work and managed to get it somewhat functional but I
> > have run into a problem that is preventing all but my most basic tests
> > from compiling. I am receiving an error that states I am violating the
> > No_Implicit_Dynamic_Code restriction and I have tracked this down to
> > the compiler generating dynamic code on the stack for certain
> > features.
>
> In older versions of GNAT, trampolines are generated whenever you do
> 'Access of nested subprograms, or use related features (e.g. nested task
> bodies, nested type extensions, which do such a 'Access internally).
> These trampolines are, as you say, code generated at run time on the
> stack, and they violate the No_Implicit_Dynamic_Code restriction.
>
> In later versions of GNAT, trampolines are generated only for
> fairly rare cases.  I don't know whether this fix exists in
> whatever public version you are using.  If it does not yet,
> it will eventually.
>
> You might want to post an example that causes trouble.
>
> >... Does anyone know how I can fix this issue in the compiler?
>
> You could remove the Restrictions pragma from your code.
>
> If you run code with trampolines, you need to turn off Data
> Execution Protection (DEP).  That's what windows calls it;
> there's a similar feature in Linux.  If you have DEP turned
> on, then when you call a trampoline, your program will fail
> in some mysterious way.
>
> > Or is this occurring because there is no official ARM Linux port for
> > the compiler?
>
> I don't know.
>
> - Bob

The restrictions pragma is not in code that I control but rather in
the runtime.I suspect that this pragma is only being applied because
of the lack of an official ARM target it is reverting to the default
system.ads file which specifies this pragma although I have no firm
evidence to back this up.



      reply	other threads:[~2009-05-01 17:50 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-30 14:37 Cross compilation problem Bryan
2009-05-01 14:39 ` anhvofrcaus
2009-05-01 14:43   ` anhvofrcaus
2009-05-01 17:41 ` Robert A Duff
2009-05-01 17:50   ` Bryan [this message]
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox