comp.lang.ada
 help / color / mirror / Atom feed
* Re: Hello World 217Kb ?
  2004-11-23 18:56 ` Jeffrey Carter
@ 2004-11-23  7:01   ` Al Christians
  2004-11-24 13:07     ` stephane richard
  0 siblings, 1 reply; 27+ messages in thread
From: Al Christians @ 2004-11-23  7:01 UTC (permalink / raw)


> stephane richard wrote:
> 
>> With Ada.Text_IO;
>> procedure Hello is
>> begin
>>     Ada.Text_IO.Put_Line ("Hello World. Welcome to GNAT");
>> end;
>>
>> a whopping 217Kb (without debug information)...am I doing something 
>> wrong, or is this the actual size of a basic exe file produced by Ada?
>>
>> Compiled with GNAT 3.15p

Omigosh.  That's 0.02 cents worth of disk space (one fiftieth of a cent) 
at current retail rates!  But the real killer is backups.  If you back 
up your programs to CD's every week,  you'll spend another penny per 
year for the CD space needed for backing that baby up.  This could get 
expensive.

Al



^ permalink raw reply	[flat|nested] 27+ messages in thread

* Hello World 217Kb ?
@ 2004-11-23 17:25 stephane richard
  2004-11-23 17:51 ` Adrien Plisson
                   ` (5 more replies)
  0 siblings, 6 replies; 27+ messages in thread
From: stephane richard @ 2004-11-23 17:25 UTC (permalink / raw)


Hello everyone,

I never noticed this before, never bothered to :-).  But today it hit me 
that the following program produces a rather huge exe size.

With Ada.Text_IO;
procedure Hello is
begin
    Ada.Text_IO.Put_Line ("Hello World. Welcome to GNAT");
end;

a whopping 217Kb (without debug information)...am I doing something wrong, 
or is this the actual size of a basic exe file produced by Ada?

Compiled with GNAT 3.15p







^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: Hello World 217Kb ?
  2004-11-23 17:25 Hello World 217Kb ? stephane richard
@ 2004-11-23 17:51 ` Adrien Plisson
  2004-11-23 18:14   ` stephane richard
  2004-11-23 17:54 ` Martin Krischik
                   ` (4 subsequent siblings)
  5 siblings, 1 reply; 27+ messages in thread
From: Adrien Plisson @ 2004-11-23 17:51 UTC (permalink / raw)


stephane richard wrote:
> Hello everyone,
> 
> I never noticed this before, never bothered to :-).  But today it hit me 
> that the following program produces a rather huge exe size.
> 
> With Ada.Text_IO;
> procedure Hello is
> begin
>     Ada.Text_IO.Put_Line ("Hello World. Welcome to GNAT");
> end;
> 
> a whopping 217Kb (without debug information)...am I doing something wrong, 
> or is this the actual size of a basic exe file produced by Ada?
> 
> Compiled with GNAT 3.15p

with GNAT 3.15p under Windows i did a 219kB WITH DEBUG INFORMATIONS, only 67kB 
without debug informations.

so, i don't know on which platform you are performing your test, but if you are 
under Windows, you typically misconfigured the project.

-- 
rien



^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: Hello World 217Kb ?
  2004-11-23 17:25 Hello World 217Kb ? stephane richard
  2004-11-23 17:51 ` Adrien Plisson
@ 2004-11-23 17:54 ` Martin Krischik
  2004-11-23 18:01 ` Simon Clubley
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 27+ messages in thread
From: Martin Krischik @ 2004-11-23 17:54 UTC (permalink / raw)


stephane richard wrote:

> Hello everyone,
> 
> I never noticed this before, never bothered to :-).  But today it hit me
> that the following program produces a rather huge exe size.
> 
> With Ada.Text_IO;
> procedure Hello is
> begin
>     Ada.Text_IO.Put_Line ("Hello World. Welcome to GNAT");
> end;
> 
> a whopping 217Kb (without debug information)...am I doing something wrong,
> or is this the actual size of a basic exe file produced by Ada?

The problem is that Ada.Text_IO is pretty large and unless you use "gnat
elim" to optimize package use you get it all.

> Compiled with GNAT 3.15p

