comp.lang.ada
 help / color / mirror / Atom feed
* Can I get rid of C libraries dependencies?
@ 2015-09-16 12:55 Leff Ivanov
  2015-09-16 13:44 ` Simon Clubley
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Leff Ivanov @ 2015-09-16 12:55 UTC (permalink / raw)


Okey, so I wrote this code:

pragma No_Run_Time;

with Interfaces.C.Strings;
use  Interfaces.C.Strings;
with Interfaces.C;
use  Interfaces.C;

procedure Main is
   procedure cputs(str:Char_Array);
   pragma Import(C, cputs, "puts");
   
   procedure cexit(code:Integer);
   pragma Import(C, cexit, "exit");
begin
   cputs("Hello World!");
   cexit(0);
end Main;

What I want to achive is a tiny 2kb binary executable 
with a single function called as entry point (which is 
defined in Ada and called Main procedure). The pragma 
on top let me get rid of the huge RTL code that is written
in Ada. However I'm still getting a lot of code linked 
in from C libraries, so...

1) Can I get rid of the C code linked in?
2) What is implemented in thoose C libraries?
3) Can I use Ada's RTL library without the C 
   support code, if I use some Restrictions?

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

end of thread, other threads:[~2015-09-17 10:25 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-09-16 12:55 Can I get rid of C libraries dependencies? Leff Ivanov
2015-09-16 13:44 ` Simon Clubley
2015-09-16 14:20 ` G.B.
2015-09-16 16:13 ` Simon Wright
2015-09-17  8:13   ` Leff Ivanov
2015-09-17 10:25     ` Brian Drummond

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