From: anon@anon.org (anon)
Subject: Answers for Ludovic Brenta and Georg Bauhaus (Re: ada compiler?)
Date: Thu, 15 Nov 2007 09:33:04 GMT
Date: 2007-11-15T09:33:04+00:00 [thread overview]
Message-ID: <knU_i.23856$if6.18411@bgtnsc05-news.ops.worldnet.att.net> (raw)
1. The best way set "-fstack-check" as a default to install the gcc
source tree. And as many language packages as you want to
default using "-fstack-check". I would say skip JAVA for now.
2. Check for current GNAT or upgrade to GNU GPL version if needed
3. Configure gcc system as normal with this extra option added
--enable-fstack-check
aka
../source/configure --enable-fstack-check <other options>
4. Build GCC system the normal way as describe in manual or the way
you like, may be in stages.
Note: This way, the complete language packages define in the configure
'--enable-language="c,ada,..."' will be set to use stack checking. As
for Java you might want to skip this, since the "-fstack-check" routines
does slow down the execution and JAVA is slow enough. For languages,
that you want to use without the "stack-check" rebuild in another
directory the normal way.
The other way I stated only modifies the 'gnat1' but a lot of people here
may get upset if I show you those instructions. So, you can skip <part 1>
from the other post.
Now, the '-fstack-check' add the following three statements to the start
of each routine.
; Assembly (x86)
leal -4392(%esp),%eax
pushl %eax
call __gnat_stack_check
-- or the Ada version
AX := Stack - 4392 ; -- Insure routine has at least 4392 stack size
stack_check ( AX ) ; -- returns if AX is valid stack location
-- else result in Storage_Error exception
Note: the initial constant 4392 may be a different value on other
systems.
The 'Stack_Check' function can be found in
System.Stack_Checking.Operations.Stack_Check function
defined in the s-stchop.adb file.
For GNAT RTS, there are 4 packages, that deal with the stacks.
System.Secondary_Stack => s-secsta.ad?
System.Stack_Usage => s-stausa.ad?
System.Stack_Checking => s-stache.ad?
System.Stack_Checking.Operations => s-stchop.ad? -- core routines
next reply other threads:[~2007-11-15 9:33 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-15 9:33 anon [this message]
2007-11-15 10:23 ` Answers for Ludovic Brenta and Georg Bauhaus (Re: ada compiler?) Georg Bauhaus
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox