[gccsdk] GCCSDK GCC 4 status update

gccsdk at jip22.freeuk.com gccsdk at jip22.freeuk.com
Sat Jun 2 03:50:59 PDT 2007


John Tytgat wrote:

> In message <4eebfd570fgdshaw at sagitta.demon.co.uk>
>           Graham Shaw <gdshaw at sagitta.demon.co.uk> wrote:
> 
>> I am having some difficulty reliably launching a module-based application
>> written in C++, but as yet haven't determined whether it is me, g++,
>> libscl or the SCL itself which is to blame.  (If anyone else has done this
>> successfully I'd be interested to know.)
> 
> I think we can rule out libscl & SCL as they are and should be totally
> unaware that they called from C++ compiled code.  Could it be that libstdc++
> you're using is not compiled with -mmodule missing the data relocation ?
> That's probably one of the iffy areas of C++ module support in GCCSDK 3.4
> which is in GCCSDK 4 solved by having a dedicated module multilib setting
> which produces an extra set of GCC support libraries all compiled with
> -mmodule option.

I may be way off the mark here as I've not used C++ much on RISC OS,
but how does (non-trivial) static initialisation of namespace scope
variables interact with module initialisation and entering the module?

IIRC. for a given execution unit, it must only happen *before*
any functions in that execution unit are entered. This leaves scope
for allocations at initialisation time (presumably using the RMA) and
when running a module application, presumably using the heap in
application space. [I'm not sure about this point].

I could see this getting quite hairy with say a statically initialised 
std::vector, which is then resized by the running application, or
destructors of statically allocated objects are called and application 
exit or module finalisation.

Anyway, just a guess.

James




More information about the gcc mailing list