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: 103376,50c7e391f0749c94 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news3.google.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsfeed.vmunix.org!peer-uk.news.demon.net!kibo.news.demon.net!news.demon.co.uk!demon!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: Unsupported .stab relocation error / mlongcall issue Date: Tue, 04 Oct 2005 05:13:59 +0100 Organization: Pushface Message-ID: References: <1128335620.226219.159160@f14g2000cwb.googlegroups.com> NNTP-Posting-Host: pogner.demon.co.uk Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: news.demon.co.uk 1128399241 8386 62.49.19.209 (4 Oct 2005 04:14:01 GMT) X-Complaints-To: abuse@demon.net NNTP-Posting-Date: Tue, 4 Oct 2005 04:14:01 +0000 (UTC) Cancel-Lock: sha1:8wImHS/15XzjTEJ0Ybft3eyCftg= User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (darwin) Xref: g2news1.google.com comp.lang.ada:5366 Date: 2005-10-04T05:13:59+01:00 List-Id: "Fabien" writes: > We are developping an Ada95 application using the GNAT 5.01a compiler > for PowerPC, running on a Motorola 5100 card, with VxWorks 5.5.1. > The application is rather big therefore we compile using the -mlongcall > option (no other options). We are in a similar position. Personally I would consider upgrading; 5.01 is early technology. No experience of 5.03a1 yet, if to 5.02a1 you should stick to -O1 for this target, not -O2 (see the Known Problems on the AdaCore site). > We observe that the complete system has an unstable behaviour: it gets > stack. We get some references to "Unsupported .stab relocation" error. 'gets stack'??? don't understand. You do have to be careful with task (and main program!) stack sizes, there's a VxWorks command checkStack (maybe stackCheck) that may be useful. There is a GCC option -fstack-check (and some interactions with the GNAT options for variable initialization, at any rate up to 5.02a1 AFAICR). Not recommended (by me) if you're writing code to be called back from VxWorks tasks. > We didn't find any piece of code in our application that may overwrite > the O.S. memory (we do dynamic memory allocation only at startup time), > that may have uninitialized variables... > The same application compiled for Windows 2000 seems to behave > properly. We had problems where allocated store was initialized to 0 under Windows but left random on VxWorks. There are GNAT options to initialize variables to invalid values (-gnatVx, I think), but they have proved a bit flakey for us (I _think_ this was 5.02a1), so I made a storage pool that initializes with 16#deadbeef# -- if you are interested see ColdFrame.{Bounded,Unbounded}.Storage_Pools in http://coldframe.sourceforge.net . > Is there some known issues regarding the compiler and long call jumps > under VxWorks? Not that I know of. > Do we need to recompile the Ada Libraries with the -mlongcall option? > If yes, how? I think they already are. If you look in the library .ali files you should see the compilation options used near the top. If you need to recompile the libraries, start with .../adalib/Makefile.adalib (but I think you will have to do some work on it for 5.01!) > Does anyone have any idea on what could possibly raise an "Unsupported > .stab relocation error"? New to me! As someone else has said, you ought to have an AdaCore support contract for that compiler. Advice from us is all very well, but you will get an authoritative answer from them!