Maybe you shoul tried the "-shared" option. That will link the Ada runtime
as DLL. 

And maybe you should try:

With Ada.Text_IO;
procedure Hello is
  begin
    Ada.Text_IO.Put_Line ("Hello World. Welcome to GNAT");
    Ada.Text_IO.Put_Line ("Goodby World. See you later");
end;

Double functionality (hello and goodby) for just a few bytes more! What a
super bargain!! ;-)

Well, this little joke should show you that the size of "Hello World" does
not say anything about how a Language scales up in larger projects. i.E.
double functionality does not mean double size.

With Regards

Martin
-- 
mailto://krischik@users.sourceforge.net
http://www.ada.krischik.com



^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: Hello World 217Kb ?
  2004-11-23 17:25 Hello World 217Kb ? stephane richard
  2004-11-23 17:51 ` Adrien Plisson
  2004-11-23 17:54 ` Martin Krischik
@ 2004-11-23 18:01 ` Simon Clubley
  2004-11-23 18:56 ` Jeffrey Carter
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 27+ messages in thread
From: Simon Clubley @ 2004-11-23 18:01 UTC (permalink / raw)


In article <UnKod.5871$hJ6.4041@trndny01>, "stephane richard" <stephane.richard@verizon.net> writes:
> 
> With Ada.Text_IO;
> procedure Hello is
> begin
>     Ada.Text_IO.Put_Line ("Hello World. Welcome to GNAT");
> end;
> 
> a whopping 217Kb (without debug information)...am I doing something wrong, 
> or is this the actual size of a basic exe file produced by Ada?
> 
> Compiled with GNAT 3.15p
> 

Which operating system ?

Yes, large executables (compared to C) are created for small programs,
but the percentage difference does reduce somewhat with larger programs.

If it's Linux, try running strip on the executable.

Simon.

-- 
Simon Clubley, clubley@remove_me.eisner.decus.org-Earth.UFP       
Microsoft: The Standard Oil Company of the 21st century



^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: Hello World 217Kb ?
  2004-11-23 17:51 ` Adrien Plisson
@ 2004-11-23 18:14   ` stephane richard
  2004-11-23 21:31     ` Adrien Plisson
  2004-11-23 22:38     ` Pascal Obry
  0 siblings, 2 replies; 27+ messages in thread
From: stephane richard @ 2004-11-23 18:14 UTC (permalink / raw)


>
> with GNAT 3.15p under Windows i did a 219kB WITH DEBUG INFORMATIONS, only 
> 67kB without debug informations.
>
> so, i don't know on which platform you are performing your test, but if 
> you are under Windows, you typically misconfigured the project.
>
> -- 
> rien

yes, it's in windows.  There was no project however...just the adb file and 
I compiled it....what settings do you have? 





^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: Hello World 217Kb ?
  2004-11-23 17:25 Hello World 217Kb ? stephane richard
                   ` (2 preceding siblings ...)
  2004-11-23 18:01 ` Simon Clubley
@ 2004-11-23 18:56 ` Jeffrey Carter
  2004-11-23  7:01   ` Al Christians
  2004-11-23 20:27 ` Georg Bauhaus
  2004-11-23 22:36 ` Pascal Obry
  5 siblings, 1 reply; 27+ messages in thread
From: Jeffrey Carter @ 2004-11-23 18:56 UTC (permalink / raw)


stephane richard wrote:

> With Ada.Text_IO;
> procedure Hello is
> begin
>     Ada.Text_IO.Put_Line ("Hello World. Welcome to GNAT");
> end;
> 
> a whopping 217Kb (without debug information)...am I doing something wrong, 
> or is this the actual size of a basic exe file produced by Ada?
> 
> Compiled with GNAT 3.15p

This is fairly common. Text_IO is quite complex, and you are no doubt 
linking it all in, since that's the default with GNAT. On Linux the 
difference between Ada and C looks even worse, since the C often uses a 
shared library by default.

You could also look at GNAT.IO to see if it makes much of a difference.

-- 
Jeff Carter
"We use a large, vibrating egg."
Annie Hall
44




