comp.lang.ada
 help / color / mirror / Atom feed
From: Robert A Duff <bobduff@shell01.TheWorld.com>
Subject: Re: Cross compilation problem
Date: Fri, 01 May 2009 13:41:02 -0400
Date: 2009-05-01T13:41:02-04:00	[thread overview]
Message-ID: <wccvdokbu1d.fsf@shell01.TheWorld.com> (raw)
In-Reply-To: 89fc88e1-b4db-4e43-b938-83628d3aea3a@u39g2000pru.googlegroups.com

Bryan <kamikaze.decoy@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



  parent reply	other threads:[~2009-05-01 17:41 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 [this message]
2009-05-01 17:50   ` Bryan
replies disabled

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