comp.lang.ada
 help / color / mirror / Atom feed
From: Simon Wright <simon@pushface.org>
Subject: Re: Unsupported .stab relocation error / mlongcall issue
Date: Tue, 04 Oct 2005 05:13:59 +0100
Date: 2005-10-04T05:13:59+01:00	[thread overview]
Message-ID: <m2zmppex6g.fsf@grendel.local> (raw)
In-Reply-To: 1128335620.226219.159160@f14g2000cwb.googlegroups.com

"Fabien" <fabien_milcent@yahoo.fr> 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!



      parent reply	other threads:[~2005-10-04  4:13 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-10-03 10:33 Unsupported .stab relocation error / mlongcall issue Fabien
2005-10-03 20:19 ` Jeffrey R. Carter
2005-10-04  4:13 ` Simon Wright [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