^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: Hello World 217Kb ?
  2004-11-23 17:25 Hello World 217Kb ? stephane richard
                   ` (3 preceding siblings ...)
  2004-11-23 18:56 ` Jeffrey Carter
@ 2004-11-23 20:27 ` Georg Bauhaus
  2004-11-24  0:33   ` Jeffrey Carter
  2004-11-23 22:36 ` Pascal Obry
  5 siblings, 1 reply; 27+ messages in thread
From: Georg Bauhaus @ 2004-11-23 20:27 UTC (permalink / raw)


stephane richard <stephane.richard@verizon.net> wrote:
: 
: a whopping 217Kb (without debug information)...am I doing something wrong, 
: or is this the actual size of a basic exe file produced by Ada?

when I use the same compiler for translating a function that
returns an uninitialised integer variable, I get
the following sizes (-O, -static, -gnato):

Ada executable: ret_code
C executable: a.out

-rwxr-xr-x  1 georg staff   568326 Nov 23 21:13 ret_code
-rwxr-xr-x  1 georg staff   471287 Nov 23 21:14 a.out

shared linking gives

-rwxr-xr-x  1 georg staff    17191 Nov 23 21:17 ret_code
-rwxr-xr-x  1 georg staff    11938 Nov 23 21:17 a.out

After running strip, I get

-rwxr-xr-x  1 staff   486980 Nov 23 21:20 ret_code
-rwxr-xr-x  1 staff   421552 Nov 23 21:20 a.out

and

-rwxr-xr-x  1 staff     5520 Nov 23 21:21 ret_code
-rwxr-xr-x  1 staff     2856 Nov 23 21:21 a.out

respectively. This is GCC 3.4.2. The difference in size seems to
vary with compiler versions. For example, gcc 2.8.1 produces
a smaller difference.


with Interfaces.C; use Interfaces;

function ret_code return C.int is
   uninitialised: C.int;
begin
   return uninitialised;
end ret_code;

int main()
{
  int uninitialised;
  return uninitialised;
}


-- Georg



^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: Hello World 217Kb ?
  2004-11-23 18:14   ` stephane richard
@ 2004-11-23 21:31     ` Adrien Plisson
  2004-11-29  1:42       ` Freejack
  2004-11-23 22:38     ` Pascal Obry
  1 sibling, 1 reply; 27+ messages in thread
From: Adrien Plisson @ 2004-11-23 21:31 UTC (permalink / raw)


stephane richard wrote:
> yes, it's in windows.  There was no project however...just the adb file and 
> I compiled it....what settings do you have? 

i don't really know, i compiled it using GPS. i asked to remove debug 
informations and to strip executable.

also, i asked for a static runtime, which lead to a 67kB large file. i 
suspect it would be less with a shared runtime.

btw, it's very strange that the executable still needs "msvcrt.dll" 
which is the SHARED c runtime of microsoft. for comparison, i did the 
same thing in C++ using Visual Studio and STL. the executable is 60kB 
large, but only needs kernel32.dll and NO C runtime dll.

maybe someone with more experience with GNAT can explain why the C 
runtime is still needed.

-- 
rien




^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: Hello World 217Kb ?
  2004-11-23 17:25 Hello World 217Kb ? stephane richard
                   ` (4 preceding siblings ...)
  2004-11-23 20:27 ` Georg Bauhaus
@ 2004-11-23 22:36 ` Pascal Obry
  5 siblings, 0 replies; 27+ messages in thread
From: Pascal Obry @ 2004-11-23 22:36 UTC (permalink / raw)



"stephane richard" <stephane.richard@verizon.net> writes:

> a whopping 217Kb (without debug information)...am I doing something wrong, 
> or is this the actual size of a basic exe file produced by Ada?
> 
> Compiled with GNAT 3.15p

On Windows and without using a shared runtime. The same program using a shared
runtime is 10kb. But you need something else that the good-old 3.15p :)

Pascal.

-- 

--|------------------------------------------------------
--| Pascal Obry                           Team-Ada Member
--| 45, rue Gabriel Peri - 78114 Magny Les Hameaux FRANCE
--|------------------------------------------------------
--|              http://www.obry.org
--| "The best way to travel is by means of imagination"
--|
--| gpg --keyserver wwwkeys.pgp.net --recv-key C1082595



