From: Leff Ivanov <droiddermo@gmail.com>
Subject: Can I get rid of C libraries dependencies?
Date: Wed, 16 Sep 2015 05:55:23 -0700 (PDT)
Date: 2015-09-16T05:55:23-07:00 [thread overview]
Message-ID: <0dd03a38-391b-45bc-859c-4ed2c42452e3@googlegroups.com> (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?
next reply other threads:[~2015-09-16 12:55 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-16 12:55 Leff Ivanov [this message]
2015-09-16 13:44 ` Can I get rid of C libraries dependencies? 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
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox