From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,a7ccacf6df5b27fa X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news2.google.com!news.glorb.com!solaris.cc.vt.edu!news.vt.edu!newsfeed-00.mathworks.com!nntp.TheWorld.com!not-for-mail From: Robert A Duff Newsgroups: comp.lang.ada Subject: Re: Cross compilation problem Date: Fri, 01 May 2009 13:41:02 -0400 Organization: The World Public Access UNIX, Brookline, MA Message-ID: References: <89fc88e1-b4db-4e43-b938-83628d3aea3a@u39g2000pru.googlegroups.com> NNTP-Posting-Host: shell01.theworld.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: pcls6.std.com 1241199665 14103 192.74.137.71 (1 May 2009 17:41:05 GMT) X-Complaints-To: abuse@TheWorld.com NNTP-Posting-Date: Fri, 1 May 2009 17:41:05 +0000 (UTC) User-Agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/21.3 (irix) Cancel-Lock: sha1:yR9NsVP0EglvCeQyzMWjgz5Niig= Xref: g2news2.google.com comp.lang.ada:5645 Date: 2009-05-01T13:41:02-04:00 List-Id: Bryan 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