^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: Hello World 217Kb ?
  2004-11-23 18:14   ` stephane richard
  2004-11-23 21:31     ` Adrien Plisson
@ 2004-11-23 22:38     ` Pascal Obry
  2004-11-24 13:08       ` stephane richard
  2004-11-27  2:23       ` Bini
  1 sibling, 2 replies; 27+ messages in thread
From: Pascal Obry @ 2004-11-23 22:38 UTC (permalink / raw)



"stephane richard" <stephane.richard@verizon.net> writes:

> yes, it's in windows.  There was no project however...just the adb file and 
> I compiled it....what settings do you have? 

You certainly forgot the "-largs -s" !

Pascal.

-- 

--|------------------------------------------------------
--| Pascal Obry                           Team-Ada Member
--| 45, rue Gabriel Peri - 78114 Magny Les Hameaux FRANCE
--|------------------------------------------------------
--|              http://www.obry.org
--| "The best way to travel is by means of imagination"
--|
--| gpg --keyserver wwwkeys.pgp.net --recv-key C1082595



^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: Hello World 217Kb ?
  2004-11-23 20:27 ` Georg Bauhaus
@ 2004-11-24  0:33   ` Jeffrey Carter
  2004-11-24  2:27     ` Georg Bauhaus
  0 siblings, 1 reply; 27+ messages in thread
From: Jeffrey Carter @ 2004-11-24  0:33 UTC (permalink / raw)


Georg Bauhaus wrote:

> when I use the same compiler for translating a function that
> returns an uninitialised integer variable, I get
> the following sizes (-O, -static, -gnato):

Let's be equivalent here. What do you get if you turn off run-time 
checks, since C doesn't add them?

-- 
Jeff Carter
"Apart from the sanitation, the medicine, education, wine,
public order, irrigation, roads, the fresh water system,
and public health, what have the Romans ever done for us?"
Monty Python's Life of Brian
80




^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: Hello World 217Kb ?
  2004-11-24  0:33   ` Jeffrey Carter
@ 2004-11-24  2:27     ` Georg Bauhaus
  0 siblings, 0 replies; 27+ messages in thread
From: Georg Bauhaus @ 2004-11-24  2:27 UTC (permalink / raw)


Jeffrey Carter <spam@spam.com> wrote:
: Georg Bauhaus wrote:
: 
:> when I use the same compiler for translating a function that
:> returns an uninitialised integer variable, I get
:> the following sizes (-O, -static, -gnato):
: 
: Let's be equivalent here. What do you get if you turn off run-time 
: checks, since C doesn't add them?

I get surprisingly little less if anything at all, so I had omitted these
binaries from the listing. I guess this is because GNAT always translates
its own internal files with -gnatpg, so even -a won't change the size
more than 2k for a 555k statically linked executable, 2k more actually.
There is no change in size for the dynamically linked program (ret_code)
when switching from -gnato to -gnatp.  (The assembly listing is the same,
there is no checking code, AFAICS.)

Using some of the Restrictions pragmas the smallest I could get for this
Ada program is 5224 bytes, after stripping symbols. The a.out file has
2856 bytes. Some sections of the disassembly are longer in Ada produce,
one of them is adainit :-).




^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: Hello World 217Kb ?
  2004-11-23  7:01   ` Al Christians
@ 2004-11-24 13:07     ` stephane richard
  0 siblings, 0 replies; 27+ messages in thread
From: stephane richard @ 2004-11-24 13:07 UTC (permalink / raw)



> Omigosh.  That's 0.02 cents worth of disk space (one fiftieth of a cent)
> at current retail rates!  But the real killer is backups.  If you back up 
> your programs to CD's every week,  you'll spend another penny per year for 
> the CD space needed for backing that baby up.  This could get expensive.
>
> Al

:-)....I think I get the point hehehe.... 





^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: Hello World 217Kb ?
  2004-11-23 22:38     ` Pascal Obry
@ 2004-11-24 13:08       ` stephane richard
  2004-11-27  2:23       ` Bini
  1 sibling, 0 replies; 27+ messages in thread
From: stephane richard @ 2004-11-24 13:08 UTC (permalink / raw)


"Pascal Obry" <pascal@obry.net> wrote in message 
news:umzx8tcm2.fsf@obry.net...
>
>
> You certainly forgot the "-largs -s" !
>
> Pascal.
>
Indeed, I did.  back to 67 Kb....much better Thank you. 





^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: Hello World 217Kb ?
  2004-11-23 22:38     ` Pascal Obry
  2004-11-24 13:08       ` stephane richard
@ 2004-11-27  2:23       ` Bini
  2004-11-27  8:25         ` Pascal Obry
  1 sibling, 1 reply; 27+ messages in thread
From: Bini @ 2004-11-27  2:23 UTC (permalink / raw)


Pascal Obry <pascal@obry.net> wrote in message news:<umzx8tcm2.fsf@obry.net>...
> "stephane richard" <stephane.richard@verizon.net> writes:
> 
> > yes, it's in windows.  There was no project however...just the adb file and 
> > I compiled it....what settings do you have? 
> 
> You certainly forgot the "-largs -s" !
> 
> Pascal.
> 
> -- 
> 
> --|------------------------------------------------------
> --| Pascal Obry                           Team-Ada Member
> --| 45, rue Gabriel Peri - 78114 Magny Les Hameaux FRANCE
> --|------------------------------------------------------
> --|              http://www.obry.org
> --| "The best way to travel is by means of imagination"
> --|
> --| gpg --keyserver wwwkeys.pgp.net --recv-key C1082595

gnatlink -s fun.ali => What is the meaning of "-s" switch?
I can not find -s switch in gnat user's guide

I am not a native speaker of English. Sorry



^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: Hello World 217Kb ?
  2004-11-27  2:23       ` Bini
@ 2004-11-27  8:25         ` Pascal Obry
  2004-11-29  0:45           ` Bini
  0 siblings, 1 reply; 27+ messages in thread
From: Pascal Obry @ 2004-11-27  8:25 UTC (permalink / raw)



> gnatlink -s fun.ali => What is the meaning of "-s" switch?
> I can not find -s switch in gnat user's guide
> 
> I am not a native speaker of English. Sorry

That's a GNU/Linker option. See corresponding documentation.

Pascal.

-- 

--|------------------------------------------------------
--| Pascal Obry                           Team-Ada Member
--| 45, rue Gabriel Peri - 78114 Magny Les Hameaux FRANCE
--|------------------------------------------------------
--|              http://www.obry.org
--| "The best way to travel is by means of imagination"
--|
--| gpg --keyserver wwwkeys.pgp.net --recv-key C1082595



^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: Hello World 217Kb ?
  2004-11-27  8:25         ` Pascal Obry
@ 2004-11-29  0:45           ` Bini
  0 siblings, 0 replies; 27+ messages in thread
From: Bini @ 2004-11-29  0:45 UTC (permalink / raw)


Thank you!



^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: Hello World 217Kb ?
  2004-11-23 21:31     ` Adrien Plisson
@ 2004-11-29  1:42       ` Freejack
  2004-11-29  7:52         ` Alex R. Mosteo
  0 siblings, 1 reply; 27+ messages in thread
From: Freejack @ 2004-11-29  1:42 UTC (permalink / raw)


On Tue, 23 Nov 2004 22:31:57 +0100, Adrien Plisson wrote:

> stephane richard wrote:
>> yes, it's in windows.  There was no project however...just the adb file and 
>> I compiled it....what settings do you have? 
> 
> i don't really know, i compiled it using GPS. i asked to remove debug 
> informations and to strip executable.
> 
> also, i asked for a static runtime, which lead to a 67kB large file. i 
> suspect it would be less with a shared runtime.
> 
> btw, it's very strange that the executable still needs "msvcrt.dll" 
> which is the SHARED c runtime of microsoft. for comparison, i did the 
> same thing in C++ using Visual Studio and STL. the executable is 60kB 
> large, but only needs kernel32.dll and NO C runtime dll.
> 
> maybe someone with more experience with GNAT can explain why the C 
> runtime is still needed.

Usually what you need (at least far as I've discovered) is a customized C
library to link with, OR meticulous representation packages in your
project. For example, I've been doing some demoscene hacking, and linking
with the static Diet libc (as opposed to the vanilla glibc) cuts the size
of the executable by at least %60 to %80. 
I don't know if there are similiar libraries available for Windows, but
one should be able to cut their executable size dramatically by prudent
use of customized libs and static linking.

A runtime environment may or may not be necessary(usually NOT) for either
Ada or C. I'm currently working on my own space/speed optimized Ada libs
for my own projects. Wanna see just how low I can go. Stripping out the
runtime is saving plenty of resources, but it's also making me work a bit
harder on not screwing up. So beware. ;->

Freejack
 




^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: Hello World 217Kb ?
  2004-11-29  1:42       ` Freejack
@ 2004-11-29  7:52         ` Alex R. Mosteo
  2004-12-07 14:21           ` Warren W. Gay VE3WWG
  0 siblings, 1 reply; 27+ messages in thread
From: Alex R. Mosteo @ 2004-11-29  7:52 UTC (permalink / raw)


Freejack wrote:
> On Tue, 23 Nov 2004 22:31:57 +0100, Adrien Plisson wrote:
> 
> 
>>stephane richard wrote:
>>
>>>yes, it's in windows.  There was no project however...just the adb file and 
>>>I compiled it....what settings do you have? 
>>
>>i don't really know, i compiled it using GPS. i asked to remove debug 
>>informations and to strip executable.
>>
>>also, i asked for a static runtime, which lead to a 67kB large file. i 
>>suspect it would be less with a shared runtime.
>>
>>btw, it's very strange that the executable still needs "msvcrt.dll" 
>>which is the SHARED c runtime of microsoft. for comparison, i did the 
>>same thing in C++ using Visual Studio and STL. the executable is 60kB 
>>large, but only needs kernel32.dll and NO C runtime dll.
>>
>>maybe someone with more experience with GNAT can explain why the C 
>>runtime is still needed.
> 
> 
> A runtime environment may or may not be necessary(usually NOT) for either
> Ada or C. I'm currently working on my own space/speed optimized Ada libs
> for my own projects. Wanna see just how low I can go. Stripping out the
> runtime is saving plenty of resources, but it's also making me work a bit
> harder on not screwing up. So beware. ;->

The following excerpt from GNAT reference manual can be of interest:

pragma No_Run_Time
     Syntax: pragma No_Run_Time;

     This is a configuration pragma that makes sure the user code does 
not use nor need anything from the GNAT run time. This is mostly useful 
in context where code certification is required. Please consult the GNAT 
Pro High-Integrity Edition User's Guide for additional information.



^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: Hello World 217Kb ?
  2004-11-29  7:52         ` Alex R. Mosteo
@ 2004-12-07 14:21           ` Warren W. Gay VE3WWG
  2004-12-07 15:06             ` Adrien Plisson
  0 siblings, 1 reply; 27+ messages in thread
From: Warren W. Gay VE3WWG @ 2004-12-07 14:21 UTC (permalink / raw)


Alex R. Mosteo wrote:
> Freejack wrote:
>> On Tue, 23 Nov 2004 22:31:57 +0100, Adrien Plisson wrote:
...
>>> maybe someone with more experience with GNAT can explain why the C 
>>> runtime is still needed.
>>
>> A runtime environment may or may not be necessary(usually NOT) for either
>> Ada or C. I'm currently working on my own space/speed optimized Ada libs
>> for my own projects. Wanna see just how low I can go. Stripping out the
>> runtime is saving plenty of resources, but it's also making me work a bit
>> harder on not screwing up. So beware. ;->
> 
> The following excerpt from GNAT reference manual can be of interest:
> 
> pragma No_Run_Time
>     Syntax: pragma No_Run_Time;
> 
>     This is a configuration pragma that makes sure the user code does 
> not use nor need anything from the GNAT run time. This is mostly useful 
> in context where code certification is required. Please consult the GNAT 
> Pro High-Integrity Edition User's Guide for additional information.

Just be aware that pragma No_Run_Time comes at a heavy price. You
would have to give up several things, including:

    - The ability to do String & "Some string" & ...
      (this requires a runtime secondary stack)
    - Scalar'Img or  type'Image(type) won't compile.
    - Unconstrained array assignments like:
      declare
         S : String := Some_String_Func(Args);
      begin

This list is incomplete, but I found No_Run_Time so restrictive, that
even for O/S projects, I didn't find this to be very useful!

-- 
Warren W. Gay VE3WWG
http://home.cogeco.ca/~ve3wwg



^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: Hello World 217Kb ?
  2004-12-07 14:21           ` Warren W. Gay VE3WWG
@ 2004-12-07 15:06             ` Adrien Plisson
  2004-12-07 23:15               ` Warren W. Gay VE3WWG
  0 siblings, 1 reply; 27+ messages in thread
From: Adrien Plisson @ 2004-12-07 15:06 UTC (permalink / raw)


Warren W. Gay VE3WWG wrote:
> This list is incomplete, but I found No_Run_Time so restrictive, that
> even for O/S projects, I didn't find this to be very useful!

but we could write an Ada runtime in Ada using the pragma No_Run_Time, then 
write an OS in Ada which uses the Ada runtime written in Ada which uses the 
pragma No_Run_Time...

anybody following ? ;p

-- 
rien



^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: Hello World 217Kb ?
  2004-12-07 15:06             ` Adrien Plisson
@ 2004-12-07 23:15               ` Warren W. Gay VE3WWG
  2004-12-08  8:12                 ` Adrien Plisson
  0 siblings, 1 reply; 27+ messages in thread
From: Warren W. Gay VE3WWG @ 2004-12-07 23:15 UTC (permalink / raw)


Adrien Plisson wrote:
> Warren W. Gay VE3WWG wrote:
> 
>> This list is incomplete, but I found No_Run_Time so restrictive, that
>> even for O/S projects, I didn't find this to be very useful!
> 
> but we could write an Ada runtime in Ada using the pragma No_Run_Time, 
> then write an OS in Ada which uses the Ada runtime written in Ada which 
> uses the pragma No_Run_Time...
> 
> anybody following ? ;p

I think that is an ambitious undertaking. I have taken a different
path, myself ;P

I modified GNAT's runtime to work with the microkernal that I'm
using. Once that is out of the way, you can compile your O/S
modules nearly like GNAT applications (some restrictions apply,
like the choice of startup routine). The GNAT RTL hack only took a
about 5 weeknights to get going. ;-)  All other O/S work is
work in progress.

-- 
Warren W. Gay VE3WWG
http://home.cogeco.ca/~ve3wwg



^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: Hello World 217Kb ?
  2004-12-07 23:15               ` Warren W. Gay VE3WWG
@ 2004-12-08  8:12                 ` Adrien Plisson
  2004-12-08  8:49                   ` Vinzent 'Gadget' Hoefler
  2004-12-08 11:39                   ` Warren W. Gay VE3WWG
  0 siblings, 2 replies; 27+ messages in thread
From: Adrien Plisson @ 2004-12-08  8:12 UTC (permalink / raw)


Warren W. Gay VE3WWG wrote:
> I modified GNAT's runtime to work with the microkernal that I'm
> using. 

interresting. which microkernel are you using ?

> The GNAT RTL hack only took a
> about 5 weeknights to get going. ;-) 

do you mean that the GNAT RTL is well designed ? or that you worked "quick and 
dirty" ?

-- 
rien



^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: Hello World 217Kb ?
  2004-12-08  8:12                 ` Adrien Plisson
@ 2004-12-08  8:49                   ` Vinzent 'Gadget' Hoefler
  2004-12-09  3:37                     ` David Botton
  2004-12-08 11:39                   ` Warren W. Gay VE3WWG
  1 sibling, 1 reply; 27+ messages in thread
From: Vinzent 'Gadget' Hoefler @ 2004-12-08  8:49 UTC (permalink / raw)


Adrien Plisson wrote:

> do you mean that the GNAT RTL is well designed ?

I'd guess so. :)

Maybe an interesting reading:

<URI:http://www.iuma.ulpgc.es/users/gsd/Drago
gnat-drago-run-time-english.ps.gz>


Vinzent.



^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: Hello World 217Kb ?
  2004-12-08  8:12                 ` Adrien Plisson
  2004-12-08  8:49                   ` Vinzent 'Gadget' Hoefler
@ 2004-12-08 11:39                   ` Warren W. Gay VE3WWG
  1 sibling, 0 replies; 27+ messages in thread
From: Warren W. Gay VE3WWG @ 2004-12-08 11:39 UTC (permalink / raw)


Adrien Plisson wrote:
> Warren W. Gay VE3WWG wrote:
> 
>> I modified GNAT's runtime to work with the microkernal that I'm
>> using. 
> 
> interresting. which microkernel are you using ?

I wanted something rather light weight, and open sourced of course.
So I settled on RTMK (Johan Rydberg), since it seems to address both.
See http://rtmk.sourceforge.net.  Its not actively being developed
(stopped in 2002), version 0.2, but if you don't provoke it with
bad API calls, it doesn't panic ;-)  I now have 3 modules up and
running in Ada, and this includes name service, console and IDE
driver (the console driver is still largely C). I also spent
considerable time building a binding to rtmk, which is strongly
typed.

>> The GNAT RTL hack only took a
>> about 5 weeknights to get going. ;-) 
> 
> do you mean that the GNAT RTL is well designed ? or that you worked 
> "quick and dirty" ?

Naw, I did the quick and dirty thing. The problem of course is that
the GNAT RTL must not go looking for POSIX services
that aren't there. So there were a few C API calls, that
I had to divert, or otherwise neutre ;-)

I don't have tasking or protected types, but I seem to have most
of everything else to work with. This is a refreshing change from
pragma No_Run_Time!!!

-- 
Warren W. Gay VE3WWG
http://home.cogeco.ca/~ve3wwg



^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: Hello World 217Kb ?
  2004-12-08  8:49                   ` Vinzent 'Gadget' Hoefler
@ 2004-12-09  3:37                     ` David Botton
  0 siblings, 0 replies; 27+ messages in thread
From: David Botton @ 2004-12-09  3:37 UTC (permalink / raw)


You may want to point to: http://www.iuma.ulpgc.es/users/jmiranda/

On 2004-12-08 03:49:04 -0500, Vinzent 'Gadget' Hoefler 
<nntp-2004-11@t-domaingrabbing.de> said:

> Adrien Plisson wrote:
> 
>> do you mean that the GNAT RTL is well designed ?
> 
> I'd guess so. :)
> 
> Maybe an interesting reading:
> 
> <URI:http://www.iuma.ulpgc.es/users/gsd/Drago
> gnat-drago-run-time-english.ps.gz>
> 
> 
> Vinzent.





^ permalink raw reply	[flat|nested] 27+ messages in thread

end of thread, other threads:[~2004-12-09  3:37 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-11-23 17:25 Hello World 217Kb ? stephane richard
2004-11-23 17:51 ` Adrien Plisson
2004-11-23 18:14   ` stephane richard
2004-11-23 21:31     ` Adrien Plisson
2004-11-29  1:42       ` Freejack
2004-11-29  7:52         ` Alex R. Mosteo
2004-12-07 14:21           ` Warren W. Gay VE3WWG
2004-12-07 15:06             ` Adrien Plisson
2004-12-07 23:15               ` Warren W. Gay VE3WWG
2004-12-08  8:12                 ` Adrien Plisson
2004-12-08  8:49                   ` Vinzent 'Gadget' Hoefler
2004-12-09  3:37                     ` David Botton
2004-12-08 11:39                   ` Warren W. Gay VE3WWG
2004-11-23 22:38     ` Pascal Obry
2004-11-24 13:08       ` stephane richard
2004-11-27  2:23       ` Bini
2004-11-27  8:25         ` Pascal Obry
2004-11-29  0:45           ` Bini
2004-11-23 17:54 ` Martin Krischik
2004-11-23 18:01 ` Simon Clubley
2004-11-23 18:56 ` Jeffrey Carter
2004-11-23  7:01   ` Al Christians
2004-11-24 13:07     ` stephane richard
2004-11-23 20:27 ` Georg Bauhaus
2004-11-24  0:33   ` Jeffrey Carter
2004-11-24  2:27     ` Georg Bauhaus
2004-11-23 22:36 ` Pascal Obry

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox